mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1255675. SurfacePipe handles removing the frame rect, so pass the frame rect directly.
This is left over from the pre-SurfacePipe code that interacted directly with the Downscaler. It was calculating the size of the surface for the Downscaler to use, and then the Downscaler would handle putting transparent pixels inside that surface (and outside the framerect). --HG-- extra : rebase_source : aad384fa8589f291254f0a18537a5d6674487182
This commit is contained in:
parent
35c3b97bb4
commit
ce9ddc5a29
@ -205,11 +205,9 @@ nsGIFDecoder2::BeginImageFrame(const IntRect& aFrameRect,
|
||||
Maybe<SurfacePipe> pipe;
|
||||
if (mGIFStruct.images_decoded == 0) {
|
||||
// This is the first frame. We may be downscaling, so compute the target
|
||||
// size and target frame rect.
|
||||
// size.
|
||||
IntSize targetSize = mDownscaler ? mDownscaler->TargetSize()
|
||||
: GetSize();
|
||||
IntRect targetFrameRect = mDownscaler ? IntRect(IntPoint(), targetSize)
|
||||
: aFrameRect;
|
||||
|
||||
// The first frame may be displayed progressively.
|
||||
pipeFlags |= SurfacePipeFlags::PROGRESSIVE_DISPLAY;
|
||||
@ -218,7 +216,7 @@ nsGIFDecoder2::BeginImageFrame(const IntRect& aFrameRect,
|
||||
pipe =
|
||||
SurfacePipeFactory::CreateSurfacePipe(this, mGIFStruct.images_decoded,
|
||||
GetSize(), targetSize,
|
||||
targetFrameRect, format, pipeFlags);
|
||||
aFrameRect, format, pipeFlags);
|
||||
} else {
|
||||
// This is an animation frame (and not the first). To minimize the memory
|
||||
// usage of animations, the image data is stored in paletted form.
|
||||
|
Loading…
x
Reference in New Issue
Block a user