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

Unified Diff: tests/CanvasTest.cpp

Issue 249253003: Hide SaveFlags from the public SkCanvas API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Suppress the canvas-state GM. Created 6 years, 8 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/utils/debugger/SkObjectParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 3b259ab0f5bc21c9937ebca7b6ab9b075d81c124..d48956778f4637e905d2f0233e7b3927bc76e048 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -369,6 +369,7 @@ SIMPLE_TEST_STEP(EndGroup, endCommentGroup());
// Save/restore calls cannot be in isolated simple test steps because the test
// cases that use SkPicture require that save and restore calls be balanced.
+#ifdef SK_SUPPORT_LEGACY_SAVEFLAGS
static void SaveMatrixStep(SkCanvas* canvas,
skiatest::Reporter* reporter,
CanvasTestStep* testStep) {
@@ -400,12 +401,13 @@ static void SaveClipStep(SkCanvas* canvas,
// REPORTER_ASSERT_MESSAGE(reporter, canvas->getTotalClip() != kTestRegion, testStep->assertMessage());
}
TEST_STEP(SaveClip, SaveClipStep);
+#endif
static void SaveMatrixClipStep(SkCanvas* canvas,
skiatest::Reporter* reporter,
CanvasTestStep* testStep) {
int saveCount = canvas->getSaveCount();
- canvas->save(SkCanvas::kMatrixClip_SaveFlag);
+ canvas->save();
canvas->translate(SkIntToScalar(1), SkIntToScalar(2));
canvas->clipRegion(kTestRegion);
canvas->restore();
« no previous file with comments | « src/utils/debugger/SkObjectParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698