69 {
72 canvas->
drawString(
"This GM only makes sense with color-managed drawing.",
74 return;
75 }
76
78 if (!img) {
79 canvas->
drawString(
"Could not load our test image!",
81 return;
82 }
83
87
92
93 switch (strategy) {
94 case SkImage_makeColorSpace: {
96 } break;
97
98 case SkCanvas_makeSurface: {
101 if (!offscreen) {
102 canvas->
drawString(
"Could not allocate offscreen surface!",
104 return;
105 }
108 } break;
109 }
110
112 }
115 }
116}
void translate(SkScalar dx, SkScalar dy)
sk_sp< SkSurface > makeSurface(const SkImageInfo &info, const SkSurfaceProps *props=nullptr)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
SkImageInfo imageInfo() const
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
virtual sk_sp< SkImage > makeColorSpace(GrDirectContext *direct, sk_sp< SkColorSpace > target) const =0
SkColorSpace * colorSpace() const
sk_sp< SkImage > makeImageSnapshot()
static const skcms_Matrix3x3 gGamuts[]
static const skcms_TransferFunction gTFs[]
font
Font Metadata and Metrics.
SkColorSpace * colorSpace() const
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const