49 :
"images/color_wheel.png";
61 bitmap->allocPixels(dstInfo);
62 codec->getPixels(dstInfo,
bitmap->getPixels(),
bitmap->rowBytes());
97 const char*
format =
nullptr;
98 switch (fEncodedFormat) {
119#if !defined(SK_ENABLE_NDK_IMAGES)
153 using INHERITED =
GM;
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
sk_sp< SkData > GetResourceAsData(const char *resource)
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SK_ABORT(message,...)
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
static SkString resource(SkPDFResourceType type, int index)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
void translate(SkScalar dx, SkScalar dy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static std::unique_ptr< SkCodec > MakeFromData(sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr)
static sk_sp< SkColorSpace > MakeSRGB()
sk_sp< SkData > detachAsData()
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
EncodeSRGBGM(SkEncodedImageFormat format)
GM(SkColor backgroundColor=SK_ColorWHITE)
uint32_t uint32_t * format
SK_API sk_sp< SkImage > DeferredFromEncodedData(sk_sp< SkData > encoded, std::optional< SkAlphaType > alphaType=std::nullopt)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
sk_sp< const SkImage > image
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
static void make(SkBitmap *bitmap, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace)
static const int imageHeight
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static sk_sp< SkData > encode_data(const SkBitmap &bitmap, SkEncodedImageFormat format)
static const int imageWidth
static constexpr SkISize Make(int32_t w, int32_t h)
SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
SkImageInfo makeColorType(SkColorType newColorType) const
std::shared_ptr< const fml::Mapping > data