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

Side by Side Diff: experimental/PdfViewer/SkNulCanvas.h

Issue 1153593003: Remove the SkCanvas comment API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rebased 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 | « debugger/QT/SkDebuggerGUI.cpp ('k') | gm/rects.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 #ifndef SkNulCanvas_DEFINED 8 #ifndef SkNulCanvas_DEFINED
9 #define SkNulCanvas_DEFINED 9 #define SkNulCanvas_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 12
13 /** \class SkNulCanvas 13 /** \class SkNulCanvas
14 * 14 *
15 * Nul Canvas is a canvas that does nothing. It is used to measure the perf of just parsing 15 * Nul Canvas is a canvas that does nothing. It is used to measure the perf of just parsing
16 * a pdf, without actually rendering anything. 16 * a pdf, without actually rendering anything.
17 * 17 *
18 */ 18 */
19 class SK_API SkNulCanvas : public SkCanvas { 19 class SK_API SkNulCanvas : public SkCanvas {
20 public: 20 public:
21 SK_DECLARE_INST_COUNT(SkNulCanvas); 21 SK_DECLARE_INST_COUNT(SkNulCanvas);
22 22
23 SkNulCanvas() {} 23 SkNulCanvas() {}
24 explicit SkNulCanvas(SkBaseDevice* device) : SkCanvas(device) {} 24 explicit SkNulCanvas(SkBaseDevice* device) : SkCanvas(device) {}
25 25
26 explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {} 26 explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {}
27 virtual ~SkNulCanvas() {} 27 virtual ~SkNulCanvas() {}
28 28
29 void beginCommentGroup(const char* description) override {}
30 void addComment(const char* kywd, const char* value) override {}
31 void endCommentGroup() override {}
32 SkDrawFilter* setDrawFilter(SkDrawFilter* filter) override {return NULL;} 29 SkDrawFilter* setDrawFilter(SkDrawFilter* filter) override {return NULL;}
33 30
34 bool isClipEmpty() const override { return false; } 31 bool isClipEmpty() const override { return false; }
35 bool getClipBounds(SkRect* bounds) const override { 32 bool getClipBounds(SkRect* bounds) const override {
36 if (NULL != bounds) { 33 if (NULL != bounds) {
37 bounds->setXYWH(0, 0, 34 bounds->setXYWH(0, 0,
38 SkIntToScalar(this->imageInfo().width()), 35 SkIntToScalar(this->imageInfo().width()),
39 SkIntToScalar(this->imageInfo().height())); 36 SkIntToScalar(this->imageInfo().height()));
40 } 37 }
41 return true; 38 return true;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const SkColor colors[], SkXfermode* xmode, 97 const SkColor colors[], SkXfermode* xmode,
101 const uint16_t indices[], int indexCount, 98 const uint16_t indices[], int indexCount,
102 const SkPaint& paint) override {} 99 const SkPaint& paint) override {}
103 100
104 101
105 private: 102 private:
106 typedef SkCanvas INHERITED; 103 typedef SkCanvas INHERITED;
107 }; 104 };
108 105
109 #endif // SkNulCanvas_DEFINED 106 #endif // SkNulCanvas_DEFINED
OLDNEW
« no previous file with comments | « debugger/QT/SkDebuggerGUI.cpp ('k') | gm/rects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698