aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-06-15 13:15:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-15 13:15:31 -0700
commit109a23d64ff9cf210e6b0aa8940b4fcea3f05a97 (patch)
tree3e64cbec385ca708853c135515af6f6247dbdd58 /include
parente0ef4a71570f5c7ef60004fc86adad072e1f8719 (diff)
Remove the SkCanvas comment API
No longer used in Chromium/Blink. R=reed@google.com,robertphillips@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1153593003
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h36
-rw-r--r--include/core/SkPicture.h3
-rw-r--r--include/utils/SkDumpCanvas.h8
-rw-r--r--include/utils/SkNWayCanvas.h4
4 files changed, 3 insertions, 48 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 8a71f1d0bb..cfeaa5f1d1 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1033,20 +1033,6 @@ public:
*/
void drawDrawable(SkDrawable* drawable);
- /** Add comments. beginCommentGroup/endCommentGroup open/close a new group.
- Each comment added via addComment is notionally attached to its
- enclosing group. Top-level comments simply belong to no group.
- */
- virtual void beginCommentGroup(const char* /*description*/) {
- // do nothing. Subclasses may do something
- }
- virtual void addComment(const char* /*kywd*/, const char* /*value*/) {
- // do nothing. Subclasses may do something
- }
- virtual void endCommentGroup() {
- // do nothing. Subclasses may do something
- }
-
//////////////////////////////////////////////////////////////////////////
/** Get the current filter object. The filter's reference count is not
@@ -1425,28 +1411,6 @@ private:
};
#define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
-/** Stack helper class to automatically open and close a comment block
- */
-class SkAutoCommentBlock : SkNoncopyable {
-public:
- SkAutoCommentBlock(SkCanvas* canvas, const char* description) {
- fCanvas = canvas;
- if (fCanvas) {
- fCanvas->beginCommentGroup(description);
- }
- }
-
- ~SkAutoCommentBlock() {
- if (fCanvas) {
- fCanvas->endCommentGroup();
- }
- }
-
-private:
- SkCanvas* fCanvas;
-};
-#define SkAutoCommentBlock(...) SK_REQUIRE_LOCAL_VAR(SkAutoCommentBlock)
-
/**
* If the caller wants read-only access to the pixels in a canvas, it can just
* call canvas->peekPixels(), since that is the fastest way to "peek" at the
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index 30e410cca3..473c6b7c1e 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -179,6 +179,9 @@ private:
static_assert(MIN_PICTURE_VERSION <= 41,
"Remove kFontFileName and related code from SkFontDescriptor.cpp.");
+ static_assert(MIN_PICTURE_VERSION <= 42,
+ "Remove COMMENT API handlers from SkPicturePlayback.cpp");
+
static bool IsValidPictInfo(const SkPictInfo& info);
static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*);
diff --git a/include/utils/SkDumpCanvas.h b/include/utils/SkDumpCanvas.h
index cd94501a02..cbae148a16 100644
--- a/include/utils/SkDumpCanvas.h
+++ b/include/utils/SkDumpCanvas.h
@@ -49,10 +49,6 @@ public:
kDrawPatch_Verb,
kDrawData_Verb, // obsolete
- kBeginCommentGroup_Verb,
- kAddComment_Verb,
- kEndCommentGroup_Verb,
-
kCull_Verb
};
@@ -75,10 +71,6 @@ public:
int getNestLevel() const { return fNestLevel; }
- void beginCommentGroup(const char* description) override;
- void addComment(const char* kywd, const char* value) override;
- void endCommentGroup() override;
-
protected:
void willSave() override;
SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) override;
diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h
index 85cd90d899..f478e1a1b6 100644
--- a/include/utils/SkNWayCanvas.h
+++ b/include/utils/SkNWayCanvas.h
@@ -25,10 +25,6 @@ public:
SkDrawFilter* setDrawFilter(SkDrawFilter*) override;
- void beginCommentGroup(const char* description) override;
- void addComment(const char* kywd, const char* value) override;
- void endCommentGroup() override;
-
protected:
SkTDArray<SkCanvas*> fList;