46 {
47 if (0 != arraySize % 4) {
49 SkString(
"arraySize must be divisible by 4."));
50 return;
51 }
52
54 controlPixelData.
resize(arraySize);
55 readBuffer.
resize(arraySize);
56
57 for (int i = 0; i < arraySize; i += 4) {
58 controlPixelData[i + 0] =
min;
59 controlPixelData[i + 1] =
max;
60 controlPixelData[i + 2] = epsilon;
61 controlPixelData[i + 3] = maxInt;
62 }
63
68 GrRenderable::kYes,
69 origin,
70 controlPixmap);
71
72 if (!fpView) {
73 continue;
74 }
75
76 auto sc = dContext->
priv().
makeSC(std::move(fpView),
info.colorInfo());
78
80 bool result = sc->readPixels(dContext, readPixmap, {0, 0});
84 }
85}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kBottomLeft_GrSurfaceOrigin
@ kTopLeft_GrSurfaceOrigin
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
#define REPORTER_ASSERT(r, cond,...)
#define REPORT_FAILURE(reporter, cond, message)
GrDirectContextPriv priv()
std::unique_ptr< skgpu::ganesh::SurfaceContext > makeSC(GrSurfaceProxyView readView, const GrColorInfo &)
size_t size_bytes() const
static float max(float r, float g, float b)
static float min(float r, float g, float b)
GrSurfaceProxyView MakeTextureProxyViewFromData(GrDirectContext *dContext, GrRenderable renderable, GrSurfaceOrigin origin, GrCPixmap pixmap)