Closed
Bug 1405481
Opened 8 years ago
Closed 8 years ago
Push canvas updates to the compositor on empty transactions
Categories
(Core :: Graphics: WebRender, enhancement, P1)
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox57 | --- | unaffected |
firefox58 | --- | unaffected |
People
(Reporter: kats, Assigned: sotaro)
References
Details
(Whiteboard: [wr-mvp] [gfx-noted])
Attachments
(2 files, 8 obsolete files)
13.43 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
3.55 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
We have some code that looks like it's supposed to send canvas updates to the compositor on empty transactions [1]. However it runs inside the layers-free block of EndTransactionInternal which only gets invoked accidentally. In bug 1403915 I'm moving the code around a bit, and commenting it out because it causes crashes if I run it where I want to run it. Somebody who knows what this code is doing should use this bug to fix it up and uncomment it.
[1] http://searchfox.org/mozilla-central/rev/a4702203522745baff21e519035b6c946b7d710d/gfx/layers/wr/WebRenderLayerManager.cpp#817-824
Updated•8 years ago
|
Updated•8 years ago
|
Priority: P3 → P2
Whiteboard: [gfx-noted][wr-mvp][triage] → [wr-mvp] [gfx-noted]
Assignee | ||
Comment 1•8 years ago
|
||
Assignee: nobody → sotaro.ikeda.g
Assignee | ||
Comment 2•8 years ago
|
||
Bug 1405594 is related to this bug.
Updated•8 years ago
|
Status: NEW → ASSIGNED
Priority: P2 → P1
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #3)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=d6d3f0560a0069efd6be9f4f1b380266a3cd7bb4
Some tests failed. Main reason of "application timed out after 330 seconds with no output" seemed to be caused by a thing that DidComposite did not triggered by EndEmptyTransaction().
Assignee | ||
Comment 5•8 years ago
|
||
Attachment #8915396 -
Attachment is obsolete: true
Assignee | ||
Comment 6•8 years ago
|
||
Attachment #8915513 -
Attachment is obsolete: true
Assignee | ||
Comment 7•8 years ago
|
||
Attachment #8915514 -
Attachment is obsolete: true
Reporter | ||
Comment 8•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #4)
> (In reply to Sotaro Ikeda [:sotaro] from comment #3)
> > https://treeherder.mozilla.org/#/
> > jobs?repo=try&revision=d6d3f0560a0069efd6be9f4f1b380266a3cd7bb4
>
> Some tests failed. Main reason of "application timed out after 330 seconds
> with no output" seemed to be caused by a thing that DidComposite did not
> triggered by EndEmptyTransaction().
I think I made a mistake when doing the new EndEmptyTransaction, I forgot to check for the EndTransactionFlags and do a composite if the flags don't contain END_NO_COMPOSITE. That fix should probably be a separate patch from the canvas updates thing.
Assignee | ||
Comment 9•8 years ago
|
||
Assignee | ||
Comment 10•8 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #8)
> (In reply to Sotaro Ikeda [:sotaro] from comment #4)
> > (In reply to Sotaro Ikeda [:sotaro] from comment #3)
> > > https://treeherder.mozilla.org/#/
> > > jobs?repo=try&revision=d6d3f0560a0069efd6be9f4f1b380266a3cd7bb4
> >
> > Some tests failed. Main reason of "application timed out after 330 seconds
> > with no output" seemed to be caused by a thing that DidComposite did not
> > triggered by EndEmptyTransaction().
>
> I think I made a mistake when doing the new EndEmptyTransaction, I forgot to
> check for the EndTransactionFlags and do a composite if the flags don't
> contain END_NO_COMPOSITE. That fix should probably be a separate patch from
> the canvas updates thing.
Thanks! I am going to add a patch to skip composition if END_NO_COMPOSITE is set.
Assignee | ||
Updated•8 years ago
|
Attachment #8915817 -
Attachment description: patch - Push canvas updates to the compositor on empty transactions → patch part 1 - Push canvas updates to the compositor on empty transactions
Assignee | ||
Comment 12•8 years ago
|
||
Attachment #8915817 -
Attachment is obsolete: true
Assignee | ||
Comment 13•8 years ago
|
||
Assignee | ||
Comment 14•8 years ago
|
||
Assignee | ||
Comment 15•8 years ago
|
||
attachment 8915839 [details] [diff] [review] does not work well with "WebGL Lesson 3 – a bit of movement" sample.
http://learningwebgl.com/lessons/lesson03/index.html
On current nightly, the sample update is only 2-3 fps. attachment 8915819 [details] [diff] [review] addressed the low fps problem. But attachment 8915839 [details] [diff] [review] reverts the situation.
From it, it seems that even when END_NO_COMPOSITE is set, if canvases have updates, WebRenderLayerManager needs to trigger composite.
Assignee | ||
Comment 16•8 years ago
|
||
Attachment #8915839 -
Attachment is obsolete: true
Assignee | ||
Comment 17•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8915819 -
Flags: review?(bugmail)
Assignee | ||
Updated•8 years ago
|
Attachment #8915861 -
Flags: review?(bugmail)
Reporter | ||
Comment 18•8 years ago
|
||
Comment on attachment 8915819 [details] [diff] [review]
patch part 1 - Push canvas updates to the compositor on empty transactions
Review of attachment 8915819 [details] [diff] [review]:
-----------------------------------------------------------------
There's a bunch of stuff in here that I'm not too familiar with, so bouncing to Jeff.
Attachment #8915819 -
Flags: review?(bugmail) → review?(jmuizelaar)
Reporter | ||
Comment 19•8 years ago
|
||
Comment on attachment 8915861 [details] [diff] [review]
patch part 2 - Suppress to composite when END_NO_COMPOSITE is set
Review of attachment 8915861 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/wr/WebRenderLayerManager.cpp
@@ +188,4 @@
>
> + bool updated = mWebRenderCommandBuilder.EmptyTransaction();
> +
> + if (aFlags & EndTransactionFlags::END_NO_COMPOSITE && !updated) {
Do we need to call mWebRenderCommandBuilder.EmptyTransaction() after BeginTransaction() ? Because it would be more efficient to call mWebRenderCommandBuilder.EmptyTransaction() first, and then if it returns false (and we don't need a composite), we just call SendSetFocusTarget and return. That way we don't unnecessarily call BeginTransaction and CancelTransaction in the case where there are no canvases.
Attachment #8915861 -
Flags: review?(bugmail) → review?(jmuizelaar)
Assignee | ||
Comment 20•8 years ago
|
||
Thanks for the advice :) I am going to update patches.
Assignee | ||
Updated•8 years ago
|
Attachment #8915819 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Attachment #8915861 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 21•8 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #19)
>
> Do we need to call mWebRenderCommandBuilder.EmptyTransaction() after
> BeginTransaction() ?
Yes, it is necessary to mWebRenderCommandBuilder.EmptyTransaction() after WebRenderBridgeChild::BeginTransaction(). It is necessary for handling Compositable transaction related stuffs.
Assignee | ||
Comment 22•8 years ago
|
||
Attachment #8915819 -
Attachment is obsolete: true
Assignee | ||
Comment 23•8 years ago
|
||
Attachment #8915861 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8917225 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Attachment #8917227 -
Flags: review?(jmuizelaar)
Comment 24•8 years ago
|
||
Comment on attachment 8917225 [details] [diff] [review]
patch part 1 - Push canvas updates to the compositor on empty transactions
Review of attachment 8917225 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ +37,5 @@
> + RefPtr<WebRenderCanvasData> canvasData = iter.Get()->GetKey();
> + WebRenderCanvasRendererAsync* canvas = canvasData->GetCanvasRenderer();
> + canvas->UpdateCompositableClient();
> + }
> +}
I wonder if this code should move out of the CommandBuilder
Attachment #8917225 -
Flags: review?(jmuizelaar) → review+
Updated•8 years ago
|
Attachment #8917227 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 25•8 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #24)
> Comment on attachment 8917225 [details] [diff] [review]
> patch part 1 - Push canvas updates to the compositor on empty transactions
>
> Review of attachment 8917225 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/layers/wr/WebRenderCommandBuilder.cpp
> @@ +37,5 @@
> > + RefPtr<WebRenderCanvasData> canvasData = iter.Get()->GetKey();
> > + WebRenderCanvasRendererAsync* canvas = canvasData->GetCanvasRenderer();
> > + canvas->UpdateCompositableClient();
> > + }
> > +}
>
> I wonder if this code should move out of the CommandBuilder
This could be done in a different bug.
Assignee | ||
Comment 26•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #25)
> >
> > Review of attachment 8917225 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > ::: gfx/layers/wr/WebRenderCommandBuilder.cpp
> > @@ +37,5 @@
> > > + RefPtr<WebRenderCanvasData> canvasData = iter.Get()->GetKey();
> > > + WebRenderCanvasRendererAsync* canvas = canvasData->GetCanvasRenderer();
> > > + canvas->UpdateCompositableClient();
> > > + }
> > > +}
> >
> > I wonder if this code should move out of the CommandBuilder
>
> This could be done in a different bug.
I implemented the above in CommandBuilder just since CanvasDataSet and mLastCanvasDatas is defined in CommandBuilder.
Comment 27•8 years ago
|
||
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/86c487f84974
Push canvas updates to the compositor on empty transactions r=jrmuizel
https://hg.mozilla.org/integration/mozilla-inbound/rev/077b6ec36d84
Suppress to composite when END_NO_COMPOSITE is set r=jrmuizel
![]() |
||
Comment 28•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/86c487f84974
https://hg.mozilla.org/mozilla-central/rev/077b6ec36d84
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•