aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 20:58:57 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 20:58:57 +0000
commit4c2443e36fdc6c095b17e90baa4a2f26a6f00b08 (patch)
tree48a14bb302faa65074efad65e015281f24285aec /tests
parent12b4e27ae1a29460e91a59f38122483e1faec697 (diff)
Use ReduceClipStack in ClipMaskManager.
R=robertphillips@google.com This will require some gpu rebaselining (complexclip_rect_aa, complexclip_aa, aaclip, simpleaaclip, complexclip_aa_layer)xy Review URL: https://codereview.appspot.com/6884051 git-svn-id: http://skia.googlecode.com/svn/trunk@6694 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/ClipCacheTest.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/ClipCacheTest.cpp b/tests/ClipCacheTest.cpp
index ec8169eff4..ce879d1c07 100644
--- a/tests/ClipCacheTest.cpp
+++ b/tests/ClipCacheTest.cpp
@@ -102,9 +102,8 @@ static void check_state(skiatest::Reporter* reporter,
const SkClipStack& clip,
GrTexture* mask,
const GrIRect& bound) {
- SkClipStack cacheClip;
- cache.getLastClip(&cacheClip);
- REPORTER_ASSERT(reporter, clip == cacheClip);
+ SkClipStack cacheClip;
+ REPORTER_ASSERT(reporter, clip.getTopmostGenID() == cache.getLastClipGenID());
REPORTER_ASSERT(reporter, mask == cache.getLastMask());
@@ -146,7 +145,7 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
desc.fHeight = Y_SIZE;
desc.fConfig = kSkia8888_PM_GrPixelConfig;
- cache.acquireMask(clip1, desc, bound1);
+ cache.acquireMask(clip1.getTopmostGenID(), desc, bound1);
GrTexture* texture1 = cache.getLastMask();
REPORTER_ASSERT(reporter, texture1);
@@ -171,7 +170,7 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
SkClipStack clip2(bound2);
- cache.acquireMask(clip2, desc, bound2);
+ cache.acquireMask(clip2.getTopmostGenID(), desc, bound2);
GrTexture* texture2 = cache.getLastMask();
REPORTER_ASSERT(reporter, texture2);
@@ -185,8 +184,8 @@ static void test_cache(skiatest::Reporter* reporter, GrContext* context) {
REPORTER_ASSERT(reporter, 1 == texture2->getRefCnt());
// check to make sure canReuse works
- REPORTER_ASSERT(reporter, cache.canReuse(clip2, bound2));
- REPORTER_ASSERT(reporter, !cache.canReuse(clip1, bound1));
+ REPORTER_ASSERT(reporter, cache.canReuse(clip2.getTopmostGenID(), bound2));
+ REPORTER_ASSERT(reporter, !cache.canReuse(clip1.getTopmostGenID(), bound1));
// pop the state
cache.pop();