34 using namespace skgpu;
39 auto dContext = factory.
get(contextType);
44 Protected isProtected =
Protected(dContext->priv().caps()->supportsProtectedContent());
59 auto subImg1 = rasterImg->makeSubset(dContext, subsetBounds);
63 auto subImg2 = rasterImg->makeSubset(
nullptr, subsetBounds);
85 auto subImg5 = gpuImage->makeSubset(dContext, subsetBounds);
93 dContext->deleteBackendTexture(tex);
DEF_GANESH_TEST(GrDDLImage_MakeSubset, reporter, options, CtsEnforcement::kApiLevel_T)
@ kTopLeft_GrSurfaceOrigin
skgpu::Protected Protected
@ 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_ColorBLACK
#define REPORTER_ASSERT(r, cond,...)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkImage > asImage() const
bool setInfo(const SkImageInfo &imageInfo, size_t rowBytes=0)
void eraseColor(SkColor4f) const
GrDirectContext * get(ContextType type, ContextOverrides overrides=ContextOverrides::kNone)
SK_API sk_sp< SkImage > BorrowTextureFrom(GrRecordingContext *context, const GrBackendTexture &backendTexture, GrSurfaceOrigin origin, SkColorType colorType, SkAlphaType alphaType, sk_sp< SkColorSpace > colorSpace, TextureReleaseProc textureReleaseProc=nullptr, ReleaseContext releaseContext=nullptr)
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 const int kContextTypeCount
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
sk_sp< SkColorSpace > refColorSpace() const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)
SkAlphaType alphaType() const
SkColorType colorType() const