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

Unified Diff: tests/PaintTest.cpp

Issue 677453002: Remove android specific genID from SkPaint. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/SkPaint.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PaintTest.cpp
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index 9b49ec1e8517b659e7dd3d7858cc4a3239fa9a30..4c45eed7614c368e270c47f3f1249f22b1223575 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -158,41 +158,16 @@ DEF_TEST(Paint_copy, reporter) {
SkPaint copiedPaint = paint;
REPORTER_ASSERT(reporter, paint == copiedPaint);
-#ifdef SK_BUILD_FOR_ANDROID
- // the copy constructor should preserve the Generation ID
- uint32_t paintGenID = paint.getGenerationID();
- uint32_t copiedPaintGenID = copiedPaint.getGenerationID();
- REPORTER_ASSERT(reporter, paintGenID == copiedPaintGenID);
- REPORTER_ASSERT(reporter, paint == copiedPaint);
-#endif
-
// copy the paint using the equal operator and check they are the same
copiedPaint = paint;
REPORTER_ASSERT(reporter, paint == copiedPaint);
-#ifdef SK_BUILD_FOR_ANDROID
- // the equals operator should increment the Generation ID
- REPORTER_ASSERT(reporter, paint.getGenerationID() == paintGenID);
- REPORTER_ASSERT(reporter, copiedPaint.getGenerationID() != copiedPaintGenID);
- copiedPaintGenID = copiedPaint.getGenerationID(); // reset to the new value
- REPORTER_ASSERT(reporter, paint == copiedPaint); // operator== ignores fGenerationID
-#endif
-
// clean the paint and check they are back to their initial states
SkPaint cleanPaint;
paint.reset();
copiedPaint.reset();
REPORTER_ASSERT(reporter, cleanPaint == paint);
REPORTER_ASSERT(reporter, cleanPaint == copiedPaint);
-
-#ifdef SK_BUILD_FOR_ANDROID
- // the reset function should increment the Generation ID
- REPORTER_ASSERT(reporter, paint.getGenerationID() != paintGenID);
- REPORTER_ASSERT(reporter, copiedPaint.getGenerationID() != copiedPaintGenID);
- // operator== ignores fGenerationID
- REPORTER_ASSERT(reporter, cleanPaint == paint);
- REPORTER_ASSERT(reporter, cleanPaint == copiedPaint);
-#endif
}
// found and fixed for webkit: mishandling when we hit recursion limit on
« no previous file with comments | « src/core/SkPaint.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698