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

Unified Diff: tools/debugger/SkDrawCommand.h

Issue 2105113002: add annotations to debugger (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | tools/debugger/SkDrawCommand.cpp » ('j') | tools/debugger/SkDrawCommand.cpp » ('J')
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..068d53000d550f17278b713f6669b2db60126f8b 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,22 @@ 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;
+ bool render(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 | « no previous file | tools/debugger/SkDrawCommand.cpp » ('j') | tools/debugger/SkDrawCommand.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698