From 105a4a584c4c2c84c24e102112326b15683673f5 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Tue, 11 Feb 2014 15:10:40 +0000 Subject: Collapse matrix & clip stack in PictureRecord https://codereview.chromium.org/137093004/ git-svn-id: http://skia.googlecode.com/svn/trunk@13402 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/MatrixClipCollapseTest.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'tests/MatrixClipCollapseTest.cpp') diff --git a/tests/MatrixClipCollapseTest.cpp b/tests/MatrixClipCollapseTest.cpp index d6507508c9..d379e3351c 100644 --- a/tests/MatrixClipCollapseTest.cpp +++ b/tests/MatrixClipCollapseTest.cpp @@ -52,7 +52,10 @@ // system is ready for prime time // bench the recording times with/without matrix/clip collapsing -#ifdef COLLAPSE_MATRIX_CLIP_STATE +#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE + +// Enable/disable debugging helper code +//#define TEST_COLLAPSE_MATRIX_CLIP_STATE 1 // Extract the command ops from the input SkPicture static void gets_ops(SkPicture& input, SkTDArray* ops) { @@ -623,7 +626,7 @@ static void emit_struct3(SkCanvas* canvas, ////////////////////////////////////////////////////////////////////////////// -#ifdef COLLAPSE_MATRIX_CLIP_STATE +#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE static void print(const SkTDArray& expected, const SkTDArray& actual) { SkDebugf("\n\nexpected %d --- actual %d\n", expected.count(), actual.count()); int max = SkMax32(expected.count(), actual.count()); @@ -658,7 +661,7 @@ static void test_collapse(skiatest::Reporter* reporter) { for (int l = 0; l < kMatTypeCount; ++l) { for (int m = 0; m < kClipTypeCount; ++m) { for (int n = 0; n < kDrawOpTypeCount; ++n) { -#ifdef COLLAPSE_MATRIX_CLIP_STATE +#ifdef TEST_COLLAPSE_MATRIX_CLIP_STATE static int testID = -1; ++testID; if (testID < -1) { @@ -686,7 +689,7 @@ static void test_collapse(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, expected.count() == actual.count()); if (expected.count() != actual.count()) { -#ifdef COLLAPSE_MATRIX_CLIP_STATE +#ifdef TEST_COLLAPSE_MATRIX_CLIP_STATE print(expected, actual); #endif continue; @@ -694,7 +697,7 @@ static void test_collapse(skiatest::Reporter* reporter) { for (int i = 0; i < expected.count(); ++i) { REPORTER_ASSERT(reporter, expected[i] == actual[i]); -#ifdef COLLAPSE_MATRIX_CLIP_STATE +#ifdef TEST_COLLAPSE_MATRIX_CLIP_STATE if (expected[i] != actual[i]) { print(expected, actual); } -- cgit v1.2.3