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

Side by Side Diff: experimental/tools/multipage_pdf_profiler.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 8 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/tools/SkDmuxWStream.h ('k') | gm/aaclip.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 2014 Google Inc. 2 * Copyright 2014 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 #include "SkCanvas.h" 7 #include "SkCanvas.h"
8 #include "SkDocument.h" 8 #include "SkDocument.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 13 matching lines...) Expand all
24 DEFINE_bool(cachePages, false, "Use a PageCachingDocument."); 24 DEFINE_bool(cachePages, false, "Use a PageCachingDocument.");
25 DEFINE_bool(nullCanvas, true, "Render to a SkNullCanvas as a control."); 25 DEFINE_bool(nullCanvas, true, "Render to a SkNullCanvas as a control.");
26 26
27 __SK_FORCE_IMAGE_DECODER_LINKING; 27 __SK_FORCE_IMAGE_DECODER_LINKING;
28 28
29 namespace { 29 namespace {
30 class NullWStream : public SkWStream { 30 class NullWStream : public SkWStream {
31 public: 31 public:
32 NullWStream() : fBytesWritten(0) { 32 NullWStream() : fBytesWritten(0) {
33 } 33 }
34 bool write(const void*, size_t size) SK_OVERRIDE { 34 bool write(const void*, size_t size) override {
35 fBytesWritten += size; 35 fBytesWritten += size;
36 return true; 36 return true;
37 } 37 }
38 size_t bytesWritten() const SK_OVERRIDE { 38 size_t bytesWritten() const override {
39 return fBytesWritten; 39 return fBytesWritten;
40 } 40 }
41 size_t fBytesWritten; 41 size_t fBytesWritten;
42 }; 42 };
43 43
44 SkDocument* CreatePDFDocument(SkWStream* out) { 44 SkDocument* CreatePDFDocument(SkWStream* out) {
45 if (FLAGS_cachePages) { 45 if (FLAGS_cachePages) {
46 return CreatePageCachingDocument(out); 46 return CreatePageCachingDocument(out);
47 } else { 47 } else {
48 return SkDocument::CreatePDF(out); 48 return SkDocument::CreatePDF(out);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 if (!FLAGS_nullCanvas) { 127 if (!FLAGS_nullCanvas) {
128 pdfDocument->close(); 128 pdfDocument->close();
129 pdfDocument.reset(NULL); 129 pdfDocument.reset(NULL);
130 } 130 }
131 printf(SK_SIZE_T_SPECIFIER "\t%4d\n", 131 printf(SK_SIZE_T_SPECIFIER "\t%4d\n",
132 inputStream.getLength(), 132 inputStream.getLength(),
133 sk_tools::getMaxResidentSetSizeMB()); 133 sk_tools::getMaxResidentSetSizeMB());
134 return 0; 134 return 0;
135 } 135 }
OLDNEW
« no previous file with comments | « experimental/tools/SkDmuxWStream.h ('k') | gm/aaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698