Re: [dev-servo] Moz2D/Skia (meeting notes)

2014-11-16 Thread Jonathan Watt

On 12/11/2014 17:30, Jack Moffitt wrote:
> On 12/11/2014 17:23, Cameron Zwarich wrote:
>> On Nov 11, 2014, at 4:55 PM, Andreas Gal  wrote:
>>> Does anyone have profiling numbers that Azure on top of Skia has a
>>> measurable performance overhead?
>>
>> The overhead referred to here is administrative overhead. We pull in other
>> pieces of Gecko outside of Azure proper in order to use Azure in Servo.
>
> As I remember, this is unintentional. Azure is now hosted out of tree
> and shouldn't have this problem anymore, although I haven't checked. I
> talked to Bas about this last October because at that time I had
> recently done an Azure upgrade and had to redo all the headers because
> XPCOM had snuck into it. Perhaps this can now be fixed?

If it's not, it sounds like it might be useful to have a tracking bug filed in:

  https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Graphics

with a summary along the lines of "Make Moz2D more Servo friendly" with specific 
issues filed as blockers against that one.


> Perhaps the right lesson to be learned here is that we should make it
> possible for Servo to use Azure without any additional pieces from Gecko,
> and to expose native surfaces backing Azure draw targets in a more
> uniform way.

DrawTarget::GetNativeSurface provides this in general (although the older 
version of Moz2D that servo is currently using doesn't implement 
DrawTargetSkia::GetNativeSurface). If you want to get hold of the 
GrContext/SkCanvas, it looks like it would be trivial to extend 
DrawTargetSkia::GetNativeSurface to support that just as DrawTargetCairo 
supports getting cairo contexts/surfaces (from which more platform specific 
objects can be obtained). Again a bug in the Graphics component of bmo would be 
appropriate.


Upstreaming your patches and/or filing upstream bugs to get the API you need 
should help avoid the administrative overhead in future. :)


___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo


Re: [dev-servo] Moz2D/Skia (meeting notes)

2014-11-17 Thread Jonathan Watt

On 12/11/2014 20:02, Jack Moffitt wrote:

Incidentally, I see no reason to move away from Azure, given how nice
Direct2D is on Windows.


Chrome uses Skia on windows right? So this apparently isn't a big
enough win for them to justify a wrapper.


That's one of many possible reasons they may not have wrapped D2D.

Even if that were the case back when they might have considered D2D 1.0, it's 
worth noting that D2D 1.1 can be a lot faster. The recent update of Moz2D to 
make it use D2D 1.1 (instead of 1.0) when possible (bug 902952) has resulted in 
some pretty sizable perf bumps in real world content. The most recent one I 
noticed is a 5x or so bump on http://exposedata.com/parallel/ (mousing over the 
table rows) which seems to have make us at least twice as responsive as Chrome 
(on my Windows machine).


https://bugzilla.mozilla.org/show_bug.cgi?id=841931#c12

___
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo