Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate
Categories
(Core :: Graphics: WebRender, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: gw, Assigned: sotaro)
References
Details
Attachments
(1 file)
Reporter | ||
Comment 1•4 years ago
|
||
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.
Reporter | ||
Comment 2•4 years ago
|
||
Sotaro, would this be relatively easy to implement?
Assignee | ||
Comment 3•4 years ago
•
|
||
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.
Reporter | ||
Comment 4•4 years ago
|
||
If it's simpler to just apply the tag to all of these types (image, canvas, plugin etc) that should be fine too.
Assignee | ||
Comment 6•4 years ago
|
||
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
Comment 8•4 years ago
|
||
bugherder |
Description
•