These are chat archives for AvaloniaUI/Avalonia

7th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 07 2015 00:14
@grokys Please check skipped skia tests
Some of them seem to be marked as failing but generate correct images
I'm not sure that something is really wrong
Darnell Williams
@Seeker1437
Nov 07 2015 00:23
it is missing the pie
Steven Kirk
@grokys
Nov 07 2015 10:03
@kekekeks the tests seem to be failing because the antialiasing is different to the expected image
i'm assuming you copied the expected images from the d2d tests?
Nikita Tsukanov
@kekekeks
Nov 07 2015 10:04
Yep
Some of them are genuinely failing through
Steven Kirk
@grokys
Nov 07 2015 10:04
there are different expected images for each backend because we can't expect them to be exactly the same
when comparing the images we use imagemagick which tries to do a fuzzy compare
but it's best to just replace the expected images with the output when you're sure they're correct
which are genuinely failing?
Nikita Tsukanov
@kekekeks
Nov 07 2015 10:23
ImageBrush_NoStretch_NoTile_BottomRightQuarterDest
Skia doesn't support NoTile tiling mode
I'm trying to get skia or direct2d to render on GTK# window
I've got actual HWND and passed it to direct2d
Direct2d seems to create render target without fail, but nothing gets rendered on the screen
WTF
Nikita Tsukanov
@kekekeks
Nov 07 2015 10:34
It seems that gtk clears the window if nothing got drawn
>
  • When using GTK+, the widget system automatically places calls to
  • gdk_window_begin_paint_region() and gdk_window_end_paint() around
  • emissions of the expose_event signal. That is, if you’re writing an
  • expose event handler, you can assume that the exposed area in
  • #GdkEventExpose has already been cleared to the window background,
  • is already set as the clip region, and already has a backing store.
  • Therefore in most cases, application code need not call
  • gdk_window_begin_paint_region(). (You can disable the automatic
  • calls around expose events on a widget-by-widget basis by calling
  • gtk_widget_set_double_buffered().)
Nikita Tsukanov
@kekekeks
Nov 07 2015 10:46
Yep, DoubleBuffered = false did the trick
Then I reset it to true in Cairo backend
Gtk window now works fine with all graphics backends
Steven Kirk
@grokys
Nov 07 2015 11:08
hmm wonder what the workaround for NoTile would be
i guess creating an intermediate surface the size of the destination and drawing the image onto it
Nikita Tsukanov
@kekekeks
Nov 07 2015 11:09
That might affect performance
Geometry migt be really, really huge
Wait
It's possible to use Clamp mode with transparent 1-pixel border
Steven Kirk
@grokys
Nov 07 2015 11:11
was going to say: it must be possible because it's possible with CSS background
Nikita Tsukanov
@kekekeks
Nov 07 2015 11:12
Linux skia build is completing much faster
The problem is that I can hardly type anything
It eats the whole cpu and everything is so slow
@grokys Please, give me JB's 'license certificate ID'
I want to apply for CLion
Nikita Tsukanov
@kekekeks
Nov 07 2015 11:20
It should look like "LC-0000000-D00000000" or "D00000000"
Egor Bogatov
@EgorBo
Nov 07 2015 12:17
I love JB's Resharper++ :) however it's a win only
Nikita Tsukanov
@kekekeks
Nov 07 2015 12:17
That's one of the reasons why I started initial implementation using MSVS
Egor Bogatov
@EgorBo
Nov 07 2015 12:18
30 years since C++ was released, still no good ide :(
Nikita Tsukanov
@kekekeks
Nov 07 2015 12:28
I took me a hour to build libperpesk for Linux
30 years since C++ was released, still awful build toolchain
Egor Bogatov
@EgorBo
Nov 07 2015 12:47
do you use Clang?
Steven Kirk
@grokys
Nov 07 2015 12:48
yeah, it's incredible that in 2015 C++ still uses textual inclusion for imports
Egor Bogatov
@EgorBo
Nov 07 2015 12:48
I get significant boost of compilation process when moved from gcc to clang
Nikita Tsukanov
@kekekeks
Nov 07 2015 13:03
It turned out, that SkOsWindow code was written by a moron
And I was using it as a reference
Argh
Darnell Williams
@Seeker1437
Nov 07 2015 14:46
:O
R# 10 Ultimate here xD
Nikita Tsukanov
@kekekeks
Nov 07 2015 14:47
Buggy as hell
Darnell Williams
@Seeker1437
Nov 07 2015 14:47
Very very
I want to downgrade
I must say though it is nice how they change find refs
Nikita Tsukanov
@kekekeks
Nov 07 2015 15:10
blob
Well, that's something
Nikita Tsukanov
@kekekeks
Nov 07 2015 15:17
Well, whatever
I wanted android build anyway
Nikita Tsukanov
@kekekeks
Nov 07 2015 16:19
../../../../src/opts/SkXfermode_opts.h:138:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
Please submit a full bug report,
with preprocessed source if appropriate.
See http://source.android.com/source/report-bugs.html for instructions.
internal compiler error
Android at it's finest
Do you know what's the problem with this Makefile? Every compiler option is damn magic
And linker won't tell you if you missed something
It will just create a library that don't work and crashes at some point
because, whoops, undefined symbol
Steven Kirk
@grokys
Nov 07 2015 17:25
sorry, i have no experience building C++ for android!
Nikita Tsukanov
@kekekeks
Nov 07 2015 17:26
That's not android's problem
It's linux's one
Not sure about OSX
But linking shared libraries for linux is always a nightmare
Steven Kirk
@grokys
Nov 07 2015 17:26
only slightly more experience building C++ for linux... i.e. very little
Nikita Tsukanov
@kekekeks
Nov 07 2015 17:27
Windows linker is much simplier
If something is missing it will tell you and won't build dll
There is an option that enables the same behaviour for linux one
But it's broken, since it complain about things that aren't supposed to be resolved at link stage
Or may be I'm an idiot and missing something
Nikita Tsukanov
@kekekeks
Nov 07 2015 18:43
Argh
Our native library is overweight
50MB
Steven Kirk
@grokys
Nov 07 2015 18:49
woooooaaahhh what?
Nikita Tsukanov
@kekekeks
Nov 07 2015 18:53
My thoughts exactly
windows dll is only 2MB
I need some expert in *nix linking
Steven Kirk
@grokys
Nov 07 2015 18:53
how is that even possible?
Nikita Tsukanov
@kekekeks
Nov 07 2015 18:55
Awful build toolchain
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:16
Got it reduced to 36MB
Darnell Williams
@Seeker1437
Nov 07 2015 19:21
something else seems wrong
Im gonna cheat a little :3
Ronald Adonyo
@afrog33k
Nov 07 2015 19:24
@kekekeks have you tried stripping the binary ?
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:24
Still 36MB
It seems that it contains a lot of dead code
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:42
Now I'm trying to compile Skia with -ffunction-sections and -fdata-sections
May be then linker will be able to do something
Ronald Adonyo
@afrog33k
Nov 07 2015 19:43
hmmm, let me see what i can do to reduce the size here … i hope you are running with -g0
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:43
I'm using their build toolchain
It generates something like this
c++ -MMD -MF obj/third_party/externals/icu/source/common/icuuc.filterednormalizer2.o.d -DSK_INTERNAL -DSK_GAMMA_SRGB -DSK_GAMMA_APPLY_TO_A8 -
DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 -DSK_SUPPORT_GPU=1 -DSK_SUPPORT_OPENCL=0 -DSK_FORCE_DISTANCE_FIELD_TEXT=0 
-DSK_SAMPLES_FOR_X -DSK_BUILD_FOR_UNIX -DSKIA_DLL -DSKIA_IMPLEMENTATION=1 -DU_COMMON_IMPLEMENTATION -DU_HIDE_DATA_SYMBOL 
-DU_USING_ICU_NAMESPACE=0 -DHAVE_DLOPEN=0 -DUCONFIG_NO_NON_HTML5_CONVERSION=1 -DU_STATIC_IMPLEMENTATION -DNDEBUG 
-I../../third_party/externals/icu/source/common -fPIC -g -fno-exceptions -fstrict-aliasing -Wall -Wextra -Winit-self -Wpointer-arith -Wsign-compare -Wno-unused-parameter 
-m64 -Werror -w -ffunction-sections -fdata-sections -fvtable-gc -O3 -std=c++11 -fno-rtti -fno-threadsafe-statics -Wnon-virtual-dtor -frtti  
-c ../../third_party/externals/icu/source/common/filterednormalizer2.cpp -o obj/third_party/externals/icu/source/common/icuuc.filterednormalizer2.o
-O3
Regarding -g0 - this info should be removed by strip anyway
Ronald Adonyo
@afrog33k
Nov 07 2015 19:46
yeah thats true
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:50
Great
33MB
>_<
Wtf is going on
Ronald Adonyo
@afrog33k
Nov 07 2015 19:50
hahahaha on osx i have about 19.7mb
still large
Nikita Tsukanov
@kekekeks
Nov 07 2015 19:50
Windows one - 2mb
Windows build of Skia's static libs combined weights 45MB
Linker reduces it to 2MB
On linux this ration is 175MB/35MB
Ronald Adonyo
@afrog33k
Nov 07 2015 20:08
osx 165/17.8
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:11
Well, let's try to compile with /Os
Why MSVS toolchain doesn't do such horrible thing?
Ronald Adonyo
@afrog33k
Nov 07 2015 20:11
i was wondering how large is your nanobench ?
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:18
27M
Ronald Adonyo
@afrog33k
Nov 07 2015 20:18
really ?
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:18
yep
Ronald Adonyo
@afrog33k
Nov 07 2015 20:18
mine striped is 6.6m
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:19
kekekeks@KeksMPC:~/Projects/Perspex.Skia/skia/out/Release$ strip nanobench 
kekekeks@KeksMPC:~/Projects/Perspex.Skia/skia/out/Release$ ls -la nanobench 
-rwxrwxr-x 1 kekekeks kekekeks 2641384 нояб.  7 23:19 nanobench
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:24
I've managed to reduce binary size to 22MB
using -Os
Still 10 times larger than windows one
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:51
-rwxrwxr-x 1 kekekeks kekekeks 2219000 нояб. 7 23:50 libperspesk.so
HELL YEAH
Weston
@ronnyek
Nov 07 2015 20:54
Ship it!
Any chance of documentation for being able to build with support for skia
Or is it just get skia building and then build this perspex referencing that?
Also @kekekeks was that Linux work the work you were referring to regarding the drm crap I was planning on knocking out
Nikita Tsukanov
@kekekeks
Nov 07 2015 20:59
Not yet
We need to also add glx support
Since it seems that skia is incomplatible with Linux's egl/gles2
Weston
@ronnyek
Nov 07 2015 21:00
Meaning it targets gles3?
Nikita Tsukanov
@kekekeks
Nov 07 2015 21:00
No idea
Weston
@ronnyek
Nov 07 2015 21:00
I know Android moved to that a few years ago
Nikita Tsukanov
@kekekeks
Nov 07 2015 21:00
It worked fine with GLES2 on windows
Weston
@ronnyek
Nov 07 2015 21:00
Hmmmmm off
Odd
Nikita Tsukanov
@kekekeks
Nov 07 2015 21:47
Well, I've accidentally removed all image decoders from the binary
By using --gc-sections
Darnell Williams
@Seeker1437
Nov 07 2015 22:33
:O
Johan Larsson
@JohanLarsson
Nov 07 2015 22:35
<Value />