Closed
Bug 782786
Opened 13 years ago
Closed 13 years ago
Compositing of WebGL canvases on B2G intermittently flickers / disappears
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
Attachments
(3 files)
2.68 KB,
patch
|
BenWa
:
review-
|
Details | Diff | Splinter Review |
485 bytes,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
2.14 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
Happens on most WebGL pages, e.g.
http://people.mozilla.org/~bjacob/webgl-spotlight-js-2012/webgltriangle.html
When it disappears, panning around usually makes it reapper. When that doesn't work, the likely cause is one's running into bug 782785 instead.
Assignee | ||
Updated•13 years ago
|
Component: Canvas: WebGL → Graphics
OS: Linux → Gonk
Hardware: x86_64 → ARM
Assignee | ||
Comment 1•13 years ago
|
||
To understand why there is sometimes flickering while panning around on the page in comment 0, I put a printf in BasicCanvasLayer::UpdateSurface and in WebGLContext::GetCanvasLayer.
Notice that this page renders once and never again afterwards.
When panning around works fine, these functions don't get called.
When flickering occurs, these functions get called.
In the situation when one is panning around a canvas that hasn't been changed since the last compositing, when should / shouldn't these functions be called?
Assignee | ||
Comment 2•13 years ago
|
||
stack trace to these updatesurface calls:
#0 mozilla::layers::BasicCanvasLayer::UpdateSurface (this=0x4419e9e0,
aDestSurface=0x44e85f40, aMaskLayer=0x0)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicCanvasLayer.cpp:123
#1 0x41a1ae3a in mozilla::layers::BasicShadowableCanvasLayer::Paint (this=0x4419e9e0,
aContext=0x4587ca90, aMaskLayer=0x0)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicCanvasLayer.cpp:450
#2 0x41a1779e in mozilla::layers::BasicLayerManager::PaintLayer (this=0x44cd8740,
aTarget=0x4587ca90, aLayer=0x4419e9e0,
aCallback=0x4069abc1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>,
aCallbackData=0xbee7a50c, aReadback=0xbee79f6c)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicLayerManager.cpp:842
#3 0x41a17830 in mozilla::layers::BasicLayerManager::PaintLayer (this=0x44cd8740,
aTarget=0x4587ca90, aLayer=0x44c8ec00,
aCallback=0x4069abc1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>,
aCallbackData=0xbee7a50c, aReadback=0x0)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicLayerManager.cpp:855
#4 0x41a162b8 in mozilla::layers::BasicLayerManager::EndTransactionInternal (
this=0x44cd8740,
aCallback=0x4069abc1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>,
aCallbackData=0xbee7a50c, aFlags=mozilla::layers::LayerManager::END_NO_COMPOSITE)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicLayerManager.cpp:474
#5 0x41a15d38 in mozilla::layers::BasicLayerManager::EndTransaction (this=0x44cd8740,
aCallback=0x4069abc1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>,
aCallbackData=0xbee7a50c, aFlags=mozilla::layers::LayerManager::END_NO_COMPOSITE)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicLayerManager.cpp:399
#6 0x41a182c4 in mozilla::layers::BasicShadowLayerManager::EndTransaction (
this=0x44cd8740,
aCallback=0x4069abc1 <mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, nsIntRegion const&, void*)>,
aCallbackData=0xbee7a50c, aFlags=mozilla::layers::LayerManager::END_NO_COMPOSITE)
at /hack/b2g/B2G/gecko/gfx/layers/basic/BasicLayerManager.cpp:1053
#7 0x406e14c6 in nsDisplayList::PaintForFrame (this=0xbee7a8f0, aBuilder=0xbee7a50c,
aCtx=0x0, aForFrame=0x450c6418, aFlags=13)
at /hack/b2g/B2G/gecko/layout/base/nsDisplayList.cpp:1038
#8 0x406e0fd4 in nsDisplayList::PaintRoot (this=0xbee7a8f0, aBuilder=0xbee7a50c,
aCtx=0x0, aFlags=13) at /hack/b2g/B2G/gecko/layout/base/nsDisplayList.cpp:938
#9 0x40709bf2 in nsLayoutUtils::PaintFrame (aRenderingContext=0x0, aFrame=0x450c6418,
aDirtyRegion=..., aBackstop=4294967295, aFlags=772)
Updated•13 years ago
|
Attachment #654381 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
Assignee: nobody → bjacob
Target Milestone: --- → mozilla17
Assignee | ||
Comment 6•13 years ago
|
||
backed out in c95b9d40a173 for reftest failure
Assignee | ||
Comment 7•13 years ago
|
||
Assignee | ||
Comment 8•13 years ago
|
||
Still reftest failure. The failures are that nothing gets drawn. BenWa, do you understand why even the smaller patch https://hg.mozilla.org/try/rev/d87960507531 would have this effect?
Assignee | ||
Comment 9•13 years ago
|
||
We still dont understand the central issue here: why would these repaints cause flickering?
Assignee | ||
Comment 10•13 years ago
|
||
OK, this seems to work: just the Shadowable part is enough to fix the flickering on B2G, and does not affect desktop linux. Too bad that we still don't understand the reason why painting causes flickering, but at least a fix is in sight...
https://tbpl.mozilla.org/?tree=Try&rev=76372e01ba2f
Assignee | ||
Comment 11•13 years ago
|
||
Attachment #655612 -
Flags: review?(bgirard)
Comment 12•13 years ago
|
||
Comment on attachment 654381 [details] [diff] [review]
avoid UpdateSurface of non-dirty canvases
Review of attachment 654381 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/basic/BasicCanvasLayer.cpp
@@ +228,5 @@
>
> void
> BasicCanvasLayer::Paint(gfxContext* aContext, Layer* aMaskLayer)
> {
> + if (!mDirty)
I missed this but this change is certainly wrong. We want to paint the layer but we do want to skip the UpdateSurface below if we're not dirty.
Attachment #654381 -
Flags: review+ → review-
Comment 13•13 years ago
|
||
Comment on attachment 655612 [details] [diff] [review]
just the Shadowable part
I'm fine with this change but I think I found the problem in your original patch.
Attachment #655612 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 14•13 years ago
|
||
Attachment #655671 -
Flags: review?(bgirard)
Assignee | ||
Comment 15•13 years ago
|
||
Updated•13 years ago
|
Attachment #655671 -
Flags: review?(bgirard) → review+
Comment 16•13 years ago
|
||
\o/ Passes try
Assignee | ||
Updated•13 years ago
|
Target Milestone: mozilla17 → mozilla18
Assignee | ||
Comment 17•13 years ago
|
||
Is Gecko 17 still the target for the initial B2G release? If yes, we need aurora approval.
Comment 18•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•