28#include <initializer_list>
33 bool expectedOpaque) {
52 auto context = ctxInfo.directContext();
54 auto surfaceTransparent(
98 ->isAlphaOnly() ==
true);
static sk_sp< SkPicture > make_picture()
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ImageIsOpaqueTest_Gpu, reporter, ctxInfo, CtsEnforcement::kApiLevel_T)
DEF_TEST(ImageIsOpaqueTest, reporter)
static void check_isopaque(skiatest::Reporter *reporter, const sk_sp< SkSurface > &surface, bool expectedOpaque)
@ kOpaque_SkAlphaType
pixel is opaque
constexpr SkColor SK_ColorRED
#define REPORTER_ASSERT(r, cond,...)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
static sk_sp< SkColorSpace > MakeSRGB()
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
SK_API sk_sp< SkImage > DeferredFromPicture(sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
@ kU8
uses 8-bit unsigned int per color component
sk_sp< const SkImage > image
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)
static SkImageInfo MakeN32Premul(int width, int height)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
static SkImageInfo MakeA8(int width, int height)