8#ifndef TestUtils_DEFINED
9#define TestUtils_DEFINED
29namespace skiatest {
class Reporter; }
39 uint32_t expectedPixelValues[],
57 uint32_t expectedPixelValues[],
83 const float tolRGBA[4],
84 std::function<ComparePixmapsErrorReporter>&
error);
91 const float tolRGBA[4],
92 std::function<ComparePixmapsErrorReporter>&
error);
100 int32_t expectedProxyRefs,
101 int32_t expectedBackingRefs);
@ kTopLeft_GrSurfaceOrigin
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
void TestReadPixels(skiatest::Reporter *, GrDirectContext *, skgpu::ganesh::SurfaceContext *, uint32_t expectedPixelValues[], const char *testName)
void(int x, int y, const float diffs[4]) ComparePixmapsErrorReporter
std::unique_ptr< skgpu::ganesh::SurfaceContext > CreateSurfaceContext(GrRecordingContext *, const GrImageInfo &, SkBackingFit=SkBackingFit::kExact, GrSurfaceOrigin=kTopLeft_GrSurfaceOrigin, GrRenderable=GrRenderable::kNo, int sampleCount=1, skgpu::Mipmapped=skgpu::Mipmapped::kNo, GrProtected=GrProtected::kNo, skgpu::Budgeted=skgpu::Budgeted::kYes)
void CheckSingleThreadedProxyRefs(skiatest::Reporter *reporter, GrSurfaceProxy *proxy, int32_t expectedProxyRefs, int32_t expectedBackingRefs)
void TestWritePixels(skiatest::Reporter *, GrDirectContext *, skgpu::ganesh::SurfaceContext *, bool expectedToWork, const char *testName)
void TestCopyFromSurface(skiatest::Reporter *, GrDirectContext *, sk_sp< GrSurfaceProxy > proxy, GrSurfaceOrigin origin, GrColorType colorType, uint32_t expectedPixelValues[], const char *testName)
bool ComparePixels(const GrCPixmap &a, const GrCPixmap &b, const float tolRGBA[4], std::function< ComparePixmapsErrorReporter > &error)
bool CheckSolidPixels(const SkColor4f &col, const SkPixmap &pixmap, const float tolRGBA[4], std::function< ComparePixmapsErrorReporter > &error)
const uint8_t uint32_t uint32_t GError ** error