39 auto context =
info.directContext();
44 imgSurf->getCanvas()->drawColor(0x0000000);
47 m.setScale(0, 0, 0, 127.f);
56 surf->getCanvas()->drawPaint(p);
58 pixels.
alloc(surf->imageInfo());
59 surf->readPixels(pixels, 0, 0);
60 auto error = std::function<ComparePixmapsErrorReporter>(
61 [
reporter](
int x,
int y,
const float diffs[4]) {
62 ERRORF(
reporter,
"Expected transparent black, instead got (%f, %f, %f, %f)",
63 diffs[0], diffs[1], diffs[2], diffs[3]);
65 static constexpr float kTol[] = {0, 0, 0, 0};
const uint8_t uint32_t uint32_t GError ** error
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)