These are chat archives for AvaloniaUI/Avalonia

6th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 06 2015 00:39
blob
Well, tile brushes weren't that big deal
It seems that Skia backend is fully operational
It still lacks support for FormattedText::SetForegroundBrush(Brush brush, int startIndex, int length)
But that's not really critical and can be implemented later
Tomorrow I'll try to run our test suite
Darnell Williams
@Seeker1437
Nov 06 2015 02:24
hmm skia is used more than I thought
maybe I cab u
use this in my graphics engine.
Weston
@ronnyek
Nov 06 2015 02:25
Hahah
Skia is core of Android
Core of chrome
Core ofblots of stuff
Wiesław Šoltés
@wieslawsoltes
Nov 06 2015 11:00
@kekekeks This is interesting regarding Skia https://github.com/flutter/engine/tree/master/skia/ext
Steven Kirk
@grokys
Nov 06 2015 11:01
i was just reading about flutter
Nikita Tsukanov
@kekekeks
Nov 06 2015 11:03
Well, our drawing primitives are already implemented
For now I'm trying to get hw accel up and running
Already got it for RenderTargetBitmap
Drawing to a window is a bit tricky since I have to call ANGLE code directly
Looks like they use blink for text rendering
Nikita Tsukanov
@kekekeks
Nov 06 2015 11:10
Ehm. Having a complete engine and having perspex-compiant API are completely different things, you know )
José Manuel Nieto
@SuperJMN
Nov 06 2015 11:44

you can check for those languages and show a messagebox "Learn English, *!"

Yes, that's it

Oops, sorry about the off-topic
Nikita Tsukanov
@kekekeks
Nov 06 2015 12:46
ARGH
Skia is weird
It seems they aren't using gl to draw on windows
Instead they are passing prerendered bitmap to it
Darnell Williams
@Seeker1437
Nov 06 2015 12:58
its a decent practice
hacklex
@hacklex
Nov 06 2015 13:28
as long as there are not more than one buffer per abstraction layer, yes.
Nikita Tsukanov
@kekekeks
Nov 06 2015 13:30

its a decent practice

Let rephrase this

They aren't using FBO
They use an offscreen surface, then draw it on FBO and then draw it to screen
Tripple buffering
wtf
Weston
@ronnyek
Nov 06 2015 13:51
.
@kekekeks you can do it!
I found some code that was written by a sane person
Darnell Williams
@Seeker1437
Nov 06 2015 14:02
oh wow really no not good...
tabfail
Nikita Tsukanov
@kekekeks
Nov 06 2015 14:32
hell yeah
Got it rendering directly on framebuffer
It somehow breaks hw accel in render target
Weston
@ronnyek
Nov 06 2015 14:55
@kekekeks you really plowed through getting that going... I assukmed this would have been a couple weeks work
Nikita Tsukanov
@kekekeks
Nov 06 2015 14:58
Well, WTF per hour rate is very high
Now it renders everything flipped upside down
Weston
@ronnyek
Nov 06 2015 15:02
seems like with gl rendering that'd be an easy thing to do
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:02
It also seems to not like the idea of two gl contexts
Weston
@ronnyek
Nov 06 2015 15:03
why would you want more htan one out of curiosity
multiple viewports for same scene?
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:03
One per window
Oh
wait
i need one surface per window
Weston
@ronnyek
Nov 06 2015 15:03
oh yeah I guess that makes sense
Weston
@ronnyek
Nov 06 2015 15:14
@kekekeks so you've got entire thing ported over and able to render all the diff shapes and being able to draw the same way you do with cairo, just not hardware accel?
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:29
Yep
Actually, I can get one render target to get hw-accel
When I try to use multiple the whole thing goes herp-derp
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:41
Hm
Well, now I'm using default gl display
And context
Seems to be working fine
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:52
At last
Now it's working fine
Weston
@ronnyek
Nov 06 2015 15:53
nice!
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:54
I'm not actually sure that it doesn't leak resources on window close/resize
Weston
@ronnyek
Nov 06 2015 15:54
so you can run your little demo app with the animations and what not?
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:55
Ehm, all demos are already here
Weston
@ronnyek
Nov 06 2015 15:55
sorry for all the questions... I'm just excited
I want to jump in and help out where I can
Nikita Tsukanov
@kekekeks
Nov 06 2015 15:55
Search this chat for files named skia*.ogv
The next step will be running our test suite
For now I'm checking for potential resource leaks
Nope, core rendering stuff doesn't leak
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:02
blob
Well, that looks a little weird
Well, I guess I need to run tests first
Clipping is broken
And it segfaults on "Input" page
But that's something
Weston
@ronnyek
Nov 06 2015 21:10
nice
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:13
Well, clipping was easy to fix
FormattedText weirdness is another matter
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:22
blob
I guess Perspex doesn't expect accurate glyph rects
@grokys
Steven Kirk
@grokys
Nov 06 2015 21:34
ha looks like it!
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:39
BTW, why aren't we merging character rects to one per line?
blob
I've simplified rect computation and got this
I consider this to be an issue in perspex itself
We shouldn't render character rects individually
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:45
blob
@grokys any idea what might have happened with the left panel?
Oh
It's actually, intended behavior
Direct2D renders the same thing
I declare our Skia backend to be capable of rendering test app
Weston
@ronnyek
Nov 06 2015 21:50
ship it
wonder how well it performs against direct2d
or does it use direct2d for the gl surface?
Nikita Tsukanov
@kekekeks
Nov 06 2015 21:52
Nope, it uses ANGLE, which uses Direct3D
Pushed to master
But to build it you need to build skia itself first

If you want to test it, replace

InitializeSubsystems((int)Environment.OSVersion.Platform);

with

Win32Platform.Initialize();
SkiaPlatform.Initialize();

In your App.cs

The next step is to adapt our test suite
Once I get tests up and running, I'll add support for android
Should be pretty simple since I have a code example to work with
After that I hope to get some help from @donandren to integrate it to his awesome android port
And then we should release alpha3, yay
Steven Kirk
@grokys
Nov 06 2015 22:03
nice work! will give it a try tomorrow
José Manuel Nieto
@SuperJMN
Nov 06 2015 22:05
WOOOHOOO!
it sounds like Perspex is becoming WPF Ultimate Edition!
(now with Xplat steroids)
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:06
Well, we have our xplat rendering backend
It's time for the world domination
José Manuel Nieto
@SuperJMN
Nov 06 2015 22:06
What do you think the Xamarin Forms team thinks about this?
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:08
Well, XForms is completely different thing
José Manuel Nieto
@SuperJMN
Nov 06 2015 22:09
do you mean "worse"?
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:10
Well, xforms is suitable for building apps
Perspex currently isn't
Perspex have more potential, but at current point I won't say that XForms is "worse"
We don't even have VirtualizingPanel, you know
Or proper IScrollInfo support
Steven Kirk
@grokys
Nov 06 2015 22:13
or working control lookup by name ;)
(hint hint)
Weston
@ronnyek
Nov 06 2015 22:22
what is @donandren doing?
I'd be interested in porting the skia efforts in windows to drm
but if @don already did that
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:24
Ehm
wat
If you want *nix based opengl rendering, wait a bit
I'll be implementing *nix opengl context support next week
You'll need that code for your libdrm thingy
Weston
@ronnyek
Nov 06 2015 22:32
is it gonna require a window manager
eg, require gtk or some other toolkit which runs on x11
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:39
We do have window manager
See tinywm branch
Weston
@ronnyek
Nov 06 2015 22:39
I know
but if you depended on a surface being supplied by gtk
gtk has only recently lost its dependence on x11
I think you can fairly easily get a gl context from drm driver
that supports gles vwhatever
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:41
blob
See? That's what I told ya about being able to run tests
I would never know that something is wrong
Andrey Kunchev
@donandren
Nov 06 2015 22:42
@kekekeks I could help you no issues with that
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:43
Would be very appreciated
tnx
Andrey Kunchev
@donandren
Nov 06 2015 22:44
you're welcome, I'm just going to sleep but in the next days we can discuss how we can proceed
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:44
@grokys How to make some tests ignored? I want to push test suite changes but don't want to break the build
José Manuel Nieto
@SuperJMN
Nov 06 2015 22:46
get ready!
I'm working on it! tomorrow will be the day
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:47
#if PERSPEX_CAIRO
        [Fact(Skip = "Font scaling currently broken on cairo")]
#else
Oh, I see
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:53
36 passed, 20 failed
production_ready_quality.jpg
Johan Larsson
@JohanLarsson
Nov 06 2015 22:53
> 50%
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:53
yep
I'm surprised
Johan Larsson
@JohanLarsson
Nov 06 2015 22:54
but 56 is a very low number
Nikita Tsukanov
@kekekeks
Nov 06 2015 22:54
That many tests passed with reference images from direct2d