Go to the source code of this file.
◆ check_for_all_zeros()
static bool check_for_all_zeros |
( |
const SkBitmap & |
bm | ) |
|
|
static |
Definition at line 223 of file DrawBitmapRectTest.cpp.
223 {
226 const uint8_t* ptr =
reinterpret_cast<const uint8_t*
>(bm.
getAddr(0,
y));
227 for (
size_t i = 0;
i <
count;
i++) {
229 return false;
230 }
231 }
232 }
233 return true;
234}
void * getAddr(int x, int y) const
int bytesPerPixel() const
◆ create()
Definition at line 239 of file DrawBitmapRectTest.cpp.
239 {
242}
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
◆ DEF_TEST()
Definition at line 244 of file DrawBitmapRectTest.cpp.
244 {
246
249
251
253 SkRect dstR = { 0, 0, 16, 16 };
254
257
258
260
263
265}
static void test_nan_antihair()
static bool check_for_all_zeros(const SkBitmap &bm)
static void test_giantrepeat_crbug118018(skiatest::Reporter *reporter)
static void test_treatAsSprite(skiatest::Reporter *reporter)
static void create(SkBitmap *bm, SkColor color)
#define REPORTER_ASSERT(r, cond,...)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
◆ rand_matrix()
Definition at line 32 of file DrawBitmapRectTest.cpp.
32 {
36 }
39 }
42 }
46 }
47}
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & postRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SkMatrix & setPerspX(SkScalar v)
SkMatrix & setPerspY(SkScalar v)
@ kPerspective_Mask
perspective SkMatrix
@ kTranslate_Mask
translation SkMatrix
@ kScale_Mask
scale SkMatrix
@ kAffine_Mask
skew or rotate SkMatrix
◆ rand_size()
Definition at line 49 of file DrawBitmapRectTest.cpp.
49 {
51}
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 keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ test_giantrepeat_crbug118018()
Definition at line 184 of file DrawBitmapRectTest.cpp.
184 {
185 static const struct {
186 int fWidth;
187 int fHeight;
189 { 0x1b294, 0x7f},
190 { 0xFFFF, 0x7f },
191 { 0x7f, 0xFFFF },
192 };
193
197 }
198}
static void test_wacky_bitmapshader(skiatest::Reporter *reporter, int width, int height)
static const TestCase gTests[]
◆ test_nan_antihair()
static void test_nan_antihair |
( |
| ) |
|
|
static |
Definition at line 202 of file DrawBitmapRectTest.cpp.
202 {
205
207
211
213 paint.setAntiAlias(
true);
215
216
217
218
219
221}
@ kStroke_Style
set to stroke geometry
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
◆ test_treatAsSprite()
Definition at line 53 of file DrawBitmapRectTest.cpp.
53 {
54
58
60
61
62 for (
int i = 0;
i < 1000; ++
i) {
64 for (int j = 0; j < 1000; ++j) {
67 }
68 }
69
70
71 for (
int i = 0;
i < 1000; ++
i) {
73 for (int j = 0; j < 1000; ++j) {
77 }
78 }
79
81
82 const SkScalar tooMuchSubpixel = 100.1f;
87
88 const SkScalar tinySubPixel = 100.02f;
93
99
102 mat.
setScale(smallScale, smallScale);
105
111}
static void rand_matrix(SkMatrix *mat, SkRandom &rand, unsigned mask)
static void rand_size(SkISize *size, SkRandom &rand)
bool SkTreatAsSprite(const SkMatrix &mat, const SkISize &size, const SkSamplingOptions &sampling, bool isAntiAlias)
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SkSamplingOptions sampling
◆ test_wacky_bitmapshader()
Definition at line 113 of file DrawBitmapRectTest.cpp.
114 {
118
120
122 matrix.setAll(-119.34097f,
123 -43.436558f,
124 93489.945f,
125 43.436558f,
126 -119.34097f,
127 123.98426f,
130
134 } else {
136 return;
137 }
138
139 matrix.setAll(0.0078740157f,
140 0,
142 0,
143 0.0078740157f,
149
151 c.drawRect(r,
paint);
152
154 for (
int x = 0;
x < dev.
width(); ++
x) {
157 return;
158 }
159 }
160 }
161}
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorRED
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
uint32_t * getAddr32(int x, int y) const
bool tryAllocN32Pixels(int width, int height, bool isOpaque=false)
unsigned useCenter Optional< SkMatrix > matrix
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
◆ gHeight
◆ gWidth