diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 16:28:53 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 16:28:53 +0100 |
commit | a3da925495ab64a3baa69aac4ae35d848a865616 (patch) | |
tree | b91d7275cb8d80b7465425e614c823c06dfca100 /image/SurfacePipeFactory.h | |
parent | 6a9c2be4eac174c1b44ffb0ff16fd32fca92aa18 (diff) | |
parent | 25f4c75d68629a26cbb5433975027cd691a18dd7 (diff) | |
download | UXP-a3da925495ab64a3baa69aac4ae35d848a865616.tar UXP-a3da925495ab64a3baa69aac4ae35d848a865616.tar.gz UXP-a3da925495ab64a3baa69aac4ae35d848a865616.tar.lz UXP-a3da925495ab64a3baa69aac4ae35d848a865616.tar.xz UXP-a3da925495ab64a3baa69aac4ae35d848a865616.zip |
Merge branch 'webp-update'
Diffstat (limited to 'image/SurfacePipeFactory.h')
-rw-r--r-- | image/SurfacePipeFactory.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/image/SurfacePipeFactory.h b/image/SurfacePipeFactory.h index ff53fec5c..4571f2e13 100644 --- a/image/SurfacePipeFactory.h +++ b/image/SurfacePipeFactory.h @@ -70,8 +70,6 @@ public: * * @param aDecoder The decoder whose current frame the SurfacePipe will write * to. - * @param aFrameNum Which frame the SurfacePipe will write to. This will be 0 - * for non-animated images. * @param aInputSize The original size of the image. * @param aOutputSize The size the SurfacePipe should output. Must be the same * as @aInputSize or smaller. If smaller, the image will be @@ -79,6 +77,7 @@ public: * @param aFrameRect The portion of the image that actually contains data. * @param aFormat The surface format of the image; generally B8G8R8A8 or * B8G8R8X8. + * @param aAnimParams Extra parameters used by animated images. * @param aFlags Flags enabling or disabling various functionality for the * SurfacePipe; see the SurfacePipeFlags documentation for more * information. @@ -89,11 +88,11 @@ public: */ static Maybe<SurfacePipe> CreateSurfacePipe(Decoder* aDecoder, - uint32_t aFrameNum, const nsIntSize& aInputSize, const nsIntSize& aOutputSize, const nsIntRect& aFrameRect, gfx::SurfaceFormat aFormat, + const Maybe<AnimationParams>& aAnimParams, SurfacePipeFlags aFlags) { const bool deinterlace = bool(aFlags & SurfacePipeFlags::DEINTERLACE); @@ -125,8 +124,8 @@ public: ADAM7InterpolatingConfig interpolatingConfig; RemoveFrameRectConfig removeFrameRectConfig { aFrameRect }; DownscalingConfig downscalingConfig { aInputSize, aFormat }; - SurfaceConfig surfaceConfig { aDecoder, aFrameNum, aOutputSize, - aFormat, flipVertically }; + SurfaceConfig surfaceConfig { aDecoder, aOutputSize, aFormat, + flipVertically, aAnimParams }; Maybe<SurfacePipe> pipe; @@ -181,13 +180,12 @@ public: * * @param aDecoder The decoder whose current frame the SurfacePipe will write * to. - * @param aFrameNum Which frame the SurfacePipe will write to. This will be 0 - * for non-animated images. * @param aInputSize The original size of the image. * @param aFrameRect The portion of the image that actually contains data. * @param aFormat The surface format of the image; generally B8G8R8A8 or * B8G8R8X8. * @param aPaletteDepth The palette depth of the image. + * @param aAnimParams Extra parameters used by animated images. * @param aFlags Flags enabling or disabling various functionality for the * SurfacePipe; see the SurfacePipeFlags documentation for more * information. @@ -198,11 +196,11 @@ public: */ static Maybe<SurfacePipe> CreatePalettedSurfacePipe(Decoder* aDecoder, - uint32_t aFrameNum, const nsIntSize& aInputSize, const nsIntRect& aFrameRect, gfx::SurfaceFormat aFormat, uint8_t aPaletteDepth, + const Maybe<AnimationParams>& aAnimParams, SurfacePipeFlags aFlags) { const bool deinterlace = bool(aFlags & SurfacePipeFlags::DEINTERLACE); @@ -211,9 +209,9 @@ public: // Construct configurations for the SurfaceFilters. DeinterlacingConfig<uint8_t> deinterlacingConfig { progressiveDisplay }; - PalettedSurfaceConfig palettedSurfaceConfig { aDecoder, aFrameNum, aInputSize, - aFrameRect, aFormat, aPaletteDepth, - flipVertically }; + PalettedSurfaceConfig palettedSurfaceConfig { aDecoder, aInputSize, aFrameRect, + aFormat, aPaletteDepth, + flipVertically, aAnimParams }; Maybe<SurfacePipe> pipe; @@ -229,7 +227,7 @@ public: private: template <typename... Configs> static Maybe<SurfacePipe> - MakePipe(Configs... aConfigs) + MakePipe(const Configs&... aConfigs) { auto pipe = MakeUnique<typename detail::FilterPipeline<Configs...>::Type>(); nsresult rv = pipe->Configure(aConfigs...); |