36 static int Width() {
return 10; }
65 char* bytePtr =
static_cast<char*
>(pixels);
66 switch (
info.colorType()) {
67 case kN32_SkColorType:
68 for (
int y = 0;
y <
info.height(); ++
y) {
75 for (
int y = 0;
y <
info.height(); ++
y) {
105 for (
const SkColorType testColorType : testColorTypes) {
106 auto gen = std::make_unique<TestImageGenerator>(
test, r, testColorType);
108 if (
nullptr ==
image) {
109 ERRORF(r,
"SkImage::NewFromGenerator unexpecedly failed [%zu]",
i);
119 const SkColor kDefaultColor = 0xffabcdef;
120 canvas.
clear(kDefaultColor);
DEF_TEST(Image_NewFromGenerator, r)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kOpaque_SkAlphaType
pixel is opaque
static U16CPU SkPixel32ToPixel16(SkPMColor c)
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
SK_API SkPMColor SkPreMultiplyColor(SkColor c)
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
#define REPORTER_ASSERT(r, cond,...)
void clear(SkColor color)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
const SkImageInfo & getInfo() const
virtual bool isLazyGenerated() const =0
~TestImageGenerator() override
static SkPMColor PMColor()
static SkImageInfo GetMyInfo(SkColorType colorType)
TestImageGenerator(TestType type, skiatest::Reporter *reporter, SkColorType colorType=kN32_SkColorType)
@ kFailGetPixels_TestType
@ kSucceedGetPixels_TestType
bool onGetPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &options) override
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
void(* memset16)(uint16_t[], uint16_t, int)
void(* memset32)(uint32_t[], uint32_t, int)
sk_sp< const SkImage > image
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 SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)