| Index: samplecode/SampleDither.cpp
|
| diff --git a/samplecode/SampleDither.cpp b/samplecode/SampleDither.cpp
|
| index 99b33f0f0ef6dfafe18106e255e157b733267a7a..9e127576a89dfe7e132a1120f10d09350b14cd51 100644
|
| --- a/samplecode/SampleDither.cpp
|
| +++ b/samplecode/SampleDither.cpp
|
| @@ -19,6 +19,7 @@
|
| #include "SkColorPriv.h"
|
| #include "SkColorFilter.h"
|
| #include "SkDither.h"
|
| +#include "sk_tool_utils.h"
|
|
|
| static void draw_sweep(SkCanvas* c, int width, int height, SkScalar angle) {
|
| SkRect r;
|
| @@ -37,10 +38,7 @@ static void draw_sweep(SkCanvas* c, int width, int height, SkScalar angle) {
|
| colors, nullptr, SK_ARRAY_COUNT(colors)));
|
|
|
| SkAutoCanvasRestore acr(c, true);
|
| -
|
| - c->translate(r.centerX(), r.centerY());
|
| - c->rotate(angle);
|
| - c->translate(-r.centerX(), -r.centerY());
|
| + sk_tool_utils::rotate_about(c, angle, r.centerX(), r.centerY());
|
|
|
| SkRect bounds = r;
|
| r.inset(p.getStrokeWidth(), p.getStrokeWidth());
|
|
|