43 sourceCanvas->
clear(0xFFDEDEDE);
67 paint.setShader(sourceShader);
96 paintTranslated.
setShader(sourceShaderTranslated);
98 destinationCanvas->
drawPaint(paintTranslated);
106 for (
int y = 0;
y <
info.height();
y++) {
109 for (
int x = 1;
x <
info.width();
x++) {
147 auto dContext = ctxInfo.directContext();
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void run_shader_test(skiatest::Reporter *reporter, SkSurface *sourceSurface, SkSurface *destinationSurface, SkImageInfo &info)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
static void gpu_to_gpu(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static void paint_source(SkSurface *sourceSurface)
static void test_bitmap_equality(skiatest::Reporter *reporter, SkBitmap &bm1, SkBitmap &bm2)
static void raster_to_gpu(skiatest::Reporter *reporter, GrRecordingContext *rContext)
DEF_TEST(ImageNewShader, reporter)
constexpr SkColor SK_ColorTRANSPARENT
#define REPORTER_ASSERT(r, cond,...)
SkColor getColor(int x, int y) const
size_t computeByteSize() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawPaint(const SkPaint &paint)
void clear(SkColor color)
sk_sp< SkShader > makeRawShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void setStyle(Style style)
void setColor(SkColor color)
@ kFill_Style
set to fill geometry
void setShader(sk_sp< SkShader > shader)
sk_sp< SkImage > makeImageSnapshot()
bool readPixels(const SkPixmap &dst, int srcX, int srcY)
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
sk_sp< SkBlender > blender SkRect rect
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkCubicResampler Mitchell()
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)