49 for (
int x = 0;
x < bm.
width(); ++
x) {
134 dContext =
info.directContext();
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(PinnedImageTest, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
static void basic_test(skiatest::Reporter *reporter, GrRecordingContext *rContext)
static void cleanup_test(skiatest::Reporter *reporter)
static bool surface_is_expected_color(SkSurface *surf, const SkImageInfo &ii, SkColor color)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
@ kNew_Uncached_Unbudgeted
static bool ok(int result)
#define REPORTER_ASSERT(r, cond,...)
static sk_sp< GrDirectContext > MakeMock(const GrMockOptions *, const GrContextOptions &)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
SkColor getColor(int x, int y) const
void clear(SkColor color)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static const SkMatrix & I()
bool readPixels(const SkPixmap &dst, int srcX, int srcY)
ContextInfo getContextInfo(ContextType type, ContextOverrides=ContextOverrides::kNone)
SK_API sk_sp< SkImage > PinnableRasterFromBitmap(const SkBitmap &)
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)
std::unique_ptr< GrFragmentProcessor > AsFragmentProcessor(GrRecordingContext *rContext, const SkImage *img, SkSamplingOptions sampling, const SkTileMode tileModes[2], const SkMatrix &m, const SkRect *subset, const SkRect *domain)
bool PinAsTexture(GrRecordingContext *, SkImage *)
std::tuple< GrSurfaceProxyView, GrColorType > AsView(GrRecordingContext *rContext, const SkImage *img, skgpu::Mipmapped mipmapped, GrImageTexGenPolicy policy)
void UnpinTexture(GrRecordingContext *, SkImage *)
static const int kContextTypeCount
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)