Closed Bug 1601531 Opened 3 months ago Closed 3 months ago

Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate


(Core :: Graphics: WebRender, enhancement)

Not set



Tracking Status
firefox73 --- fixed


(Reporter: gw, Assigned: sotaro)


(Blocks 1 open bug)



(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
Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.