#include <SkWbmpCodec.h>
|
static bool | IsWbmp (const void *, size_t) |
|
static std::unique_ptr< SkCodec > | MakeFromStream (std::unique_ptr< SkStream >, Result *) |
|
static constexpr size_t | MinBufferedBytesNeeded () |
|
static const char * | ResultToString (Result) |
|
static std::unique_ptr< SkCodec > | MakeFromStream (std::unique_ptr< SkStream >, SkSpan< const SkCodecs::Decoder > decoders, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage) |
|
static std::unique_ptr< SkCodec > | MakeFromStream (std::unique_ptr< SkStream >, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage) |
|
static std::unique_ptr< SkCodec > | MakeFromData (sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr) |
|
static std::unique_ptr< SkCodec > | MakeFromData (sk_sp< SkData >, SkPngChunkReader *=nullptr) |
|
static void | Register (bool(*peek)(const void *, size_t), std::unique_ptr< SkCodec >(*make)(std::unique_ptr< SkStream >, SkCodec::Result *)) |
|
|
SkEncodedImageFormat | onGetEncodedFormat () const override |
|
Result | onGetPixels (const SkImageInfo &, void *, size_t, const Options &, int *) override |
|
bool | onRewind () override |
|
bool | conversionSupported (const SkImageInfo &dst, bool srcIsOpaque, bool needsXform) override |
|
bool | usesColorXform () const override |
|
const SkEncodedInfo & | getEncodedInfo () const |
|
| SkCodec (SkEncodedInfo &&, XformFormat srcFormat, std::unique_ptr< SkStream >, SkEncodedOrigin=kTopLeft_SkEncodedOrigin) |
|
void | setSrcXformFormat (XformFormat pixelFormat) |
|
XformFormat | getSrcXformFormat () const |
|
virtual bool | onGetGainmapInfo (SkGainmapInfo *, std::unique_ptr< SkStream > *) |
|
virtual SkISize | onGetScaledDimensions (float) const |
|
virtual bool | onDimensionsSupported (const SkISize &) |
|
virtual SkEncodedImageFormat | onGetEncodedFormat () const =0 |
|
virtual Result | onGetPixels (const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &, int *rowsDecoded)=0 |
|
virtual bool | onQueryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &, SkYUVAPixmapInfo *) const |
|
virtual Result | onGetYUVAPlanes (const SkYUVAPixmaps &) |
|
virtual bool | onGetValidSubset (SkIRect *) const |
|
bool | rewindIfNeeded () |
|
virtual bool | onRewind () |
|
SkStream * | stream () |
|
virtual SkScanlineOrder | onGetScanlineOrder () const |
|
const SkImageInfo & | dstInfo () const |
|
const Options & | options () const |
|
int | currScanline () const |
|
virtual int | onOutputScanline (int inputScanline) const |
|
virtual bool | conversionSupported (const SkImageInfo &dst, bool srcIsOpaque, bool needsColorXform) |
|
virtual bool | usesColorXform () const |
|
void | applyColorXform (void *dst, const void *src, int count) const |
|
bool | colorXform () const |
|
bool | xformOnDecode () const |
|
virtual int | onGetFrameCount () |
|
virtual bool | onGetFrameInfo (int, FrameInfo *) const |
|
virtual int | onGetRepetitionCount () |
|
|
enum | Result {
kSuccess
, kIncompleteInput
, kErrorInInput
, kInvalidConversion
,
kInvalidScale
, kInvalidParameters
, kInvalidInput
, kCouldNotRewind
,
kInternalError
, kUnimplemented
} |
|
enum class | SelectionPolicy { kPreferStillImage
, kPreferAnimation
} |
|
enum | ZeroInitialized { kYes_ZeroInitialized
, kNo_ZeroInitialized
} |
|
enum | SkScanlineOrder { kTopDown_SkScanlineOrder
, kBottomUp_SkScanlineOrder
} |
|
virtual | ~SkCodec () |
|
SkImageInfo | getInfo () const |
|
SkISize | dimensions () const |
|
SkIRect | bounds () const |
|
const skcms_ICCProfile * | getICCProfile () const |
|
SkEncodedOrigin | getOrigin () const |
|
SkISize | getScaledDimensions (float desiredScale) const |
|
bool | getValidSubset (SkIRect *desiredSubset) const |
|
SkEncodedImageFormat | getEncodedFormat () const |
|
virtual std::unique_ptr< SkStream > | getEncodedData () const |
|
Result | getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes, const Options *) |
|
Result | getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes) |
|
Result | getPixels (const SkPixmap &pm, const Options *opts=nullptr) |
|
std::tuple< sk_sp< SkImage >, SkCodec::Result > | getImage (const SkImageInfo &info, const Options *opts=nullptr) |
|
std::tuple< sk_sp< SkImage >, SkCodec::Result > | getImage () |
|
bool | queryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &supportedDataTypes, SkYUVAPixmapInfo *yuvaPixmapInfo) const |
|
Result | getYUVAPlanes (const SkYUVAPixmaps &yuvaPixmaps) |
|
Result | startIncrementalDecode (const SkImageInfo &dstInfo, void *dst, size_t rowBytes, const Options *) |
|
Result | startIncrementalDecode (const SkImageInfo &dstInfo, void *dst, size_t rowBytes) |
|
Result | incrementalDecode (int *rowsDecoded=nullptr) |
|
Result | startScanlineDecode (const SkImageInfo &dstInfo, const Options *options) |
|
Result | startScanlineDecode (const SkImageInfo &dstInfo) |
|
int | getScanlines (void *dst, int countLines, size_t rowBytes) |
|
bool | skipScanlines (int countLines) |
|
SkScanlineOrder | getScanlineOrder () const |
|
int | nextScanline () const |
|
int | outputScanline (int inputScanline) const |
|
int | getFrameCount () |
|
bool | getFrameInfo (int index, FrameInfo *info) const |
|
std::vector< FrameInfo > | getFrameInfo () |
|
int | getRepetitionCount () |
|
static constexpr int | kNoFrame = -1 |
|
static constexpr int | kRepetitionCountInfinite = -1 |
|
using | XformFormat = skcms_PixelFormat |
|
Definition at line 26 of file SkWbmpCodec.h.
◆ conversionSupported()
bool SkWbmpCodec::conversionSupported |
( |
const SkImageInfo & |
dst, |
|
|
bool |
srcIsOpaque, |
|
|
bool |
needsColorXform |
|
) |
| |
|
overrideprotectedvirtual |
Return whether we can convert to dst.
Will be called for the appropriate frame, prior to initializing the colorXform.
Reimplemented from SkCodec.
Definition at line 119 of file SkWbmpCodec.cpp.
120 {
122}
static bool valid_alpha(SkAlphaType dstAlpha, bool srcIsOpaque)
static bool valid_color_type(const SkImageInfo &dstInfo)
◆ IsWbmp()
bool SkWbmpCodec::IsWbmp |
( |
const void * |
buffer, |
|
|
size_t |
bytesRead |
|
) |
| |
|
static |
Definition at line 154 of file SkWbmpCodec.cpp.
154 {
157}
static bool read_header(SkStream *stream, SkISize *size)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
◆ MakeFromStream()
std::unique_ptr< SkCodec > SkWbmpCodec::MakeFromStream |
( |
std::unique_ptr< SkStream > |
stream, |
|
|
Result * |
result |
|
) |
| |
|
static |
Definition at line 159 of file SkWbmpCodec.cpp.
160 {
164 return nullptr;
165 }
168
169
171 return nullptr;
172 }
177}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static SkEncodedInfo Make(int width, int height, Color color, Alpha alpha, int bitsPerComponent)
◆ onGetEncodedFormat()
◆ onGetPixels()
- Parameters
-
rowsDecoded | When the encoded image stream is incomplete, this function will return kIncompleteInput and rowsDecoded will be set to the number of scanlines that were successfully decoded. This will allow getPixels() to fill the uninitialized memory. |
Implements SkCodec.
Definition at line 124 of file SkWbmpCodec.cpp.
128 {
130
132 }
133
134
138
139
143 for (
int y = 0;
y <
size.height(); ++
y) {
144 if (!this->readRow(
src.get())) {
147 }
148 swizzler->swizzle(dstRow,
src.get());
149 dstRow = SkTAddOffset<void>(dstRow, rowBytes);
150 }
152}
const SkEncodedInfo & getEncodedInfo() const
const Options & options() const
static std::unique_ptr< SkSwizzler > Make(const SkEncodedInfo &encodedInfo, const SkPMColor *ctable, const SkImageInfo &dstInfo, const SkCodec::Options &, const SkIRect *frame=nullptr)
◆ onRewind()
bool SkWbmpCodec::onRewind |
( |
| ) |
|
|
overrideprotectedvirtual |
Called by rewindIfNeeded, if the stream needed to be rewound.
Subclasses should do any set up needed after a rewind.
Reimplemented from SkCodec.
Definition at line 99 of file SkWbmpCodec.cpp.
◆ usesColorXform()
bool SkWbmpCodec::usesColorXform |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
The documentation for this class was generated from the following files: