Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
SkCodec::Options Struct Reference

#include <SkCodec.h>

Inheritance diagram for SkCodec::Options:
SkAndroidCodec::AndroidOptions

Public Member Functions

 Options ()
 

Public Attributes

ZeroInitialized fZeroInitialized
 
const SkIRectfSubset
 
int fFrameIndex
 
int fPriorFrame
 

Detailed Description

Additional options to pass to getPixels.

Definition at line 321 of file SkCodec.h.

Constructor & Destructor Documentation

◆ Options()

SkCodec::Options::Options ( )
inline

Definition at line 322 of file SkCodec.h.

324 , fSubset(nullptr)
325 , fFrameIndex(0)
327 {}
@ kNo_ZeroInitialized
Definition: SkCodec.h:315
static constexpr int kNoFrame
Definition: SkCodec.h:650
const SkIRect * fSubset
Definition: SkCodec.h:347
ZeroInitialized fZeroInitialized
Definition: SkCodec.h:329

Member Data Documentation

◆ fFrameIndex

int SkCodec::Options::fFrameIndex

The frame to decode.

Only meaningful for multi-frame images.

Definition at line 354 of file SkCodec.h.

◆ fPriorFrame

int SkCodec::Options::fPriorFrame

If not kNoFrame, the dst already contains the prior frame at this index.

Only meaningful for multi-frame images.

If fFrameIndex needs to be blended with a prior frame (as reported by getFrameInfo[fFrameIndex].fRequiredFrame), the client can set this to any non-kRestorePrevious frame in [fRequiredFrame, fFrameIndex) to indicate that that frame is already in the dst. Options.fZeroInitialized is ignored in this case.

If set to kNoFrame, the codec will decode any necessary required frame(s) first.

Definition at line 369 of file SkCodec.h.

◆ fSubset

const SkIRect* SkCodec::Options::fSubset

If not NULL, represents a subset of the original image to decode. Must be within the bounds returned by getInfo(). If the EncodedFormat is SkEncodedImageFormat::kWEBP (the only one which currently supports subsets), the top and left values must be even.

In getPixels and incremental decode, we will attempt to decode the exact rectangular subset specified by fSubset.

In a scanline decode, it does not make sense to specify a subset top or subset height, since the client already controls which rows to get and which rows to skip. During scanline decodes, we will require that the subset top be zero and the subset height be equal to the full height. We will, however, use the values of subset left and subset width to decode partial scanlines on calls to getScanlines().

Definition at line 347 of file SkCodec.h.

◆ fZeroInitialized

ZeroInitialized SkCodec::Options::fZeroInitialized

Definition at line 329 of file SkCodec.h.


The documentation for this struct was generated from the following file: