These are chat archives for AvaloniaUI/Avalonia

16th
May 2018
Rayyan Tahir
@RayyanTahir
May 16 2018 08:07
@danwalmsley were you able to find transform code similar to WPF's impl: PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice.M11?
Rayyan Tahir
@RayyanTahir
May 16 2018 08:26
I'm getting Portable.Xaml.XamlObjectWriterException: The value for 'Data' property is null for the following xaml code:
<Path Fill="Black" Stroke="Black" Width="20" Height="35" VerticalAlignment="Top" HorizontalAlignment="Right">
            <Path.Data>
              <GeometryGroup>
                <LineGeometry StartPoint="20,0" EndPoint="10,35"></LineGeometry>
              </GeometryGroup>
            </Path.Data>
          </Path>
danwalmsley
@danwalmsley
May 16 2018 08:57
@RayyanTahir I think we don't have GeometryGroup
Rayyan Tahir
@RayyanTahir
May 16 2018 08:58
Yup, I figured I'll have to use path attribute syntax
danwalmsley
@danwalmsley
May 16 2018 08:58
we have something else
1 sec
we have DrawingGroup
here is an example
      <DrawingGroup x:Key="SaveAll">
        <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
        <GeometryDrawing Brush="Transparent" Geometry="F1M6.0003,-0.000199999999999534L6.0003,5.9998 0.000300000000000189,5.9998 0.000300000000000189,15.9998 10.0003,15.9998 10.0003,9.9998 16.0003,9.9998 16.0003,2.5858 13.4143,-0.000199999999999534z" />
        <GeometryDrawing Brush="#FF7AC1FF" Geometry="F1M7,10L3,10 3,7 1,7 1,15 9,15 9,9 7,7z M13,1L13,4 9,4 9,1 7,1 7,6 7.414,6 10,8.586 10,9 15,9 15,3z M12,1L11,1 11,3 12,3z M6,9L5,9 5,7 6,7z" />
        <GeometryDrawing Brush="Transparent" Geometry="F1M12,1L12,3 11,3 11,1 9,1 9,4 13,4 13,1z M6,7L7,7 7,10 3,10 3,7 5,7 5,9 6,9z" />
      </DrawingGroup>
Rayyan Tahir
@RayyanTahir
May 16 2018 09:01
Thanks!
danwalmsley
@danwalmsley
May 16 2018 09:02
you could do something like this
<DrawingGroup x:Key="SaveAll">
        <GeometryDrawing Brush="#00FFFFFF">
            <GeometryDrawing.Geometry>
                 <LineGeometry ....
Rayyan Tahir
@RayyanTahir
May 16 2018 09:03
That is more helpful. I'll try this approach
Unfortunately, I'm getting the same exception for both examples
<Path Fill="Black" Stroke="Black" Width="20" Height="35" VerticalAlignment="Top" HorizontalAlignment="Right">
            <Path.Data>
              <DrawingGroup x:Key="SaveAll">
                <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
                <GeometryDrawing Brush="Transparent" Geometry="F1M6.0003,-0.000199999999999534L6.0003,5.9998 0.000300000000000189,5.9998 0.000300000000000189,15.9998 10.0003,15.9998 10.0003,9.9998 16.0003,9.9998 16.0003,2.5858 13.4143,-0.000199999999999534z" />
                <GeometryDrawing Brush="#FF7AC1FF" Geometry="F1M7,10L3,10 3,7 1,7 1,15 9,15 9,9 7,7z M13,1L13,4 9,4 9,1 7,1 7,6 7.414,6 10,8.586 10,9 15,9 15,3z M12,1L11,1 11,3 12,3z M6,9L5,9 5,7 6,7z" />
                <GeometryDrawing Brush="Transparent" Geometry="F1M12,1L12,3 11,3 11,1 9,1 9,4 13,4 13,1z M6,7L7,7 7,10 3,10 3,7 5,7 5,9 6,9z" />
              </DrawingGroup>
            </Path.Data>
          </Path>
and
<Path Fill="Black" Stroke="Black" Width="20" Height="35" VerticalAlignment="Top" HorizontalAlignment="Right">
            <Path.Data>
              <DrawingGroup>
                <GeometryDrawing Brush="Black">
                  <GeometryDrawing.Geometry>
                    <LineGeometry StartPoint="20,0" EndPoint="10,35"/>
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
              </DrawingGroup>
            </Path.Data>
          </Path>
danwalmsley
@danwalmsley
May 16 2018 09:37
@grokys master working again now :)
Benedikt Schroeder
@Gillibald
May 16 2018 09:40
There is a DrawingPresenter maybe that's the right direction.
danwalmsley
@danwalmsley
May 16 2018 09:42
DrawingGroup cant go inside Path.Data
what exactly are you trying to do?
Rayyan Tahir
@RayyanTahir
May 16 2018 09:49
I'm trying to draw a line
danwalmsley
@danwalmsley
May 16 2018 09:50
in your original example you put it inside a Group
which made me think you wanted to put several geometries together
if you don't need that then you just need to do
something like
  <Path.Data>
          <PathGeometry>
            <PathFigure StartPoint="0,0" IsClosed="True">
              <LineSegment Point="50,50" />
            </PathFigure>
          </PathGeometry>
        </Path.Data>
      </Path>
or maybe even just Line
Rayyan Tahir
@RayyanTahir
May 16 2018 09:55
That worked for me
danwalmsley
@danwalmsley
May 16 2018 09:57
sorry the Group thing threw me off
Rayyan Tahir
@RayyanTahir
May 16 2018 09:58
No problem, thanks a lot
Rayyan Tahir
@RayyanTahir
May 16 2018 12:30
On the latest pre-release, the ScrollBar of ListBox isn't rendering anymore, but scroll does work using mousewheel
Don't know if it's the same for all other Controls with ScrollBar
danwalmsley
@danwalmsley
May 16 2018 12:32
iv also had trouble with it
I think its related to a recent PR that overhauled the way properties work
some values are not getting set and causing strange issues like this
I would revert back a few versions, the version that causes this issue is:
ah I guess you want the new passwordchar
so you cant revert
Rayyan Tahir
@RayyanTahir
May 16 2018 12:34
:D
danwalmsley
@danwalmsley
May 16 2018 12:34
@grokys could we revert the properties overhaul until the issues get fixed?
Rayyan Tahir
@RayyanTahir
May 16 2018 12:34
I can wait for a fix its not like its creating a blocking effect
Steven Kirk
@grokys
May 16 2018 12:42
@danwalmsley are scrollbars broken for you as well??!?
danwalmsley
@danwalmsley
May 16 2018 12:49
well I can see scrollbars but the scrolling is completely messed up
but I'm not sure if its because of something with scrollbars or something to do with some other property not getting set correctly
Rayyan Tahir
@RayyanTahir
May 16 2018 12:50
Should CanResize = False prevent a Window from Maximizing?
Steven Kirk
@grokys
May 16 2018 12:53
i can't see any scrolling problems on the samples
danwalmsley
@danwalmsley
May 16 2018 12:55
@grokys did you try a listbox?
Steven Kirk
@grokys
May 16 2018 12:55
yeah in VirtualizationTest
danwalmsley
@danwalmsley
May 16 2018 12:56
actually listbox scrolling is fine for me
image.png
@RayyanTahir possibly something else changed?
@grokys my editor scrolling just goes mental though
due to #1576
Steven Kirk
@grokys
May 16 2018 13:01
ok 5 mins and i will take a look
Rayyan Tahir
@RayyanTahir
May 16 2018 13:03
I'm using a ListBox with default style, the scrolling works fine with mousewheel but the scrollbar side doesn't show
danwalmsley
@danwalmsley
May 16 2018 13:04
@RayyanTahir can you send me the XAML you used i'll try it here and see if I can find out whats happening
also did you see what happens if you use previous nugets packages?
does it come back?
Rayyan Tahir
@RayyanTahir
May 16 2018 13:06
It used to work fine on previous nugets. I'll check again. My XAML code is:
<ListBox Name="TeamsList" Padding="0" BorderBrush="Red" BorderThickness="0" Background="Transparent" ScrollViewer.HorizontalScrollBarVisibility="Disabled" KeyboardNavigation.TabNavigation="None" KeyboardNavigation.DirectionalNavigation="None">
      <ListBox.ItemTemplate>
        <DataTemplate>
          <local:SwapTeamItem HorizontalAlignment="Center" TeamId="{Binding Id}"/>
        </DataTemplate>
      </ListBox.ItemTemplate>
    </ListBox>
danwalmsley
@danwalmsley
May 16 2018 13:06
if you can pin point which nugget version it broke on, it would really help
Rayyan Tahir
@RayyanTahir
May 16 2018 13:07
Right, I'll traverse through the pre-releases to find out
danwalmsley
@danwalmsley
May 16 2018 13:07
whats listbox contained inside?
yeah I know its a pain to do
but hopefully it broke within the last 10 releases
Rayyan Tahir
@RayyanTahir
May 16 2018 13:07
Its no problem, I'm happy to help
danwalmsley
@danwalmsley
May 16 2018 13:07
iv been having to do that a lot lately
Rayyan Tahir
@RayyanTahir
May 16 2018 13:08
Ahan
Steven Kirk
@grokys
May 16 2018 13:18
@danwalmsley i tried out your repro in #1576 and i get 12 followed by 30 on both that branch and master
i tried updating to the latest CI build and still, 12 followed by 30
danwalmsley
@danwalmsley
May 16 2018 13:26
Il try again here
Give me a few minutes
Rayyan Tahir
@RayyanTahir
May 16 2018 13:30
@danwalmsley I found what the issue was
walterlv
@walterlv
May 16 2018 13:30
@grokys I've no idea how to implement the SharedSizeGroup for the moment.
Rayyan Tahir
@RayyanTahir
May 16 2018 13:34
I don't know what changed, but setting the width of child items, scoots the scrollbar to the side. Before the width of the individual child items had not effect on scrollbar's position. See below image
image.png
Half of the blue scrollbar is hidden behind the white space on the right
danwalmsley
@danwalmsley
May 16 2018 13:43
@grokys I'm still investigating, I'm trying to remind myself what I did, I might have typed instructions wrong
danwalmsley
@danwalmsley
May 16 2018 13:49
@grokys ok I have better repro now
best thing to do is put a bp on 1901
this method is protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs e)
it never gets called when fontsize is changed
TextBlock.FontSize property is the one that this doesn't get called for
danwalmsley
@danwalmsley
May 16 2018 14:37
@Gillibald you around
I'm trying to test the fonts PR but its not working for me
danwalmsley
@danwalmsley
May 16 2018 14:58
@Gillibald ok its working but there is a minor change needed to stop it crashing iv added comments to the PR
eschneider999
@eschneider999
May 16 2018 15:15
@grokys most of my code is isolated in separate classes, rendering, control logic, events. So I think I can do it. I think the drawing and clipping may be tedious moving from gdi to what avalonia uses?
Benedikt Schroeder
@Gillibald
May 16 2018 15:22
@danwalmsley I currently don't have time but i will check your comments later today.
danwalmsley
@danwalmsley
May 16 2018 15:23
@Gillibald no worries, I'm putting it through its paces! its generally working, but there are a couple of things that don't work
like if you set a font to bold, it ends up being bold but Courier New
instead of the font your specified
Steven Kirk
@grokys
May 16 2018 15:25
@eschneider999 yeah winforms uses immediate mode rendering while avalonia uses retained mode
so i don't think any of the rendering stuff will really apply
danwalmsley
@danwalmsley
May 16 2018 15:28
@Gillibald Il push some repros for some of the issues iv bumped into to help you
Benedikt Schroeder
@Gillibald
May 16 2018 15:39
Keep in my if you dont load a font variant for your desired weigt and style the available default is used. So if you want to display multiple font weigts for example normal and bold you have to load them by folder.
danwalmsley
@danwalmsley
May 16 2018 15:42
@Gillibald ok that probably will resolve most of the issues I had, its seems to not load from separate assembly, but you will see Iv posted a nice easy repro for that in control catalog
@Gillibald if you have a ttf SourceSans-Regular.ttf, I used to be able to get bold with this, but maybe it was actually previously reverting to a similar font that I didn't notice
Steven Kirk
@grokys
May 16 2018 15:52
@danwalmsley found it! #1590 should fix things
Dariusz Komosiński
@MarchingCube
May 16 2018 16:27
Quick question, do I still have to specify assembly in xmlns for namespaces that belong to local assembly. Ex. xmlns:local="clr-namespace:My.Project.Namespace;assembly=My.Project.Assembly"?
Jeremy Koritzinsky
@jkoritzinsky
May 16 2018 16:36
Yep. We still haven't fixed that.
Steven Kirk
@grokys
May 16 2018 16:37
@MarchingCube you do if you're still on the latest nuget.org release but you shouldn't have to if you're on a CI build
AvaloniaUI/Avalonia#1389
should have fixed that
Dariusz Komosiński
@MarchingCube
May 16 2018 16:37
I am using CI builds, just didn't update from a while (due to horrors I read in messages above) :smile:
Steven Kirk
@grokys
May 16 2018 16:37
heh yeah, sorry about that
Dariusz Komosiński
@MarchingCube
May 16 2018 16:41
Cool, will check it out after your fix gets merged in.
Also, I would appreciate if somebody could help me out with AvaloniaUI/Avalonia#1586. I am not sure how to bundle native binaries correctly using nuget. Posted my question in PR.
Jeremy Koritzinsky
@jkoritzinsky
May 16 2018 16:49
@kekekeks is the best contact for bundling native libraries.
Dariusz Komosiński
@MarchingCube
May 16 2018 16:56
I already contacted him, I guess I will just wait then :smile:
danwalmsley
@danwalmsley
May 16 2018 17:14
@MarchingCube iv also had to do it before Il post an example when I get to my machine if kekekeks doesn't beat me to it
danwalmsley
@danwalmsley
May 16 2018 17:45
@MarchingCube ok you can do this, this is what is done for skia natives and some native libs I use for AvalonStudio
image.png
this is nuget package explorer looking at the package
AvalonStudio.Languages.CPlusPlus.LibClang
basically your nuget package needs to contain a runtimes folder
and a folder for each runtime you want to support
you shouldn't use ubuntu-x64 anymore, linux-x64 should be used, and you need to make sure the binaries are built on an old version of ubuntu like 14.04 so that it pretty much runs on anything
@kekekeks can tell you more about Linux compatibility
I think he just manually puts the nuget package together
you may wish to use cakebuild or something to put the nuget package together
are you building the binaries yourself?
@grokys thanks for fix, iv merged the pr now :)
@jkoritzinsky did you by anychance manage to see why I couldn't build SharpGenTools.Runtime.COM?
if you can get me a PDB file for that assembly even better
Jeremy Koritzinsky
@jkoritzinsky
May 16 2018 17:49
I haven't had a chance to investigate yet.
danwalmsley
@danwalmsley
May 16 2018 17:49
ok
danwalmsley
@danwalmsley
May 16 2018 17:55
@MarchingCube if you have binaries I can publish a nuget package we can try out quite quickly
Dariusz Komosiński
@MarchingCube
May 16 2018 18:02
I have them but currently I am in a train. I could send them over in like 30 minutes.
danwalmsley
@danwalmsley
May 16 2018 18:32
@MarchingCube hey, iv been trying control catalog, instead
Raster works
but on OpenGL I get
image.png
could it be im running on a machine without opengl?
Dariusz Komosiński
@MarchingCube
May 16 2018 18:40
@danwalmsley Could be, that's why I am working on new version that should be more reliable (EGL)
What kind of machine that is?
danwalmsley
@danwalmsley
May 16 2018 18:41
windows 10, but old
Dariusz Komosiński
@MarchingCube
May 16 2018 18:41
Do you have a dedicated GPU, or running on integrated?
danwalmsley
@danwalmsley
May 16 2018 18:41
it has integrated intel something
I ran gpucaps on it and it says it does have opengl
Dariusz Komosiński
@MarchingCube
May 16 2018 18:42
That could be the issue, Intel OpenGL drivers have some issues sometimes.
danwalmsley
@danwalmsley
May 16 2018 18:42
i'll try on another machine
let me know when you have something to test on the EGL front
Dariusz Komosiński
@MarchingCube
May 16 2018 18:44
Right now @kekekeks responded to me about that native package creation, need the natives package to push some changes
I have the EGL backend generally working
On Windows it is defaulting to rendering via D3D11
But can be controlled to use OpenGL, in case people will need that (I will)
danwalmsley
@danwalmsley
May 16 2018 18:53
is there a way we can detect if there is a supported gpu and then falback to raster?
so that we don't end up with crashes
Dariusz Komosiński
@MarchingCube
May 16 2018 18:54
I think so, basically check for context creation failure and fallback in that case
danwalmsley
@danwalmsley
May 16 2018 18:55
that crash Im getting
context creation works
but crashes on flush
Dariusz Komosiński
@MarchingCube
May 16 2018 18:56
Is there some logger that can be used for internal library logging?
I would like to log some things so it is easier to figure out what happened.
@danwalmsley Added the fallback to raster when I cannot initialize gpu platform
danwalmsley
@danwalmsley
May 16 2018 19:15
you can use serilog I think
that's whats used elsewhere in avalonia
its used like this
Dariusz Komosiński
@MarchingCube
May 16 2018 19:26
Thanks, will add some logging there. Also it seems that @kekekeks is away, so if somebody would like to create a natives package just for testing I have the binaries here: https://drive.google.com/file/d/1IMmO3cT3Gxrm2SL_LMDHp7_oEWb00IgO/view
danwalmsley
@danwalmsley
May 16 2018 19:32
what should the package be called?
Dariusz Komosiński
@MarchingCube
May 16 2018 19:33
Looking at https://www.nuget.org/packages/Avalonia.Skia.Linux.Natives/, I guess Avalonia.Win32.Natives would be fine for now.
This is a Win32 only package
danwalmsley
@danwalmsley
May 16 2018 19:34
ok
danwalmsley
@danwalmsley
May 16 2018 19:40
@MarchingCube try this
once we get it working I will unpublish it and we can publish it under Avalonia.Win32.Natives
will have to wait a few minutes for nuget to process it
Dariusz Komosiński
@MarchingCube
May 16 2018 19:42
Sure, will try it out as soon as it is up
danwalmsley
@danwalmsley
May 16 2018 19:43
its up now
oh not yet
still indexing!
Dariusz Komosiński
@MarchingCube
May 16 2018 19:45
Got it now
danwalmsley
@danwalmsley
May 16 2018 19:50
seems to work
when I did publish -r win7-x64 the dlls were copied to output directory
if you have some EGL stuff to push I have time to test right now
if its not ready though I can wait
Dariusz Komosiński
@MarchingCube
May 16 2018 19:52
Thanks for the package, I am trying it out right now - getting ERROR_BAD_EXE_FORMAT though when trying to load it.
danwalmsley
@danwalmsley
May 16 2018 19:53
did it work before it was in the package?
Dariusz Komosiński
@MarchingCube
May 16 2018 19:53
Which is quite strange, as when I check it - all seems fine.
Yep, I am loading that with LoadLibraryW
danwalmsley
@danwalmsley
May 16 2018 19:53
hmm perhaps I mixed up x64 with x86?
Dariusz Komosiński
@MarchingCube
May 16 2018 19:53
I checked that, it is not
danwalmsley
@danwalmsley
May 16 2018 19:54
files are same as original?
Dariusz Komosiński
@MarchingCube
May 16 2018 19:55
Yep
Before I was loading them explicitly from my folder so it was "somefolder\libs\libEGL.dll", now it is just "libEGL.dll"
danwalmsley
@danwalmsley
May 16 2018 19:56
can you copy the files from the package to same directory and see if it works?
Dariusz Komosiński
@MarchingCube
May 16 2018 19:57
Sure, one moment
danwalmsley
@danwalmsley
May 16 2018 19:57
I think that with .net core at least it loads files directly from nuget cache folder, somehow it resolves them there, and that might only work with DLLImport perhaps
Dariusz Komosiński
@MarchingCube
May 16 2018 19:58
They work
danwalmsley
@danwalmsley
May 16 2018 19:58
you might need to resolve the full path to the dlls
Dariusz Komosiński
@MarchingCube
May 16 2018 20:01
Trying to add some dllimport just to see
danwalmsley
@danwalmsley
May 16 2018 20:01
do you know how the libskiasharp ones are resolved / loaded?
basically when you run it locally through visual studio it leaves the dlls in the nuget cache folder
and normally they get resolved there
when you publish nuget stuff gets copied to output directory
I think we might need something like this
Dariusz Komosiński
@MarchingCube
May 16 2018 20:04
Interestingly it is complaining about some platform stuff, and not that the file was not found.
danwalmsley
@danwalmsley
May 16 2018 20:04
I never trust error messages though
:)
Dariusz Komosiński
@MarchingCube
May 16 2018 20:05
Other issue may be that it depends on something that was not loaded for whatever reason
danwalmsley
@danwalmsley
May 16 2018 20:06
yes
if the file is missing do you get a different error?
Dariusz Komosiński
@MarchingCube
May 16 2018 20:07
yep, ERROR_MOD_NOT_FOUND
If I rename it even fails to run
danwalmsley
@danwalmsley
May 16 2018 20:08
can you be sure it selected the x64 and not the x86 one?
Dariusz Komosiński
@MarchingCube
May 16 2018 20:08
image.png
image.png
It is probably some dependency then
Nelson Carrillo
@nc4rrillo
May 16 2018 20:11
Angle support via EGL is awesome 👏🏼
Dariusz Komosiński
@MarchingCube
May 16 2018 20:19
image.png
So libSkiaSharp.dll somehow gets loaded
But not our EGL stuff
danwalmsley
@danwalmsley
May 16 2018 20:20
probably uses dll import?
@nc4rrillo good to see you back here :)
Will try to add some DllImports for real then :)
danwalmsley
@danwalmsley
May 16 2018 20:23
DLL import calls should be faster than GetDelegateForPointer each time
Dariusz Komosiński
@MarchingCube
May 16 2018 20:24
I cache the pointers
I mean the delegates
danwalmsley
@danwalmsley
May 16 2018 20:24
are the methods called like 1000s of times per frame
or just a few?
Dariusz Komosiński
@MarchingCube
May 16 2018 20:25
Just a few
Mostly on startup
danwalmsley
@danwalmsley
May 16 2018 20:25
ok
Nelson Carrillo
@nc4rrillo
May 16 2018 20:26
Hey @danwalmsley
😊
Dariusz Komosiński
@MarchingCube
May 16 2018 20:29
DLL import works, I guess I know what I will be doing for next 20 minutes :D
I don't know why I got so sidetracked into manual loading
danwalmsley
@danwalmsley
May 16 2018 20:35
@Gillibald did you manage to repro the font loading issue?
Nelson Carrillo
@nc4rrillo
May 16 2018 20:36
Did you update the PR with the EGL changes? @MarchingCube
Dariusz Komosiński
@MarchingCube
May 16 2018 20:37
Working on that ATM
Cleaning up some mess after my pointer loading adventure
Nelson Carrillo
@nc4rrillo
May 16 2018 20:37
ha
Dariusz Komosiński
@MarchingCube
May 16 2018 20:51
@nc4rrillo Also, what is your use case for gpu accelerated rendering?
Steven Kirk
@grokys
May 16 2018 20:55
hey again @nc4rrillo !
Dariusz Komosiński
@MarchingCube
May 16 2018 21:03
Pushed the new EGL based implementation for Skia backend.
danwalmsley
@danwalmsley
May 16 2018 21:04
just testing now ;)
Dariusz Komosiński
@MarchingCube
May 16 2018 21:07
If it also does not work on Intel integrated gpu, I would need to rent a MS Surface from work :D
danwalmsley
@danwalmsley
May 16 2018 21:08
it works on control catalog :)
just gonna test avalonstudio now
ahopper
@ahopper
May 16 2018 21:08
@MarchingCube hi, will this allow using pixel shaders?
danwalmsley
@danwalmsley
May 16 2018 21:08
so this should reduce cpu usage?
and make things a bit quicker generally
Dariusz Komosiński
@MarchingCube
May 16 2018 21:09
In general most of the rendering will be offloaded to gpu, helps quite a bit with high resolution displays
danwalmsley
@danwalmsley
May 16 2018 21:11
ok seems to work
if it failed to use gpu it would crash right
so I know it hasn't fallen back to cpu rendering without me knowing
?
Dariusz Komosiński
@MarchingCube
May 16 2018 21:11
@ahopper Currently EGL is supporting Skia, but yeah - technically we could start thinking about custom pixel shaders
It will fallback to Cpu if it fails
But I am logging that
If that even gets recorded anywhere :smile:
You can check in SkiaPlatform.cs
Dariusz Komosiński
@MarchingCube
May 16 2018 21:18
@danwalmsley any news ?
yep?
Nelson Carrillo
@nc4rrillo
May 16 2018 21:18
sorry hit enter early :)
@MarchingCube I need to create a GL context and expose get proc address in order to integrate with a GPU accelerated renderer I've been experimenting with porting to Avalonia
I've been wanting to get ANGLE working so I started working on EGL context creation myself when I saw that you had already done it
Dariusz Komosiński
@MarchingCube
May 16 2018 21:21
I will add a few hooks to allow for this. This is my use case as well.
I will probably have my renderer render to FBO and then share that with Skia.
So we will need to have some shareable surfaces.
As I want the rendering to be composited, so I can also draw on top of it.
Nelson Carrillo
@nc4rrillo
May 16 2018 21:22
I didn't get too far, I created the DX11 device with SharpDX then called eglCreateAngleDevice and eglGetPlatformDisplayEXT and bound the ES API, but that's about it
I didn't get as far as selecting the right pixel format or anything, or even creating the context
I got side tracked :|
danwalmsley
@danwalmsley
May 16 2018 21:23
@MarchingCube ok seems to work on gpu
Dariusz Komosiński
@MarchingCube
May 16 2018 21:23
:fire:
danwalmsley
@danwalmsley
May 16 2018 21:23
im trying to run binaries on another machine to confirm
Nelson Carrillo
@nc4rrillo
May 16 2018 21:24
er I mean eglCreateDeviceangle
Dariusz Komosiński
@MarchingCube
May 16 2018 21:24
We would need to implement more platforms eventually, it is Win32 only right now. Linux should be doable quite soon.
Denis Obolensky
@denismaster
May 16 2018 21:24
Hello, guys! I have a great idea to create previewer extension for Visual Studio Code. Is there any docs about how Avalonia Previewer in VS 2017 works, or anything about Avalonia.Remoting?
Nelson Carrillo
@nc4rrillo
May 16 2018 21:24
hey @grokys !
Dariusz Komosiński
@MarchingCube
May 16 2018 21:25
Aaand my branch is behind master again
danwalmsley
@danwalmsley
May 16 2018 21:26
@MarchingCube seems it doesn't cope with monitor scaling
image.png
Dariusz Komosiński
@MarchingCube
May 16 2018 21:27
Raster backend works with that ok?
Nelson Carrillo
@nc4rrillo
May 16 2018 21:27
wow Avalon Studio looks really nice ;)
Dariusz Komosiński
@MarchingCube
May 16 2018 21:27
Unless I broke something with dpi scaling
danwalmsley
@danwalmsley
May 16 2018 21:28
@nc4rrillo thanks
you can develop avalonia apps in it now with previewer
Steven Kirk
@grokys
May 16 2018 21:28
@denismaster afaik all the information online is in AvaloniaUI/Avalonia#900 and the rest is in @kekekeks' brain
danwalmsley
@danwalmsley
May 16 2018 21:28
@MarchingCube fonts look amazing now
is that because it uses direct2d?
Steven Kirk
@grokys
May 16 2018 21:28
@denismaster though @danwalmsley can probably help
ahopper
@ahopper
May 16 2018 21:28
@MarchingCube the shareable surface sounds just what I want.
Dariusz Komosiński
@MarchingCube
May 16 2018 21:28
It is running on D3D11 by default @danwalmsley
So I guess you are getting all that Clear-Type glory
danwalmsley
@danwalmsley
May 16 2018 21:29
@denismaster hey, @kekekeks made an attempt at a vscode plugin
Dariusz Komosiński
@MarchingCube
May 16 2018 21:29
ControlCatalog need one improvement: loading indicator for Calendar page
danwalmsley
@danwalmsley
May 16 2018 21:30
but ran into some difficulty
I think his efforts are in a repo somewhere
Denis Obolensky
@denismaster
May 16 2018 21:31
@grokys @danwalmsley Thank you for this info, I'll try to contact @kekekeks.
Dariusz Komosiński
@MarchingCube
May 16 2018 21:31
@danwalmsley Got a repro for that dpi issue, will try to fix it.
danwalmsley
@danwalmsley
May 16 2018 21:31
we have a previewer framework which is c# based
so @kekekeks solution was something like to render to image file and have it load in vscode
but I think there was issues getting it to work nicely
I can give advice on how the previewing framework
@MarchingCube cant wait to get your pr merged
fonts are amazing now
Nelson Carrillo
@nc4rrillo
May 16 2018 21:33
would be nice if we could somehow like render to a js canvas and display that in code
vs code that is
danwalmsley
@danwalmsley
May 16 2018 21:33
I guess the hope is we can run on webassembly sometime soon
then you can just have native graphics
:)
Nelson Carrillo
@nc4rrillo
May 16 2018 21:34
can probably hack something together with websockets serializing a list of draw commands or something
who knows
Denis Obolensky
@denismaster
May 16 2018 21:35
@danwalmsley it would be very helpful, 'cause my ideas about it are similar to rendering to an image or canvas.
I've also seen some @kekekeks videos when he run Avalonia in browser, using something like canvas. If he can do that, we also can.
Steven Kirk
@grokys
May 16 2018 21:35
@MarchingCube are you trying to get something merged to master? i want to merge #1503 but can wait for you if i keep getting you out of date ;)
Dariusz Komosiński
@MarchingCube
May 16 2018 21:36
@grokys My PR may take a while to get merged in due to size. Feel free to merge stuff as I need to wait for @kekekeks anyway to check it
And I am still fixing a bug there.
Nelson Carrillo
@nc4rrillo
May 16 2018 21:37
looks very nice so far, i'm looking over the code
Steven Kirk
@grokys
May 16 2018 21:37
ok, thanks
danwalmsley
@danwalmsley
May 16 2018 21:38
@MarchingCube ok there is some intermittent issue
image.png
whenever popup opens I get some kind of rendering glitch, it quickly corrects itself
on next render pass
no idea where to start with that though
i'll wait for scaling fix
Dariusz Komosiński
@MarchingCube
May 16 2018 21:39
Working on it, found the issue already
Nelson Carrillo
@nc4rrillo
May 16 2018 21:40
so the .net core version of Avalonia only uses Skia
?
Dariusz Komosiński
@MarchingCube
May 16 2018 21:41
You can run D2D as well
danwalmsley
@danwalmsley
May 16 2018 21:42
by default it uses skia
Nelson Carrillo
@nc4rrillo
May 16 2018 21:42
oh I see
danwalmsley
@danwalmsley
May 16 2018 21:42
for avalonstudio D2D just crashes
@MarchingCube performance is great with your PR
seems way snappier
Dariusz Komosiński
@MarchingCube
May 16 2018 21:43
I had stability issues as well - caused me to switch to Skia, but it had own set of issues
Steven Kirk
@grokys
May 16 2018 21:44
i believe we're still waiting on a fix for SharpDX on .net core
Nelson Carrillo
@nc4rrillo
May 16 2018 21:45
hm git for visual studio is a lot nicer than I remember..
danwalmsley
@danwalmsley
May 16 2018 21:45
thanks to @grokys :)
Nelson Carrillo
@nc4rrillo
May 16 2018 21:46
oh really? nice :)
danwalmsley
@danwalmsley
May 16 2018 21:46
if its the GitHub one then yeh
Nelson Carrillo
@nc4rrillo
May 16 2018 21:49
Okay so I built and ran the GPU Skia backend
danwalmsley
@danwalmsley
May 16 2018 21:50
@denismaster this is the AvaloniaPreviewer control for avalonstudio, should give you some clues on roughly how it works
Dariusz Komosiński
@MarchingCube
May 16 2018 21:51
@danwalmsley fixed the dpi issue
danwalmsley
@danwalmsley
May 16 2018 22:01
ok just testing now
@MarchingCube still not quite right
image.png
Dariusz Komosiński
@MarchingCube
May 16 2018 22:05
What is the problem here?
danwalmsley
@danwalmsley
May 16 2018 22:05
seems to be when windows are maximized
Dariusz Komosiński
@MarchingCube
May 16 2018 22:05
Ah
danwalmsley
@danwalmsley
May 16 2018 22:05
its missing a section at the top of the window
it should look more like
with toolbar and file menu and titlebar
can you maximize control catalog to repro?
Dariusz Komosiński
@MarchingCube
May 16 2018 22:06
Oh yeah, there is some strange behavior
I think in general something is quite weird with resizing
danwalmsley
@danwalmsley
May 16 2018 22:11
skiagpurenderissue.gif
resize-issue.gif
first one shows the weird rendering glitches im seeing with popup when it opens and resizes
second shows how once window is resized it looses its titlebar or something
this is only with scaling
I should check this isn't happening on master though
@Gillibald is your PR finished now? Im happy with functionality, ill do some more testing, but might be a good time to get some more people to review it?
danwalmsley
@danwalmsley
May 16 2018 22:21
@MarchingCube ok that's not from your PR master has this issue too
the window scaling issue
the glitches is just on your branch
@grokys looks like some issues have been introduced when monitor scaling is >100%
the second gif I reported above occurs on master, with scaling 125%
I know there was some PR recently that did something with window resizing, but cant remember which one
Dariusz Komosiński
@MarchingCube
May 16 2018 22:24
@danwalmsley Yeah I see some issues happening, will investigate that. Hopefully this week I can get this PR to a clean state.
danwalmsley
@danwalmsley
May 16 2018 22:25
well its looking pretty good now :)
ill try and find out what this scaling issue is tomorrow
Benedikt Schroeder
@Gillibald
May 16 2018 22:28
@danwalmsley Yes my PR is feature complete. Just needs some more unit tests but haven't figured out how to introduce them for the render backends.
Have added some more comments to make it easier to understand how to get things right.
danwalmsley
@danwalmsley
May 16 2018 22:30
If we add a TextBlock page to control catalog we can demo different ways of loading fonts
More or less what iv done on that repro branch I pushed
Benedikt Schroeder
@Gillibald
May 16 2018 22:35
Need to find some fonts we can use for that in terms of licensing.
danwalmsley
@danwalmsley
May 16 2018 22:43
source code pro and source sans pro I think are open
this is the license it uses
Benedikt Schroeder
@Gillibald
May 16 2018 22:55
Looks good will add a full example to the ControlCatalog
Dariusz Komosiński
@MarchingCube
May 16 2018 23:10
@danwalmsley I have pushed other possible fix for Skia rendering. Now it's time to get some sleep :smile: