mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Bug 1462355 - Part 1b. Update Decoder and SurfacePipe plumbing to use updated imgFrame methods.
This commit is contained in:
parent
75cb341c44
commit
a08160ac44
15 changed files with 84 additions and 92 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue