4REG_FIDDLE(Image_isLazyGenerated_a, 256, 80,
false, 0) {
11 const Options&
options)
override {
13 for (
int y = 0;
y <
info.height(); ++
y) {
14 for (
int x = 0;
x <
info.width(); ++
x) {
15 pixels[
y *
info.width() +
x] = 0xff223344 +
y * 0x000C0811;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
REG_FIDDLE(Image_isLazyGenerated_a, 256, 80, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
SkImageGenerator(const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)
virtual bool isLazyGenerated() const =0
~TestImageGenerator() override
TestImageGenerator(TestType type, skiatest::Reporter *reporter, SkColorType colorType=kN32_SkColorType)
bool onGetPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &options) override
sk_sp< SkFontMgr > fontMgr
SK_API sk_sp< SkImage > DeferredFromGenerator(std::unique_ptr< SkImageGenerator > imageGenerator)
sk_sp< const SkImage > image
font
Font Metadata and Metrics.
static SkImageInfo MakeN32Premul(int width, int height)