diff options
author | reed <reed@google.com> | 2016-04-27 07:49:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-27 07:49:17 -0700 |
commit | 1e7f5e708e5daeb0c18ae49001c9e3cd5e3b13cb (patch) | |
tree | c012c4ab0679914ca494e3ccceac6ce2242faed2 /tests/AAClipTest.cpp | |
parent | 4b6566644f704cf9e30c71fa547c9b5915752792 (diff) |
remove 'deprecated' region from SkDraw
Most call-sites that used it just took its bounds, so it was trivial to convert them
to get the bounds of the RasterClip. Two clients wanted the actual region:
1. layeriter for android
2. pdf
Android already only has BW clips, so should be safe.
PDF now overrides its clip methods to ensure that all clips are BW.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925693002
Review URL: https://codereview.chromium.org/1925693002
Diffstat (limited to 'tests/AAClipTest.cpp')
-rw-r--r-- | tests/AAClipTest.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp index 42c320cde1..438dab4da8 100644 --- a/tests/AAClipTest.cpp +++ b/tests/AAClipTest.cpp @@ -10,6 +10,7 @@ #include "SkMask.h" #include "SkPath.h" #include "SkRandom.h" +#include "SkRasterClip.h" #include "SkRRect.h" #include "Test.h" @@ -342,33 +343,6 @@ static void test_really_a_rect(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, clip.isRect()); } -#include "SkRasterClip.h" - -static void copyToMask(const SkRasterClip& rc, SkMask* mask) { - if (rc.isAA()) { - rc.aaRgn().copyToMask(mask); - } else { - copyToMask(rc.bwRgn(), mask); - } -} - -static bool operator==(const SkRasterClip& a, const SkRasterClip& b) { - if (a.isEmpty()) { - return b.isEmpty(); - } - if (b.isEmpty()) { - return false; - } - - SkMask ma, mb; - copyToMask(a, &ma); - copyToMask(b, &mb); - SkAutoMaskFreeImage aCleanUp(ma.fImage); - SkAutoMaskFreeImage bCleanUp(mb.fImage); - - return ma == mb; -} - static void did_dx_affect(skiatest::Reporter* reporter, const SkScalar dx[], size_t count, bool changed) { const SkIRect baseBounds = SkIRect::MakeXYWH(0, 0, 10, 10); |