diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 12:57:17 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 12:57:17 +0100 |
commit | 622098073e132995994fac4d61e3629d08ee1801 (patch) | |
tree | a348124917c22add706fec705f3a185c1f4af567 /image/Decoder.h | |
parent | 807acf738f63d95fbecfb9129092aaa2379889ba (diff) | |
download | UXP-622098073e132995994fac4d61e3629d08ee1801.tar UXP-622098073e132995994fac4d61e3629d08ee1801.tar.gz UXP-622098073e132995994fac4d61e3629d08ee1801.tar.lz UXP-622098073e132995994fac4d61e3629d08ee1801.tar.xz UXP-622098073e132995994fac4d61e3629d08ee1801.zip |
Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods.
Diffstat (limited to 'image/Decoder.h')
-rw-r--r-- | image/Decoder.h | 22 |
1 files changed, 9 insertions, 13 deletions
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<nsIntRect>& 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<AnimationParams>& 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<AnimationParams>& aAnimParams, imgFrame* aPreviousFrame); protected: |