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

Unified Diff: tools/debugger/SkDrawCommand.h

Issue 2105113002: add annotations to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.h
diff --git a/tools/debugger/SkDrawCommand.h b/tools/debugger/SkDrawCommand.h
index 9b81adad3fa6be4eda1e0d7b8130364fcaa9bc76..0d1ece0055043c2ab3344b7ac5d4996275d74250 100644
--- a/tools/debugger/SkDrawCommand.h
+++ b/tools/debugger/SkDrawCommand.h
@@ -28,6 +28,7 @@ public:
kClipRect_OpType,
kClipRRect_OpType,
kConcat_OpType,
+ kDrawAnnotation_OpType,
kDrawBitmap_OpType,
kDrawBitmapNine_OpType,
kDrawBitmapRect_OpType,
@@ -247,6 +248,21 @@ private:
typedef SkDrawCommand INHERITED;
};
+class SkDrawAnnotationCommand : public SkDrawCommand {
+public:
+ SkDrawAnnotationCommand(const SkRect&, const char key[], sk_sp<SkData> value);
+ void execute(SkCanvas* canvas) const override;
+ Json::Value toJSON(UrlDataManager& urlDataManager) const override;
+ static SkDrawAnnotationCommand* fromJSON(Json::Value& command, UrlDataManager& urlDataManager);
+
+private:
+ SkRect fRect;
+ SkString fKey;
+ sk_sp<SkData> fValue;
+
+ typedef SkDrawCommand INHERITED;
+};
+
class SkDrawBitmapCommand : public SkDrawCommand {
public:
SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top,
« no previous file with comments | « tools/debugger/SkDebugCanvas.cpp ('k') | tools/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698