On Monday 2013-02-11 23:21 -0800, Matt Woodrow wrote:
> As an effort to improve both performance and responsiveness of the
> browser, we are planning on moving painting to happen on a
> separate thread.
> 
> My initial draft plan to do this can be found here:
> https://wiki.mozilla.org/Gecko:OffMainThreadPainting
> 
> Some of the details still need to be worked out, in particular
> coordinating with other platform teams to make sure everything we
> need is available off the main thread.

A few comments on some of the questions raised in that wiki page:


(1) As far as style code goes, if you:
 * hold a reference to the style context (AddRef and Release on the
   main thread)
 * call GetStyle* methods on the main thread (e.g.,
   GetStyleBackground, GetStyleBorder, GetStyleColor, etc.)
 * pass the results of those GetStyle* methods to the other thread
   (while you have a reference to the style context)
things should largely be ok, modulo any little details in the style
structs themselves that might do reference counting or lazy
construction of things (which I think there are a bunch of).

Would this sort of approach be acceptable for handling the style
side of things?


(2) I think somebody's going to need to tackle converting the
TableBackgroundPainter to display list items before this happens.


(3) Converting the background painting code in nsCSSRendering
doesn't feel any different to me from any of the other work of
converting display items except that the code happens to live in a
different class than the display item (though it may well be
reasonable to move it to live in the display item class; I think
it's largely just a historical artifact that it doesn't).  Largely
the same for borders, I think, though table borders might be a bit
more interesting.  Maybe I'm missing something, though.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to