93 {
94 if (nullptr == fImage) {
96 }
97
100
101 constexpr int kPadX = 30;
102 constexpr int kPadY = 40;
103
104 int rowCount = 0;
108
110 paint.setAntiAlias(fAA);
111 for (
int w = 1;
w <= kMaxSrcRectSize;
w *= 3) {
112 for (
int h = 1;
h <= kMaxSrcRectSize;
h *= 3) {
113
117 switch (random.
nextU() % 3) {
118 case 0:
120 break;
121 case 1:
123 break;
124 case 2:
125
126 break;
127 }
132
134 ++rowCount;
135 if ((dstRect.
width() + 2 * kPadX) * rowCount >
gSize) {
139 rowCount = 0;
140 }
141 }
142 }
144 }
static int SkNextLog2(uint32_t value)
void translate(SkScalar dx, SkScalar dy)
@ kFast_SrcRectConstraint
sample outside bounds; faster
void rotate(SkScalar degrees)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
constexpr int gSurfaceSize
static sk_sp< SkImage > makebm(int w, int h)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
constexpr float height() const
constexpr float width() const