Add PLayers async NoSwapUpdate

RESOLVED FIXED in mozilla15



5 years ago
5 years ago


(Reporter: BenWa, Assigned: BenWa)


(Blocks: 1 bug)

Mac OS X
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(blocking-fennec1.0 -)



(2 attachments, 2 obsolete attachments)



5 years ago
With the introduction of TiledThebesLayer we no longer have to swap for that layer type. This patch introduce an async NoSwapUpdate when we can guarantee that no EditReply will be generated for the transaction.

I haven't test this on mobile but I will early tomorrow. It work well on Mac. FYI we block content on average 5-15ms per layers update and most update on sites without a changing canvas will benefit from this change.

This may also be an option to move towards async layers update one layer type/back end a time without a sweeping refactor.

Comment 1

5 years ago
Created attachment 618162 [details] [diff] [review]
Assignee: nobody → bgirard
Attachment #618162 - Flags: review?(jones.chris.g)

Comment 2

5 years ago
The risk is moderate and the performance win is significant over many paints (esp. smaller paints).
blocking-fennec1.0: --- → ?

Comment 3

5 years ago
This should make you happy Chris, to support this properly we need to fix bug 747811 otherwise a get a race. Patch is already underway. Let's get this reviewed in the meantime since it wont effect this patch in the slightest.
Depends on: 747811
blocking-fennec1.0: ? → -


5 years ago
Blocks: 749062

Comment 4

5 years ago
We don't require this at the moment, but we may come back to it if we still aren't good enough and it shakes out on m-c first.

Comment 5

5 years ago
If you don't have time to look at the patch review Chris do you think Ali could review it? He knows the shadow layers code very well.
I'll be able to look tomorrow.  Something came up today.

Comment 7

5 years ago
Comment on attachment 618162 [details] [diff] [review]

>diff --git a/gfx/layers/ipc/PLayers.ipdl b/gfx/layers/ipc/PLayers.ipdl

>+  // We don't need to send a sync transaction if
>+  // no transaction operate require a swap.
>+  async NoSwapUpdate(Edit[] cset, bool isFirstPaint);

Nit: |UpdateNoSwap()|.

Yuck ... I thought the isFirstPaint turd went away :/.

r=me with naming change.  Looks good!
Attachment #618162 - Flags: review?(jones.chris.g) → review+

Comment 9

5 years ago
Created attachment 620015 [details] [diff] [review]
Attachment #618162 - Attachment is obsolete: true
Attachment #620015 - Flags: review+

Comment 10

5 years ago
Created attachment 620028 [details] [diff] [review]
bug 747811 work-around
Attachment #620028 - Flags: review?(ajuma)

Comment 11

5 years ago
Comment on attachment 620028 [details] [diff] [review]
bug 747811 work-around

Review of attachment 620028 [details] [diff] [review]:

::: gfx/layers/opengl/TiledThebesLayerOGL.cpp
@@ +131,5 @@
>  void
>  TiledThebesLayerOGL::PaintedTiledLayerBuffer(const BasicTiledLayerBuffer* mTiledBuffer)
>  {
>    mMainMemoryTiledBuffer = *mTiledBuffer;
> +  delete mTiledBuffer;

Assuming this is also temporary, add a comment here too.
Attachment #620028 - Flags: review?(ajuma) → review+

Comment 12

5 years ago
Created attachment 620034 [details] [diff] [review]
bug 747811 work-around
Attachment #620028 - Attachment is obsolete: true
Attachment #620034 - Flags: review+

Comment 13

5 years ago
Target Milestone: --- → mozilla15
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
It looks like this caused a 53% improvement in the DHTML NoChrome benchmark on Android Native.  Should we consider taking this on Aurora?

Comment 16

5 years ago
It seems to be it:[[19,63,20]]&sel=none&displayrange=7&datatype=running

I'm guessing this benchmark does a lot of small-ish painting? I'd be willing to uplift this if it bakes well on trunk.


5 years ago
Depends on: 754056


5 years ago
Blocks: 829747
You need to log in before you can comment on or make changes to this bug.