Closed Bug 1289105 Opened 3 years ago Closed 3 years ago

Don't use PersistentBufferProviderShared with BasicCompositor.

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: nical, Assigned: nical)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

...Or more precisely, when the FrameLayerBuilder/nsDisplayList consider that compositing is not "cheap". In this case the canvas will most of the time be flattened into the content layer underneath (which amounts to compositing canvas on the content thread rather than the compositor). Since the canvas does not have it's own layer sent to the compositor, drawing in a shared texture is a waste.
Beyond the performance issue, PersistentBufferProviderShared is glitchy in some cases when these layers heuristics kick in. I am still trying to figure out why, probably something related to snapshots. The code was certainly not designed to be used that way.
Blocks: 1285271
Whiteboard: [gfx-noted]
Attachment #8774301 - Attachment description: Don → Don't use PersistentBufferProviderShared if !IsCompositingCheap()
Attachment #8774301 - Attachment is patch: true
Attachment #8774301 - Flags: review?(jnicol)
Comment on attachment 8774301 [details] [diff] [review]
Don't use PersistentBufferProviderShared if !IsCompositingCheap()

Review of attachment 8774301 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/ClientLayerManager.cpp
@@ +849,5 @@
>  ClientLayerManager::CreatePersistentBufferProvider(const gfx::IntSize& aSize,
>                                                     gfx::SurfaceFormat aFormat)
>  {
> +  // Don't use a shared buffer provider if compositing is considered "not cheap"
> +  // because teh canvas will most likely be flattened into a thebes layer instead

typo ("the" instead of "teh")
Attachment #8774301 - Flags: review?(jnicol) → review+
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/64900003b7cc
Don't use use PersistentBufferProviderShared if the canvas layer is unlikely to be chared with the compositor process. r=jnicol
https://hg.mozilla.org/mozilla-central/rev/64900003b7cc
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.