62 p.setAntiAlias(
false);
185 auto context = ctxInfo.directContext();
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define SkASSERT_RELEASE(cond)
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeUncachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, skgpu::Mipmapped mipmapped, SkBackingFit fit, skgpu::Budgeted budgeted)
sk_sp< T > sk_ref_sp(T *obj)
@ kNeedNewImageUniqueID_SpecialImage
static constexpr bool SkToBool(const T &x)
static const int kFullSize
static const int kSmallerSize
DEF_TEST(SpecialImage_Raster, reporter)
static SkBitmap create_bm()
static void test_image(const sk_sp< SkSpecialImage > &img, skiatest::Reporter *reporter, GrRecordingContext *rContext, bool isGPUBacked)
static void test_specialimage_image(skiatest::Reporter *reporter)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
#define REPORTER_ASSERT(r, cond,...)
GrTextureProxy * asTextureProxy() const
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkImage > asImage() const
SkColor getColor(int x, int y) const
const SkImageInfo & info() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clear(SkColor color)
void draw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint, bool strict=true) const
sk_sp< SkSpecialImage > makeSubset(const SkIRect &subset) const
virtual bool isGaneshBacked() const
SkColorSpace * getColorSpace() const
const SkIRect & subset() const
virtual bool isGraphiteBacked() const
bool AsBitmap(const SkSpecialImage *img, SkBitmap *result)
GrSurfaceProxyView AsView(GrRecordingContext *context, const SkSpecialImage *img)
sk_sp< SkSpecialImage > MakeFromRaster(const SkIRect &subset, const SkBitmap &bm, const SkSurfaceProps &props)
sk_sp< SkSpecialImage > MakeDeferredFromGpu(GrRecordingContext *context, const SkIRect &subset, uint32_t uniqueID, GrSurfaceProxyView view, const GrColorInfo &colorInfo, const SkSurfaceProps &props)
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)
constexpr int32_t top() const
constexpr int32_t height() const
constexpr int32_t width() const
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
constexpr int32_t left() const
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)