summaryrefslogtreecommitdiffstats
path: root/image/Decoder.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-11-21 12:57:17 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-11-21 12:57:17 +0100
commit622098073e132995994fac4d61e3629d08ee1801 (patch)
treea348124917c22add706fec705f3a185c1f4af567 /image/Decoder.h
parent807acf738f63d95fbecfb9129092aaa2379889ba (diff)
downloadUXP-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.h22
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: