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

Unified Diff: tests/CanvasTest.cpp

Issue 1278403006: SkPDF: clean up overuse of SK_SUPPORT_PDF (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-11 (Tuesday) 16:25:36 EDT Created 5 years, 4 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 | « tests/AnnotationTest.cpp ('k') | tests/DeflateWStream.cpp » ('j') | 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 78253ac900166f590bc28aa0087af40738813ebb..0d5c86236075e6609f6f0a2705022566eb706f7f 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -570,6 +570,12 @@ static void TestPdfDevice(skiatest::Reporter* reporter,
SkAutoTUnref<SkDocument> doc(SkDocument::CreatePDF(&outStream));
#if SK_SUPPORT_PDF
REPORTER_ASSERT(reporter, doc);
+#else
+ REPORTER_ASSERT(reporter, !doc);
+#endif // SK_SUPPORT_PDF
+ if (!doc) {
+ return;
+ }
SkCanvas* canvas = doc->beginPage(SkIntToScalar(d.fWidth),
SkIntToScalar(d.fHeight));
REPORTER_ASSERT(reporter, canvas);
@@ -577,9 +583,6 @@ static void TestPdfDevice(skiatest::Reporter* reporter,
testStep->draw(canvas, d, reporter);
REPORTER_ASSERT(reporter, doc->close());
-#else
- REPORTER_ASSERT(reporter, !doc);
-#endif // SK_SUPPORT_PDF
}
// The following class groups static functions that need to access
« no previous file with comments | « tests/AnnotationTest.cpp ('k') | tests/DeflateWStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698