47 if (0 != arraySize % 4) {
49 SkString(
"arraySize must be divisible by 4."));
54 controlPixelData.
resize(arraySize);
55 readBuffer.
resize(arraySize);
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;
76 auto sc = dContext->
priv().
makeSC(std::move(fpView),
info.colorInfo());
80 bool result = sc->readPixels(dContext, readPixmap, {0, 0});
static const SkHalf kMaxIntegerRepresentableInHalfFloatingPoint
static const int HALF_ALPHA_CONTROL_ARRAY_SIZE
static const int HALF_RGBA_CONTROL_ARRAY_SIZE
void runFPTest(skiatest::Reporter *reporter, GrDirectContext *dContext, T min, T max, T epsilon, T maxInt, int arraySize, GrColorType colorType)
GrDirectContextPriv priv()
std::unique_ptr< skgpu::ganesh::SurfaceContext > makeSC(GrSurfaceProxyView readView, const GrColorInfo &)