18#if defined(SK_GRAPHITE)
35#include <initializer_list>
60 size_t expectedSize = bytesPerPixel * gpu->
width() * gpu->
height();
62 expectedSize += expectedSize/3;
68 "Expected: %zu Actual: %zu", expectedSize, actualSize);
81 auto dContext = ctxInfo.directContext();
83 bool testMipmaps = dContext->priv().caps()->mipmapSupport();
93#if defined(SK_GRAPHITE)
99 std::unique_ptr<Recorder> recorder = context->makeRecorder();
104 { mipmapped == skgpu::Mipmapped::kYes });
static void run_test(GrDirectContext *dContext, skiatest::Reporter *reporter, BulkRectTest test)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
constexpr SkColor SK_ColorWHITE
SK_API int SkColorTypeBytesPerPixel(SkColorType ct)
#define DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(name, reporter, graphite_ctx, ctsEnforcement)
#define REPORTER_ASSERT(r, cond,...)
#define DEF_GANESH_TEST_FOR_ALL_CONTEXTS(name, reporter, context_info, ctsEnforcement)
virtual size_t textureSize() const =0
Dart_NativeFunction function
SK_API sk_sp< SkImage > TextureFromImage(GrDirectContext *, const SkImage *, skgpu::Mipmapped=skgpu::Mipmapped::kNo, skgpu::Budgeted=skgpu::Budgeted::kYes)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)