Closed
Bug 1293908
Opened 8 years ago
Closed 8 years ago
Flickering on mac with Basic Layers
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
VERIFIED
FIXED
mozilla51
People
(Reporter: BenWa, Assigned: gw280)
References
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
patch
|
nical
:
review+
ritu
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
I get flickering on mac with basic layers. Appears to be when scrolling and happens frequently in the Youtube playback controls:
https://www.youtube.com/watch?v=nJEOAP-iWY8&feature=youtu.be
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(bgirard)
Reporter | ||
Comment 1•8 years ago
|
||
Regression windows points to bug 1176011.
Blocks: 1176011
Flags: needinfo?(bgirard) → needinfo?(gwright)
Reporter | ||
Comment 2•8 years ago
|
||
A better test case is pan and resize on youtube.com
Updated•8 years ago
|
Assignee: nobody → gwright
status-firefox50:
--- → affected
Keywords: regression
Version: unspecified → 50 Branch
Assignee | ||
Comment 3•8 years ago
|
||
Quick update, as I've been silent thus far. I am currently working on this. It looks similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1265873 and I've confirmed it's a regression from my patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1176011.
I thought I had a solution, but it turned out to not work :(
Back to the code I go...
Flags: needinfo?(gwright)
Assignee | ||
Comment 4•8 years ago
|
||
Also, for posterity; this affects Safe Mode for OS X so it's more important than it would seem to a casual observer.
Comment 5•8 years ago
|
||
It was easier to reproduce the problem when e10s was disabled.
Comment 6•8 years ago
|
||
On tiled layer, ReadUnlock() in BufferTextureHost::MaybeUpload() seems to break the locking logic.
When I commented out it, the flicker seems to be addressed.
Comment 7•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro PTO & offline 10/Aug-15/Aug] from comment #6)
> On tiled layer, ReadUnlock() in BufferTextureHost::MaybeUpload() seems to
> break the locking logic.
> When I commented out it, the flicker seems to be addressed.
https://dxr.mozilla.org/mozilla-central/source/gfx/layers/composite/TextureHost.cpp#813
Updated•8 years ago
|
Comment 9•8 years ago
|
||
HasIntermediateBuffer should be false. With basic compositor, BufferTextureData has non-IntermediateBuffer by Bug 1250500. But it HasIntermediateBuffer was true.
Updated•8 years ago
|
Comment 10•8 years ago
|
||
When shared pool was used, aAllocator->AsCompositableForwarder() was nullptr. Then hasIntermediateBuffer became true.
Updated•8 years ago
|
Flags: needinfo?(nical.bugzilla)
Comment 11•8 years ago
|
||
Hmm, when BufferTextureData was allocated by CompositorBridgeChild. we do not know the compositor backend type. It could be different on each compositor.
Comment 12•8 years ago
|
||
(In reply to Sotaro Ikeda [:sotaro] from comment #11)
> Hmm, when BufferTextureData was allocated by CompositorBridgeChild. we do
> not know the compositor backend type. It could be different on each
> compositor.
This is a problem.
We should make it possible by design to use the same TextureClient/Host with multiple compositor Backend. It could kind of work with buffer texture (but in fact it doesn't work), and it clearly does not work with more complicated texture types.
The recycling logic should take the compositor backend into account in all cases, but this also an issue more generally for things that allocate textures without knowing about the compositor backend (I think that some of the video code paths have this issue). It's very bug-prone and probably mostly work by chance.
Assignee | ||
Comment 13•8 years ago
|
||
Attachment #8781648 -
Flags: review?(nical.bugzilla)
Comment 14•8 years ago
|
||
Comment on attachment 8781648 [details] [diff] [review]
0001-Bug-1293908-Specify-the-LayersBackend-to-be-used-whe.patch
Review of attachment 8781648 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/BufferTexture.cpp
@@ +483,5 @@
> }
>
> auto fwd = aAllocator ? aAllocator->AsCompositableForwarder() : nullptr;
> + bool hasIntermediateBuffer;
> + if (aLayersBackend == LayersBackend::LAYERS_NONE) {
Is there a way to write this in a way that aLayersBackend is never LAYERS_NONE? Creating a texture without knowing the compositor backend is not a good thing, so we should be able to change this into an assertion that fwd->GetCompositorBackendType() == aLayersBackend, rather than pick whichever of the two gives us something interesting.
Or at least in the short term make it so we can assume that if aLayersBackend is NONE, then aFwd is null because we should have passed that information higher up the stack.
Attachment #8781648 -
Flags: review?(nical.bugzilla) → review+
Comment 15•8 years ago
|
||
Pushed by gwright@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b4c4fd433a9
Specify the LayersBackend to be used when creating Textures r=nical
Comment 16•8 years ago
|
||
Backed out for blowing up Linux64 tests.
https://treeherder.mozilla.org/logviewer.html#?job_id=34363386&repo=mozilla-inbound#L2338
https://hg.mozilla.org/integration/mozilla-inbound/rev/ca51bc087957
Assignee | ||
Comment 17•8 years ago
|
||
Heh, it looks like what happened here is that between my try run and landing, Andrew landed a change to turn on GL layers by default in Nightly. Apparently my patch broke GL layers with Linux.
So glad we have tests for that now! :)
Comment 18•8 years ago
|
||
Pushed by gwright@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f9dfb9c04270
Specify the LayersBackend to be used when creating Textures r=nical
Assignee | ||
Comment 19•8 years ago
|
||
Nical, I opted for option 2) in your review where we assert if aLayersBackend is NONE, then aFwd is null.
Comment 20•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Comment 21•8 years ago
|
||
George, this is in the list of beta50 regressions (fixed in 51), want to request an uplift?
Flags: needinfo?(gwright)
Assignee | ||
Comment 22•8 years ago
|
||
Comment on attachment 8781648 [details] [diff] [review]
0001-Bug-1293908-Specify-the-LayersBackend-to-be-used-whe.patch
Approval Request Comment
[Feature/regressing bug #]: bug 1176011.
[User impact if declined]: flickering when scrolling on OS X when basic layers is active (mostly impacts safe moode).
[Describe test coverage new/current, TreeHerder]: it's been in Nightly for a month now.
[Risks and why]: hard to assess, but I'd say low-to-medium risk as the changes are fairly straightforward, and it's been fine on Nightly for a long time.
[String/UUID change made/needed]: none
Flags: needinfo?(gwright)
Attachment #8781648 -
Flags: approval-mozilla-beta?
Hello Ben, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(b56girard)
Comment on attachment 8781648 [details] [diff] [review]
0001-Bug-1293908-Specify-the-LayersBackend-to-be-used-whe.patch
This fix has stabilized on Nightly51 for a month, seems stable to uplift to Beta50.
Attachment #8781648 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 25•8 years ago
|
||
bugherder uplift |
Updated•8 years ago
|
Flags: qe-verify+
Comment 26•8 years ago
|
||
I didn't managed to reproduce this bug entirely, on Mac OS X 10.11.6 using an old Nightly build.
I verified this issue on 50.0b7 (2016-10-13) and 51.0a2 (2016-10-14) and tried different scenarios, like Bennoit said, in comment 0 and comment 2. I think is safe to say that this issue is verified fixed, due the fact that I didn't encountered or seen flickering issues anymore on Youtube.
The test were performed on Mac OS X 10.11.6. If you have any concerns please let me know.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Reporter | ||
Updated•8 years ago
|
Flags: needinfo?(b56girard)
You need to log in
before you can comment on or make changes to this bug.
Description
•