Go to the source code of this file.
◆ DEF_TEST()
Definition at line 120 of file ShaderOpacityTest.cpp.
120 {
125}
static void test_gradient(skiatest::Reporter *reporter)
static void test_matrix(skiatest::Reporter *reporter)
static void test_color(skiatest::Reporter *reporter)
static void test_bitmap(skiatest::Reporter *reporter)
◆ test_bitmap()
Definition at line 22 of file ShaderOpacityTest.cpp.
22 {
24
27
28
32
33
35
36
40
41
46
47
52}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define REPORTER_ASSERT(r, cond,...)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
bool setInfo(const SkImageInfo &imageInfo, size_t rowBytes=0)
bool setAlphaType(SkAlphaType alphaType)
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)
◆ test_color()
Definition at line 92 of file ShaderOpacityTest.cpp.
92 {
99}
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
virtual bool isOpaque() const
SK_API sk_sp< SkShader > Color(SkColor)
◆ test_gradient()
Definition at line 54 of file ShaderOpacityTest.cpp.
54 {
62
63
69
70
76
77
83
84
90}
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
PODArray< SkColor > colors
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
void iset(int32_t x, int32_t y)
◆ test_matrix()
Definition at line 101 of file ShaderOpacityTest.cpp.
101 {
106
108
113
118}
SkShaderBase * as_SB(SkShader *shader)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
sk_sp< SkShader > makeWithCTM(const SkMatrix &) const
sk_sp< SkShader > makeWithLocalMatrix(const SkMatrix &) const