35 for (
int x = 0;
x < 1000 &&
result; ++
x) {
36 const uint32_t srcPixel = *
bitmap.getAddr32(
x, 0);
38 ERRORF(
reporter,
"Expected color of Green, but got 0x%08x, at pixel (%d, 0).",
50 auto context = ctxInfo.directContext();
51 GrGpu* gpu = context->priv().getGpu();
76 for (
int i = 0;
i < 1000; ++
i) {
91 context->flushAndSubmit();
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(OpsTaskFlushCount, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
static bool check_read(skiatest::Reporter *reporter, const SkBitmap &bitmap)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
#define REPORTER_ASSERT(r, cond,...)
void allocN32Pixels(int width, int height, bool isOpaque=false)
void drawRect(const SkRect &rect, const SkPaint &paint)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void clear(SkColor color)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
sk_sp< SkImage > makeImageSnapshot()
bool readPixels(const SkPixmap &dst, int srcX, int srcY)
sk_sp< const SkImage > image
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)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
static constexpr SkRect MakeWH(float w, float h)