Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: tests/MatrixClipCollapseTest.cpp

Issue 137093004: Collapse matrix & clip stack in PictureRecord (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed over application of SK_ prefix Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MatrixClipCollapseTest.cpp
===================================================================
--- tests/MatrixClipCollapseTest.cpp (revision 13386)
+++ tests/MatrixClipCollapseTest.cpp (working copy)
@@ -52,8 +52,11 @@
// 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<DrawType>* ops) {
SkDebugCanvas debugCanvas(input.width(), input.height());
@@ -623,7 +626,7 @@
//////////////////////////////////////////////////////////////////////////////
-#ifdef COLLAPSE_MATRIX_CLIP_STATE
+#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
static void print(const SkTDArray<DrawType>& expected, const SkTDArray<DrawType>& actual) {
SkDebugf("\n\nexpected %d --- actual %d\n", expected.count(), actual.count());
int max = SkMax32(expected.count(), actual.count());
@@ -658,7 +661,7 @@
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 @@
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 @@
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);
}
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698