31 fName.printf(
"aaclip_%s_%s",
32 doPath ?
"path" :
"rect",
35 fClipRect.
setLTRB(10.5f, 10.5f, 50.5f, 50.5f);
37 fDrawRect.
setWH(100, 100);
49 for (
int i = 0;
i < loops; ++
i) {
92 static const int kNestingDepth = 3;
93 static const int kImageSize = 400;
95 SkPoint fSizes[kNestingDepth+1];
99 fName.printf(
"nested_aaclip_%s", doAA ?
"AA" :
"BW");
107 for (
int i = 1;
i < kNestingDepth+1; ++
i) {
108 fSizes[
i].
set(fSizes[
i-1].fX/2, fSizes[
i-1].fY/2);
123 fSizes[depth].fX, fSizes[depth].fY);
132 if (kNestingDepth == depth) {
139 this->
recurse(canvas, depth+1, childOffset);
141 childOffset += fSizes[depth+1];
142 this->
recurse(canvas, depth+1, childOffset);
144 childOffset.
fX =
offset.fX + fSizes[depth+1].
fX;
146 this->
recurse(canvas, depth+1, childOffset);
149 childOffset.
fY =
offset.fY + fSizes[depth+1].
fY;
150 this->
recurse(canvas, depth+1, childOffset);
158 for (
int i = 0;
i < loops; ++
i) {
182 fName.printf(
"aaclip_build_%s_%s", doPath ?
"path" :
"rect",
196 for (
int i = 0;
i < loops; ++
i) {
230 const char*
onGetName()
override {
return "aaclip_setregion"; }
232 for (
int i = 0;
i < loops; ++
i) {
234 clip.setRegion(fRegion);
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
void onDraw(int loops, SkCanvas *canvas) override
const char * onGetName() override
AAClipBench(bool doPath, bool doAA)
AAClipBuilderBench(bool doPath, bool doAA)
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
void onDraw(int loops, SkCanvas *) override
const char * onGetName() override
virtual void setupPaint(SkPaint *paint)
NestedAAClipBench(bool doAA)
void onDraw(int loops, SkCanvas *canvas) override
void recurse(SkCanvas *canvas, int depth, const SkPoint &offset)
const char * onGetName() override
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawPath(const SkPath &path, const SkPaint &paint)
static SkPath Rect(const SkRect &, SkPathDirection=SkPathDirection::kCW, unsigned startIndex=0)
SkPath & addRoundRect(const SkRect &rect, SkScalar rx, SkScalar ry, SkPathDirection dir=SkPathDirection::kCW)
bool setPath(const SkPath &path, const SkRegion &clip)
Optional< SkRect > bounds
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
static constexpr SkPoint Make(float x, float y)
void set(float x, float y)
void inset(float dx, float dy)
void setWH(float width, float height)
void offset(float dx, float dy)
void setLTRB(float left, float top, float right, float bottom)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
void set(const SkIRect &src)