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

Unified Diff: experimental/PdfViewer/pdf_viewer_main.cpp

Issue 80463005: Separate and update PDF_DIFF_TRACE_IN_PNG (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years 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
Index: experimental/PdfViewer/pdf_viewer_main.cpp
diff --git a/experimental/PdfViewer/pdf_viewer_main.cpp b/experimental/PdfViewer/pdf_viewer_main.cpp
index 5ecd2dbd97dcab019d14f586ac79059b5bfcdcb1..6395585c4d0a96a084ba86a1267923851546879a 100644
--- a/experimental/PdfViewer/pdf_viewer_main.cpp
+++ b/experimental/PdfViewer/pdf_viewer_main.cpp
@@ -13,6 +13,7 @@
#include "SkImageDecoder.h"
#include "SkImageEncoder.h"
#include "SkOSFile.h"
+#include "SkPdfConfig.h"
#include "SkPdfRenderer.h"
#include "SkPicture.h"
#include "SkStream.h"
@@ -122,8 +123,10 @@ static void setup_bitmap(SkBitmap* bitmap, int width, int height, SkColor color)
* @param page -1 means there is only one page (0), and render in a file without page extension
*/
+#ifdef PDF_TRACE_DIFF_IN_PNG
extern "C" SkBitmap* gDumpBitmap;
extern "C" SkCanvas* gDumpCanvas;
+#endif
#if SK_SUPPORT_GPU
GrContextFactory gContextFactory;
@@ -192,9 +195,10 @@ static bool render_page(const SkString& outputDir,
}
SkCanvas canvas(device);
+#ifdef PDF_TRACE_DIFF_IN_PNG
gDumpBitmap = &bitmap;
-
gDumpCanvas = &canvas;
+#endif
renderer.renderPage(page < 0 ? 0 : page, &canvas, rect);
SkString outputPath;
« no previous file with comments | « experimental/PdfViewer/inc/SkPdfTokenLooper.h ('k') | experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698