Closed
Bug 966679
Opened 11 years ago
Closed 11 years ago
Webm video lags with basic compositor
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: evilpie, Assigned: mattwoodrow)
References
Details
Attachments
(7 files)
1.30 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
1.12 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
1.40 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
4.44 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
1.48 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
5.59 KB,
patch
|
nical
:
review+
|
Details | Diff | Splinter Review |
3.17 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Just playing http://video.webmfiles.org/big-buck-bunny_trailer.webm in a single tab lags. I also tested this without e10s and just OMTC. With OpenGL enabled it's smooth.
I tried profiling this, but perf is kind of limited, but there seem to be various locking functions and "copy_user_enhanced_fast_string" at the top, which would indicate some overhead here.
Reporter | ||
Comment 1•11 years ago
|
||
I also see errors from GfxFormatToCairoFormat, because the format is R8G8B8X8, which is not handled.
Reporter | ||
Comment 2•11 years ago
|
||
Okay I think I got it. In LayerManagerComposite::EndTransaction the computed mInvalidRegion is zero.
Assignee | ||
Comment 3•11 years ago
|
||
Tom, does this fix the issue?
Attachment #8370410 -
Flags: review?(nical.bugzilla)
Flags: needinfo?(evilpies)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → matt.woodrow
Updated•11 years ago
|
Attachment #8370410 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 4•11 years ago
|
||
Doesn't work for me. I still have to move the mouse.
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(evilpies)
Assignee | ||
Comment 5•11 years ago
|
||
I wish we were more consistent with our naming.
B8G8R8{A|X}8 is the most common format, often called {A}RGB though.
Attachment #8371945 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Tom Schuster [:evilpie] from comment #4)
> Doesn't work for me. I still have to move the mouse.
Interesting. I tested this locally, and the patch works for me.
Updated•11 years ago
|
Attachment #8371945 -
Flags: review?(nical.bugzilla) → review+
Reporter | ||
Comment 7•11 years ago
|
||
Did you test with remote tabs as well? This patch fixed it with just OMTC enabled, but without e10s.
Assignee | ||
Comment 8•11 years ago
|
||
Thanks Tom, that is indeed what I was missing. And wow, what an amazing source of bugs :)
Assignee | ||
Comment 9•11 years ago
|
||
This should help diagnose performance problems with BasicCompositor. If it's flashing more than the areas of the screen that are changing, then we're probably wasting CPU time compositing unchanged pixels.
Attachment #8373075 -
Flags: review?(roc)
Assignee | ||
Comment 10•11 years ago
|
||
BeginTransaction is where we make snapshot the layer tree for comparison, we need all the children of the RefLayer to be available.
Attachment #8373076 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 11•11 years ago
|
||
And now that the children of the RefLayers are available, LayerProperties needs to know to descend into them.
Attachment #8373077 -
Flags: review?(roc)
Assignee | ||
Comment 12•11 years ago
|
||
Again, we need the full layer tree available since this is making modifications to the layer tree which we need to detect.
We can't leave it resolved for the entire time though, since we can end up removing the root layer from the layer manager, and the un-resolve process fails.
Attachment #8373078 -
Flags: review?(nical.bugzilla)
Assignee | ||
Comment 13•11 years ago
|
||
This is a bit gross, better ideas appreciated.
mInvalidRegion is a property that we share across IPDL, but we never call Mutated. Unfortunately we change this value from outside of a layer transaction (from ImageLib calling into nsIFrame::InvalidateLayer), so we can't call Mutated() directly.
Attachment #8373079 -
Flags: review?(roc)
Comment on attachment 8373075 [details] [diff] [review]
Make nglayout.debug.widget_update_flashing work with BasicCompositor
Review of attachment 8373075 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/basic/BasicCompositor.cpp
@@ +608,5 @@
> + float r = float(rand()) / RAND_MAX;
> + float g = float(rand()) / RAND_MAX;
> + float b = float(rand()) / RAND_MAX;
> + mRenderTarget->mDrawTarget->FillRect(ToRect(mInvalidRegion.GetBounds()),
> + ColorPattern(Color(r, g, b, 0.2)));
Seems to me it would be easy, and somewhat better, to just iterate through mInvalidRegion's rects so we get accurate results?
Attachment #8373075 -
Flags: review?(roc) → review-
Attachment #8373077 -
Flags: review?(roc) → review+
Attachment #8373079 -
Flags: review?(roc) → review+
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #14)
> Comment on attachment 8373075 [details] [diff] [review]
> Make nglayout.debug.widget_update_flashing work with BasicCompositor
>
> Review of attachment 8373075 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/layers/basic/BasicCompositor.cpp
> @@ +608,5 @@
> > + float r = float(rand()) / RAND_MAX;
> > + float g = float(rand()) / RAND_MAX;
> > + float b = float(rand()) / RAND_MAX;
> > + mRenderTarget->mDrawTarget->FillRect(ToRect(mInvalidRegion.GetBounds()),
> > + ColorPattern(Color(r, g, b, 0.2)));
>
> Seems to me it would be easy, and somewhat better, to just iterate through
> mInvalidRegion's rects so we get accurate results?
We're currently clipped to mInvalidRegion, so it should be accurate already. I could put this after the PopClip call, and iterate over the rects, but I don't think it's worth it.
Assignee | ||
Comment 16•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a0f3fde9843
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9b18d294464
Whiteboard: [leave open]
Updated•11 years ago
|
Attachment #8373076 -
Flags: review?(nical.bugzilla) → review+
Updated•11 years ago
|
Attachment #8373078 -
Flags: review?(nical.bugzilla) → review+
Comment on attachment 8373075 [details] [diff] [review]
Make nglayout.debug.widget_update_flashing work with BasicCompositor
Review of attachment 8373075 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/basic/BasicCompositor.cpp
@@ +608,5 @@
> + float r = float(rand()) / RAND_MAX;
> + float g = float(rand()) / RAND_MAX;
> + float b = float(rand()) / RAND_MAX;
> + mRenderTarget->mDrawTarget->FillRect(ToRect(mInvalidRegion.GetBounds()),
> + ColorPattern(Color(r, g, b, 0.2)));
OK, just comment here that we're already clipping to mInvalidRegion so drawing the bounds is OK.
Attachment #8373075 -
Flags: review- → review+
Comment 18•11 years ago
|
||
Assignee | ||
Comment 19•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/89753b0b94ca
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb75b644eab0
https://hg.mozilla.org/integration/mozilla-inbound/rev/37ad7918adb5
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a581ddf842b
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c7d4dddd104
Whiteboard: [leave open]
Comment 20•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/89753b0b94ca
https://hg.mozilla.org/mozilla-central/rev/cb75b644eab0
https://hg.mozilla.org/mozilla-central/rev/37ad7918adb5
https://hg.mozilla.org/mozilla-central/rev/8a581ddf842b
https://hg.mozilla.org/mozilla-central/rev/8c7d4dddd104
https://hg.mozilla.org/mozilla-central/rev/9ce7c3a70c13
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Depends on: 972728
You need to log in
before you can comment on or make changes to this bug.
Description
•