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

Side by Side Diff: experimental/PdfViewer/src/SkPdfRenderer.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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/src/SkPdfContext.cpp ('k') | experimental/SkV8Example/SkV8Example.h » ('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" 10 #include "SkBitmapDevice.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 // TODO(edisonn): this will not work in chrome! Find another solution! 206 // TODO(edisonn): this will not work in chrome! Find another solution!
207 StringsInit gStringsInit; 207 StringsInit gStringsInit;
208 208
209 // TODO(edisonn): Document SkPdfTokenLooper and subclasses. 209 // TODO(edisonn): Document SkPdfTokenLooper and subclasses.
210 class PdfInlineImageLooper : public SkPdfTokenLooper { 210 class PdfInlineImageLooper : public SkPdfTokenLooper {
211 public: 211 public:
212 explicit PdfInlineImageLooper(SkPdfTokenLooper* parent) 212 explicit PdfInlineImageLooper(SkPdfTokenLooper* parent)
213 : INHERITED(parent) {} 213 : INHERITED(parent) {}
214 214
215 virtual SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE; 215 SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE;
216 virtual void loop() SK_OVERRIDE; 216 void loop() SK_OVERRIDE;
217 217
218 private: 218 private:
219 typedef SkPdfTokenLooper INHERITED; 219 typedef SkPdfTokenLooper INHERITED;
220 }; 220 };
221 221
222 class PdfCompatibilitySectionLooper : public SkPdfTokenLooper { 222 class PdfCompatibilitySectionLooper : public SkPdfTokenLooper {
223 public: 223 public:
224 explicit PdfCompatibilitySectionLooper(SkPdfTokenLooper* parent) 224 explicit PdfCompatibilitySectionLooper(SkPdfTokenLooper* parent)
225 : INHERITED (parent) {} 225 : INHERITED (parent) {}
226 226
227 virtual SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE; 227 SkPdfResult consumeToken(PdfToken& token) SK_OVERRIDE;
228 virtual void loop() SK_OVERRIDE; 228 void loop() SK_OVERRIDE;
229 229
230 private: 230 private:
231 typedef SkPdfTokenLooper INHERITED; 231 typedef SkPdfTokenLooper INHERITED;
232 }; 232 };
233 233
234 // Utilities 234 // Utilities
235 static void setup_bitmap(SkBitmap* bitmap, int width, int height, SkColor color = SK_ColorWHITE) { 235 static void setup_bitmap(SkBitmap* bitmap, int width, int height, SkColor color = SK_ColorWHITE) {
236 bitmap->allocN32Pixels(width, height); 236 bitmap->allocN32Pixels(width, height);
237 bitmap->eraseColor(color); 237 bitmap->eraseColor(color);
238 } 238 }
(...skipping 2669 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 2908
2909 rect = SkRect::MakeWH(width, height); 2909 rect = SkRect::MakeWH(width, height);
2910 2910
2911 setup_bitmap(output, SkScalarCeilToInt(width), SkScalarCeilToInt(height)); 2911 setup_bitmap(output, SkScalarCeilToInt(width), SkScalarCeilToInt(height));
2912 2912
2913 SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (*output))); 2913 SkAutoTUnref<SkBaseDevice> device(SkNEW_ARGS(SkBitmapDevice, (*output)));
2914 SkCanvas canvas(device); 2914 SkCanvas canvas(device);
2915 2915
2916 return renderer->renderPage(page, &canvas, rect); 2916 return renderer->renderPage(page, &canvas, rect);
2917 } 2917 }
OLDNEW
« no previous file with comments | « experimental/PdfViewer/src/SkPdfContext.cpp ('k') | experimental/SkV8Example/SkV8Example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698