diff options
author | fmalita <fmalita@chromium.org> | 2015-06-15 13:15:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-15 13:15:31 -0700 |
commit | 109a23d64ff9cf210e6b0aa8940b4fcea3f05a97 (patch) | |
tree | 3e64cbec385ca708853c135515af6f6247dbdd58 /src/utils/debugger | |
parent | e0ef4a71570f5c7ef60004fc86adad072e1f8719 (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 'src/utils/debugger')
-rw-r--r-- | src/utils/debugger/SkDebugCanvas.cpp | 12 | ||||
-rw-r--r-- | src/utils/debugger/SkDebugCanvas.h | 4 | ||||
-rw-r--r-- | src/utils/debugger/SkDrawCommand.cpp | 24 | ||||
-rw-r--r-- | src/utils/debugger/SkDrawCommand.h | 38 |
4 files changed, 0 insertions, 78 deletions
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp index 21272d7d24..df0a6d8d9c 100644 --- a/src/utils/debugger/SkDebugCanvas.cpp +++ b/src/utils/debugger/SkDebugCanvas.cpp @@ -432,18 +432,6 @@ void SkDebugCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, con SkDebugf("SkDebugCanvas::onDrawImageRect unimplemented\n"); } -void SkDebugCanvas::beginCommentGroup(const char* description) { - this->addDrawCommand(new SkBeginCommentGroupCommand(description)); -} - -void SkDebugCanvas::addComment(const char* kywd, const char* value) { - this->addDrawCommand(new SkCommentCommand(kywd, value)); -} - -void SkDebugCanvas::endCommentGroup() { - this->addDrawCommand(new SkEndCommentGroupCommand()); -} - void SkDebugCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) { this->addDrawCommand(new SkDrawOvalCommand(oval, paint)); } diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h index 8cf16d2f02..06338e2a50 100644 --- a/src/utils/debugger/SkDebugCanvas.h +++ b/src/utils/debugger/SkDebugCanvas.h @@ -142,10 +142,6 @@ public: // Inherited from SkCanvas //////////////////////////////////////////////////////////////////////////////// - void beginCommentGroup(const char* description) override; - void addComment(const char* kywd, const char* value) override; - void endCommentGroup() override; - static const int kVizImageHeight = 256; static const int kVizImageWidth = 256; diff --git a/src/utils/debugger/SkDrawCommand.cpp b/src/utils/debugger/SkDrawCommand.cpp index 09b18896bc..7e2af084f2 100644 --- a/src/utils/debugger/SkDrawCommand.cpp +++ b/src/utils/debugger/SkDrawCommand.cpp @@ -25,13 +25,11 @@ SkDrawCommand::~SkDrawCommand() { const char* SkDrawCommand::GetCommandString(OpType type) { switch (type) { - case kBeginCommentGroup_OpType: return "BeginCommentGroup"; case kBeginDrawPicture_OpType: return "BeginDrawPicture"; case kClipPath_OpType: return "ClipPath"; case kClipRegion_OpType: return "ClipRegion"; case kClipRect_OpType: return "ClipRect"; case kClipRRect_OpType: return "ClipRRect"; - case kComment_OpType: return "Comment"; case kConcat_OpType: return "Concat"; case kDrawBitmap_OpType: return "DrawBitmap"; case kDrawBitmapNine_OpType: return "DrawBitmapNine"; @@ -52,7 +50,6 @@ const char* SkDrawCommand::GetCommandString(OpType type) { case kDrawTextBlob_OpType: return "DrawTextBlob"; case kDrawTextOnPath_OpType: return "DrawTextOnPath"; case kDrawVertices_OpType: return "DrawVertices"; - case kEndCommentGroup_OpType: return "EndCommentGroup"; case kEndDrawPicture_OpType: return "EndDrawPicture"; case kRestore_OpType: return "Restore"; case kSave_OpType: return "Save"; @@ -361,27 +358,6 @@ bool SkDrawBitmapRectCommand::render(SkCanvas* canvas) const { return true; } -SkBeginCommentGroupCommand::SkBeginCommentGroupCommand(const char* description) - : INHERITED(kBeginCommentGroup_OpType) - , fDescription(description) { - SkString* temp = new SkString; - temp->appendf("Description: %s", description); - fInfo.push(temp); -} - -SkCommentCommand::SkCommentCommand(const char* kywd, const char* value) - : INHERITED(kComment_OpType) - , fKywd(kywd) - , fValue(value) { - SkString* temp = new SkString; - temp->appendf("%s: %s", kywd, value); - fInfo.push(temp); -} - -SkEndCommentGroupCommand::SkEndCommentGroupCommand() - : INHERITED(kEndCommentGroup_OpType) { -} - SkDrawOvalCommand::SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint) : INHERITED(kDrawOval_OpType) { fOval = oval; diff --git a/src/utils/debugger/SkDrawCommand.h b/src/utils/debugger/SkDrawCommand.h index 538dd23c20..307599fdb7 100644 --- a/src/utils/debugger/SkDrawCommand.h +++ b/src/utils/debugger/SkDrawCommand.h @@ -15,13 +15,11 @@ class SK_API SkDrawCommand { public: enum OpType { - kBeginCommentGroup_OpType, kBeginDrawPicture_OpType, kClipPath_OpType, kClipRegion_OpType, kClipRect_OpType, kClipRRect_OpType, - kComment_OpType, kConcat_OpType, kDrawBitmap_OpType, kDrawBitmapNine_OpType, @@ -42,7 +40,6 @@ public: kDrawTextBlob_OpType, kDrawTextOnPath_OpType, kDrawVertices_OpType, - kEndCommentGroup_OpType, kEndDrawPicture_OpType, kRestore_OpType, kSave_OpType, @@ -267,41 +264,6 @@ private: typedef SkDrawCommand INHERITED; }; -class SkBeginCommentGroupCommand : public SkDrawCommand { -public: - SkBeginCommentGroupCommand(const char* description); - void execute(SkCanvas* canvas) const override { - canvas->beginCommentGroup(fDescription.c_str()); - }; -private: - SkString fDescription; - - typedef SkDrawCommand INHERITED; -}; - -class SkCommentCommand : public SkDrawCommand { -public: - SkCommentCommand(const char* kywd, const char* value); - void execute(SkCanvas* canvas) const override { - canvas->addComment(fKywd.c_str(), fValue.c_str()); - }; -private: - SkString fKywd; - SkString fValue; - - typedef SkDrawCommand INHERITED; -}; - -class SkEndCommentGroupCommand : public SkDrawCommand { -public: - SkEndCommentGroupCommand(); - void execute(SkCanvas* canvas) const override { - canvas->endCommentGroup(); - }; -private: - typedef SkDrawCommand INHERITED; -}; - class SkDrawOvalCommand : public SkDrawCommand { public: SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint); |