added 'visible' attribute to skiaserve JSON
authorethannicholas <ethannicholas@google.com>
Tue, 23 Feb 2016 14:53:37 +0000 (06:53 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 23 Feb 2016 14:53:37 +0000 (06:53 -0800)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726663002

Review URL: https://codereview.chromium.org/1726663002

tools/debugger/SkDrawCommand.cpp

index 5ca7250..33e49ce 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 
 #define SKDEBUGCANVAS_ATTRIBUTE_COMMAND           "command"
+#define SKDEBUGCANVAS_ATTRIBUTE_VISIBLE           "visible"
 #define SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL        "auditTrail"
 #define SKDEBUGCANVAS_ATTRIBUTE_MATRIX            "matrix"
 #define SKDEBUGCANVAS_ATTRIBUTE_COORDS            "coords"
@@ -222,6 +223,7 @@ SkString SkDrawCommand::toString() const {
 Json::Value SkDrawCommand::toJSON(UrlDataManager& urlDataManager) const {
     Json::Value result;
     result[SKDEBUGCANVAS_ATTRIBUTE_COMMAND] = this->GetCommandString(fOpType);
+    result[SKDEBUGCANVAS_ATTRIBUTE_VISIBLE] = Json::Value(this->isVisible());
     return result;
 }