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

Side by Side Diff: experimental/PdfViewer/src/SkPdfRenderer.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 unified diff | Download patch
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPdfRenderer.h" 8 #include "SkPdfRenderer.h"
9 9
10 #include "SkBitmapDevice.h"
11 #include "SkCanvas.h" 10 #include "SkCanvas.h"
12 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
13 #include "SkDevice.h" 12 #include "SkDevice.h"
14 #include "SkForceLinking.h" 13 #include "SkForceLinking.h"
15 #include "SkGraphics.h" 14 #include "SkGraphics.h"
16 #include "SkImageDecoder.h" 15 #include "SkImageDecoder.h"
17 #include "SkImageEncoder.h" 16 #include "SkImageEncoder.h"
18 #include "SkOSFile.h" 17 #include "SkOSFile.h"
19 #include "SkPicture.h" 18 #include "SkPicture.h"
20 #include "SkPdfFont.h" 19 #include "SkPdfFont.h"
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2903 2902
2904 SkRect rect = renderer->MediaBox(page < 0 ? 0 :page); 2903 SkRect rect = renderer->MediaBox(page < 0 ? 0 :page);
2905 2904
2906 SkScalar width = SkScalarMul(rect.width(), SkDoubleToScalar(dpi / 72.0)); 2905 SkScalar width = SkScalarMul(rect.width(), SkDoubleToScalar(dpi / 72.0));
2907 SkScalar height = SkScalarMul(rect.height(), SkDoubleToScalar(dpi / 72.0)); 2906 SkScalar height = SkScalarMul(rect.height(), SkDoubleToScalar(dpi / 72.0));
2908 2907
2909 rect = SkRect::MakeWH(width, height); 2908 rect = SkRect::MakeWH(width, height);
2910 2909
2911 setup_bitmap(output, SkScalarCeilToInt(width), SkScalarCeilToInt(height)); 2910 setup_bitmap(output, SkScalarCeilToInt(width), SkScalarCeilToInt(height));
2912 2911
2913 SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (*output))); 2912 SkCanvas canvas(*output);
2914 SkCanvas canvas(device);
2915 2913
2916 return renderer->renderPage(page, &canvas, rect); 2914 return renderer->renderPage(page, &canvas, rect);
2917 } 2915 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gm/resizeimagefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698