Skip to content
Snippets Groups Projects
Commit b222cc8f authored by sotaro's avatar sotaro
Browse files

Bug 1900677 - Recycle DataSourceSurface allocated in...

Bug 1900677 - Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible r=gfx-reviewers,lsalzman

Add a capability to reuse used DataSourceSurface that was previously used for storing converted video data. The format of converted video's DataSourceSurface is always SurfaceFormat::B8G8R8X8 in this case. Therefore, there is no need to care about transparency during recycling.

When recycled, one last reference is owned by mUsedDataSurfaceForSurfaceDescriptor.

Add argument gfx::DataSourceSurface* aSurface to TextureHost::GetAsSurface(). aSurface may be used as returned DataSourceSurfacefi the TextureHost supports it.

ImageDataSerializer::DataSourceSurfaceFromYCbCrDescriptor() already supports to provide a pre-allocated DataSourceSurface as an argument. CreateSourceSurfaceFromMacIOSurface() is extended to support a pre-allocated DataSourceSurface as an argument.

Differential Revision: https://phabricator.services.mozilla.com/D212608
parent abdd7e09
No related branches found
No related tags found
No related merge requests found
Showing
with 104 additions and 31 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment