I would like to add to what Mason already said about GPU painting. If
one thing is clear, it's that the GPU (as in the many combinations of
hardware and drivers out there) is not a reliable platform, especially
with gecko's current architecture. We get driver bugs for the simplest
things we do and they hit an awful lot of users. We need a solid
baseline that works reliably across the majority of hardware (CPU
drawing), on top of which we can add faster GPU-based backends that gets
enabed when we can detect that things will actually work.

I do think that the GPU is what can provide the best performance in most
cases (when it works), especially as screen resolution goes up, and the
work on WebRender is a good illustration of this. I am hoping that
something similar will happen in gecko eventually, but if it does, I am
certain that it will never fully replace a reliable cpu rendering path.

Anyway, moving to skia is about reducing the amount of code we need to
maintain, and we picked skia rather than, say, cairo because we believe
it is the best choice we have with this kind of immediate mode drawing
APIs.

Cheers,

Nical

On Tue, Mar 22, 2016, at 08:06 PM, Patrick Walton wrote:
> Thanks for the info! This is very interesting to us in Servo.
> 
> Do you have any performance measurements that support the statement
> "While
> it would be nice to use the GPU, we’re not totally confident that using
> the
> GPU to render content is quite worth it."? We have evidence on our side
> to
> support this too (and in fact it's one of the motivations for WebRender),
> but it's be great to have comprehensive data to back it up.
> 
> Patrick
> On Mar 22, 2016 10:56 AM, "Mason Chang" <mch...@mozilla.com> wrote:
> 
> > Hi David,
> >
> > The main benefit is architectural with a huge simplification of our
> > graphics code, with a nice side benefit of performance. As it stands today,
> > we have multiple different rendering paths for each platform (Linux, OS X,
> > Windows). That means every time we hit a graphics bug, we have to know
> > three APIs that render just slightly different and we have to dig through
> > each backend to figure out what’s going on. These all have slightly
> > different performance characteristics as well, which takes some time. We
> > don’t generally get a lot of benefit from having a distinct backend for
> > platform also because other than on Windows, we’re not using the GPU for
> > content rendering. This essentially means we’re spinning a lot of wheels
> > and cost on small fixes on non-windows platforms for little benefit. [1].
> > This is especially true when you consider that we have special backends for
> > both Linux and OS X which make up 2.6% of our user base.
> >
> > With Skia, we can unify all of our graphics pipeline across all platforms
> > other than Windows for content rendering. It uses CPU rendering and because
> > of that, fixes on one platform translate much better across other platforms
> > that use Skia. While it would be nice to use the GPU, we’re not totally
> > confident that using the GPU to render content is quite worth it. It’s also
> > quite nice that micro-level optimizations at the backend level can mostly
> > be done for us as Skia is optimizing performance with Chrome as one of
> > their use cases. e.g., on Mac, scaling content on the CPU was 2-3x faster
> > with Skia versus CG.
> >
> > Overall, it’s mostly a clean up operation so we spend less time fixing
> > each individual platform.
> >
> > Please let me know if you have any more questions.
> >
> > Thanks,
> > Mason
> >
> > [1] https://people.mozilla.org/~danderson/moz-gfx-telemetry/www/
> >
> > > On Mar 22, 2016, at 8:21 AM, Mike de Boer <mdeb...@mozilla.com> wrote:
> > >
> > > I was also quite curious, so I started clicking up the hierarchy of that
> > bug and ended up at:
> > >
> > > https://bugzilla.mozilla.org/show_bug.cgi?id=1154825#c1 <
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1154825#c1>
> > >
> > > (comment 2 is also useful info)
> > >
> > > Ultimate goal: no more checkerboarding in APZ. But Mason is the
> > authority here, methinks :-)
> > >
> > > Cheers,
> > >
> > > Mike.
> > >
> > >> On 22 Mar 2016, at 15:45, David Rajchenbach-Teller <dtel...@mozilla.com>
> > wrote:
> > >>
> > >> Out of curiosity, what's the benefit?
> > >>
> > >> On 22/03/16 15:44, Mason Chang wrote:
> > >>> Hi all,
> > >>>
> > >>> We're changing the default graphics backend on OS X from CoreGraphics
> > to
> > >>> Skia. In the best case, you should notice no difference.
> > >>>
> > >>> If you see any graphics artifacts on mac, please file a bug and make it
> > >>> block bug 1207332 <
> > https://bugzilla.mozilla.org/show_bug.cgi?id=1207332>.
> > >>> You can verify that the artifact you're seeing is due to the switch by
> > >>> going to about:config, set the preference "gfx.content.azure.backends"
> > to
> > >>> "cg", restarting Firefox and seeing if the artifact still appears.
> > >>>
> > >>> Thanks to Lee Salzman, Jeff Muizelaar, and Markus Stange for their
> > >>> tremendous efforts in getting this accomplished.
> > >>>
> > >>> Thanks,
> > >>> Mason
> > >>> _______________________________________________
> > >>> dev-platform mailing list
> > >>> dev-platform@lists.mozilla.org
> > >>> https://lists.mozilla.org/listinfo/dev-platform
> > >>>
> > >> _______________________________________________
> > >> dev-platform mailing list
> > >> dev-platform@lists.mozilla.org
> > >> https://lists.mozilla.org/listinfo/dev-platform
> > >
> > > _______________________________________________
> > > dev-platform mailing list
> > > dev-platform@lists.mozilla.org
> > > https://lists.mozilla.org/listinfo/dev-platform
> >
> > _______________________________________________
> > dev-platform mailing list
> > dev-platform@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to