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

Unified Diff: experimental/PdfViewer/pdf_viewer_main.cpp

Issue 1204433002: Begin kLegacyFontHost_InitType cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add dox Created 5 years, 6 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 | « experimental/PdfViewer/SkTrackDevice.h ('k') | experimental/PdfViewer/src/SkPdfRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdf_viewer_main.cpp
diff --git a/experimental/PdfViewer/pdf_viewer_main.cpp b/experimental/PdfViewer/pdf_viewer_main.cpp
index f5bfdbbd7e35eeef353dcc9702eb0df455f9f208..94735ac49a796599e15b838260bec03b0ab559e9 100644
--- a/experimental/PdfViewer/pdf_viewer_main.cpp
+++ b/experimental/PdfViewer/pdf_viewer_main.cpp
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkCommandLineFlags.h"
#include "SkDevice.h"
@@ -121,8 +120,7 @@ static bool render_page(const SkString& outputDir,
// Exercise all pdf codepaths as in normal rendering, but no actual bits are changed.
if (!FLAGS_config.isEmpty() && strcmp(FLAGS_config[0], "nul") == 0) {
SkBitmap bitmap;
- SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (bitmap)));
- SkNulCanvas canvas(device);
+ SkNulCanvas canvas(bitmap);
renderer.renderPage(page < 0 ? 0 : page, &canvas, rect);
} else {
// 8888
@@ -143,14 +141,11 @@ static bool render_page(const SkString& outputDir,
setup_bitmap(&bitmap, (int)SkScalarToDouble(width), (int)SkScalarToDouble(height),
background);
#endif
- SkAutoTUnref<SkBaseDevice> device;
- if (strcmp(FLAGS_config[0], "8888") == 0) {
- device.reset(SkNEW_ARGS(SkBitmapDevice, (bitmap)));
- } else {
+ if (strcmp(FLAGS_config[0], "8888") != 0) {
SkDebugf("unknown --config: %s\n", FLAGS_config[0]);
return false;
}
- SkCanvas canvas(device);
+ SkCanvas canvas(bitmap);
#ifdef PDF_TRACE_DIFF_IN_PNG
gDumpBitmap = &bitmap;
« no previous file with comments | « experimental/PdfViewer/SkTrackDevice.h ('k') | experimental/PdfViewer/src/SkPdfRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698