Bug 1339202 - Decode images to shared surfaces for WebRender. r=tnikkel
This commit is contained in:
@@ -479,7 +479,7 @@ NS_IMETHODIMP_(already_AddRefed<SourceSurface>)
|
||||
RasterImage::GetFrame(uint32_t aWhichFrame,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
return GetFrameInternal(mSize, aWhichFrame, aFlags).second().forget();
|
||||
return GetFrameAtSize(mSize, aWhichFrame, aFlags);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(already_AddRefed<SourceSurface>)
|
||||
@@ -487,7 +487,12 @@ RasterImage::GetFrameAtSize(const IntSize& aSize,
|
||||
uint32_t aWhichFrame,
|
||||
uint32_t aFlags)
|
||||
{
|
||||
return GetFrameInternal(aSize, aWhichFrame, aFlags).second().forget();
|
||||
RefPtr<SourceSurface> surf =
|
||||
GetFrameInternal(aSize, aWhichFrame, aFlags).second().forget();
|
||||
// If we are here, it suggests the image is embedded in a canvas or some
|
||||
// other path besides layers, and we won't need the file handle.
|
||||
MarkSurfaceShared(surf);
|
||||
return surf.forget();
|
||||
}
|
||||
|
||||
Pair<DrawResult, RefPtr<SourceSurface>>
|
||||
|
||||
Reference in New Issue
Block a user