28#include <initializer_list>
47 for (
int alpha : {0x80, 0xFF}) {
48 for (
bool useShader : {
false,
true}) {
49 std::vector<SkColor>
colors;
50 for (
bool useRuntimeBlend : {
false,
true}) {
65 if (useRuntimeBlend) {
84 "Expected: %s %s %s blend matches. Actual: Built-in "
85 "A=%02X R=%02X G=%02X B=%02X, Runtime A=%02X R=%02X G=%02X B=%02X",
87 (alpha == 0xFF) ?
"solid" :
"transparent",
88 useShader ?
"shader" :
"paint",
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static constexpr float kTolerance
DEF_TEST(SkRuntimeBlender_CPU, r)
static void test_blend(skiatest::Reporter *r, SkSurface *surface)
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SkRuntimeBlender_GPU, r, ctxInfo, CtsEnforcement::kApiLevel_T)
static bool nearly_equal(const SkColor &x, const SkColor &y)
sk_sp< SkBlender > GetRuntimeBlendForBlendMode(SkBlendMode mode)
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
static constexpr int kSkBlendModeCount
#define SkColorGetR(color)
#define SkColorGetG(color)
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorGREEN
#define SkColorGetA(color)
#define SkColorGetB(color)
#define REPORTER_ASSERT(r, cond,...)
PODArray< SkColor > colors
SK_API sk_sp< SkShader > Color(SkColor)
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)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
SIN Vec< N, float > abs(const Vec< N, float > &x)
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeWH(float w, float h)