From 622098073e132995994fac4d61e3629d08ee1801 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 21 Nov 2018 12:57:17 +0100 Subject: Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods. --- image/Decoder.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'image/Decoder.h') diff --git a/image/Decoder.h b/image/Decoder.h index 065a3c213..ed0c19687 100644 --- a/image/Decoder.h +++ b/image/Decoder.h @@ -11,6 +11,7 @@ #include "mozilla/Maybe.h" #include "mozilla/NotNull.h" #include "mozilla/RefPtr.h" +#include "AnimationParams.h" #include "DecodePool.h" #include "DecoderFlags.h" #include "Downscaler.h" @@ -28,6 +29,8 @@ namespace Telemetry { namespace image { +class imgFrame; + struct DecoderFinalStatus final { DecoderFinalStatus(bool aWasMetadataDecode, @@ -443,11 +446,7 @@ protected: // Specify whether this frame is opaque as an optimization. // For animated images, specify the disposal, blend method and timeout for // this frame. - void PostFrameStop(Opacity aFrameOpacity = Opacity::SOME_TRANSPARENCY, - DisposalMethod aDisposalMethod = DisposalMethod::KEEP, - FrameTimeout aTimeout = FrameTimeout::Forever(), - BlendMethod aBlendMethod = BlendMethod::OVER, - const Maybe& aBlendRect = Nothing()); + void PostFrameStop(Opacity aFrameOpacity = Opacity::SOME_TRANSPARENCY); /** * Called by the decoders when they have a region to invalidate. We may not @@ -476,16 +475,13 @@ protected: /** * Allocates a new frame, making it our current frame if successful. * - * The @aFrameNum parameter only exists as a sanity check; it's illegal to - * create a new frame anywhere but immediately after the existing frames. - * * If a non-paletted frame is desired, pass 0 for aPaletteDepth. */ - nsresult AllocateFrame(uint32_t aFrameNum, - const gfx::IntSize& aOutputSize, + nsresult AllocateFrame(const gfx::IntSize& aOutputSize, const gfx::IntRect& aFrameRect, gfx::SurfaceFormat aFormat, - uint8_t aPaletteDepth = 0); + uint8_t aPaletteDepth = 0, + const Maybe& aAnimParams = Nothing()); private: /// Report that an error was encountered while decoding. @@ -509,11 +505,11 @@ private: return mInFrame ? mFrameCount - 1 : mFrameCount; } - RawAccessFrameRef AllocateFrameInternal(uint32_t aFrameNum, - const gfx::IntSize& aOutputSize, + RawAccessFrameRef AllocateFrameInternal(const gfx::IntSize& aOutputSize, const gfx::IntRect& aFrameRect, gfx::SurfaceFormat aFormat, uint8_t aPaletteDepth, + const Maybe& aAnimParams, imgFrame* aPreviousFrame); protected: -- cgit v1.2.3