43 return surface->makeImageSnapshot();
80 canvas->
drawRect(dstRect, borderPaint);
93 canvas->
drawRect(dstRect, borderPaint);
101 canvas->
drawRect(dstRect, borderPaint);
106 const char* fBaseName;
112 , fBaseName(baseName)
113 , fManuallyTile(manuallyTile) {}
120 name.append(
"_manual");
126 SkISize getISize()
override {
return {500, 600}; }
128 void onDraw(
SkCanvas* canvas)
override {
129 int veryBig = 65*1024;
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static SkScalar center(float pos0, float pos1)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
void setStyle(Style style)
@ kStroke_Style
set to stroke geometry
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
VeryLargeBitmapGM(ImageMakerProc proc, const char baseName[], bool manuallyTile)
SK_API sk_sp< SkImage > DeferredFromPicture(sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
@ kU8
uses 8-bit unsigned int per color component
sk_sp< const SkImage > image
PODArray< SkColor > colors
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
void DrawImage(SkCanvas *canvas, const SkImage *image, SkScalar x, SkScalar y, const SkSamplingOptions &sampling={}, const SkPaint *paint=nullptr, SkCanvas::SrcRectConstraint constraint=SkCanvas::kFast_SrcRectConstraint)
SK_API void DrawImageRect(SkCanvas *canvas, const SkImage *image, const SkRect &src, const SkRect &dst, const SkSamplingOptions &sampling={}, const SkPaint *paint=nullptr, SkCanvas::SrcRectConstraint constraint=SkCanvas::kFast_SrcRectConstraint)
DEF_SWITCHES_START aot vmservice shared library name
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect MakeIWH(int w, int h)
void offset(float dx, float dy)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
static void show_image(SkCanvas *canvas, int width, int height, SkColor colors[2], ImageMakerProc proc, bool manuallyTile)
static void draw(SkCanvas *canvas, int width, int height, SkColor colors[2])
sk_sp< SkImage >(* ImageMakerProc)(int width, int height, SkColor colors[2])
static sk_sp< SkImage > make_raster_image(int width, int height, SkColor colors[2])
static sk_sp< SkImage > make_picture_image(int width, int height, SkColor colors[2])
DEF_GM(return new VeryLargeBitmapGM(make_raster_image, "verylargebitmap", false);) DEF_GM(return new VeryLargeBitmapGM(make_raster_image