Closed Bug 1356960 Opened 7 years ago Closed 7 years ago

Avoid to allocate WebRenderTextureHost for TextureHost of VideoBridgeParent and VRManagerParent

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

WebRenderTextureHost is created for TextureHosts of VideoBridgeParent and VRManagerParent. It is not necessary.
Assignee: nobody → sotaro.ikeda.g
Blocks: 1356954
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> WebRenderTextureHost is created for TextureHosts of VideoBridgeParent and
> VRManagerParent. It is not necessary.

We need to wrap only TextureHosts of ImageBridgeParent and CompositorBridgeParentBase.
Attachment #8858724 - Flags: review?(hshih)
Blocks: 1356944
Comment on attachment 8858724 [details] [diff] [review]
patch - Avoid to allocate WebRenderTextureHost for TextureHost of VideoBridgeParent and VRManagerParent

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

::: gfx/layers/composite/TextureHost.cpp
@@ +96,5 @@
>  {
>    if (!gfxVars::UseWebRender() ||
>        (aFlags & TextureFlags::SNAPSHOT) ||
> +      (aBackend != LayersBackend::LAYERS_WR) ||
> +      (!aDeallocator->UsesImageBridge() && !aDeallocator->AsCompositorBridgeParentBase())) {

VRManagerParent:
UseImageBridge(): false
AsCompositorBridgeParentBase(): nullptr

VideoBridgeParent:
UseImageBridge(): false
AsCompositorBridgeParentBase(): nullptr

CompositorBridgeParent:
UseImageBridge(): false
AsCompositorBridgeParentBase(): this

ImageBridgeParent:
UseImageBridge(): true
AsCompositorBridgeParentBase(): nullptr
Attachment #8858724 - Flags: review?(hshih) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/f3878c1cd4d9
Avoid to allocate WebRenderTextureHost for TextureHost of VideoBridgeParent and VRManagerParent r=jerry
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: