Closed Bug 1601531 Opened 4 years ago Closed 4 years ago

Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: gw, Assigned: sotaro)

References

Details

Attachments

(1 file)

No description provided.

Although PREFER_COMPOSITOR_SURFACE is not currently used in WR, it would be good to do the Gecko-side work to annotate images with this field, as appropriate.

A good initial target would be to ensure all video images are tagged with this flag. In future, we may consider it for canvas elements too.

Sotaro, would this be relatively easy to implement?

Flags: needinfo?(sotaro.ikeda.g)

If we do not limit only to video, it is relatively simple. AsyncImagePipelineManager manages all async images(video, canvas, async plugin). TextureHost::ResourceUpdates() call in AsyncImagePipelineManager::UpdateImageKeys() handle all aync external images.

If we do not want canvas, pipeline->mImageHost->GetAsyncRef() could be used to check if image is come from ImageBridge. Video and plugin images come via ImageBridge. Canva image come via WebRenderBridgeParent. In this case, We do not have a way to differentiate video and plugin images. But plugin rendering is similar to video, then it seems ok to handle plugin image similar to video image.

TextureHost::ResourceUpdates() implementation is overridden by each sub class. For example, DXGITextureHostD3D11::PushResourceUpdates(), construct wr::ImageDescriptor.

And it seems that we need to update WrImageDescriptor.

Flags: needinfo?(sotaro.ikeda.g)
Blocks: 1460499

If it's simpler to just apply the tag to all of these types (image, canvas, plugin etc) that should be fine too.

I take the bug.

Assignee: nobody → sotaro.ikeda.g
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93d1dab5bf48
Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: