Rename batch->op in GrAuditTrail json and skiaserver's url handlers
authorBrian Salomon <bsalomon@google.com>
Wed, 21 Dec 2016 20:40:26 +0000 (15:40 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Thu, 5 Jan 2017 19:30:27 +0000 (19:30 +0000)
Requires Infra change https://skia-review.googlesource.com/c/6397/

Change-Id: Ic04ea07a0450a99b291f1bc06d4a501d86f65f51
Reviewed-on: https://skia-review.googlesource.com/6398
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>

src/gpu/GrAuditTrail.cpp
tools/skiaserve/Request.cpp
tools/skiaserve/urlhandlers/OpBoundsHandler.cpp
tools/skiaserve/urlhandlers/OpsHandler.cpp

index 35139b7..133ffea 100644 (file)
@@ -226,7 +226,7 @@ static SkString pretty_print_json(SkString json) {
 SkString GrAuditTrail::toJson(bool prettyPrint) const {
     SkString json;
     json.append("{");
-    JsonifyTArray(&json, "Batches", fOpList, false);
+    JsonifyTArray(&json, "Ops", fOpList, false);
     json.append("}");
 
     if (prettyPrint) {
@@ -241,7 +241,7 @@ SkString GrAuditTrail::toJson(int clientID, bool prettyPrint) const {
     json.append("{");
     Ops** ops = fClientIDLookup.find(clientID);
     if (ops) {
-        JsonifyTArray(&json, "Batches", **ops, false);
+        JsonifyTArray(&json, "Ops", **ops, false);
     }
     json.appendf("}");
 
@@ -266,7 +266,7 @@ SkString GrAuditTrail::Op::toJson() const {
     json.append("{");
     json.appendf("\"Name\": \"%s\",", fName.c_str());
     json.appendf("\"ClientID\": \"%d\",", fClientID);
-    json.appendf("\"BatchListID\": \"%d\",", fOpListID);
+    json.appendf("\"OpListID\": \"%d\",", fOpListID);
     json.appendf("\"ChildID\": \"%d\",", fChildID);
     skrect_to_json(&json, "Bounds", fBounds);
     if (fStackTrace.count()) {
@@ -288,7 +288,7 @@ SkString GrAuditTrail::OpNode::toJson() const {
     json.append("{");
     json.appendf("\"RenderTarget\": \"%u\",", fRenderTargetUniqueID.asUInt());
     skrect_to_json(&json, "Bounds", fBounds);
-    JsonifyTArray(&json, "Batches", fChildren, true);
+    JsonifyTArray(&json, "Ops", fChildren, true);
     json.append("}");
     return json;
 }
index 0e55d92..ff8849a 100644 (file)
@@ -259,7 +259,7 @@ sk_sp<SkData> Request::getJsonOps(int n) {
     SkCanvas* canvas = this->getCanvas();
     Json::Value root = fDebugCanvas->toJSON(fUrlDataManager, n, canvas);
     root["mode"] = Json::Value(fGPUEnabled ? "gpu" : "cpu");
-    root["drawGpuBatchBounds"] = Json::Value(fDebugCanvas->getDrawGpuOpBounds());
+    root["drawGpuOpBounds"] = Json::Value(fDebugCanvas->getDrawGpuOpBounds());
     root["colorMode"] = Json::Value(fColorMode);
     SkDynamicMemoryWStream stream;
     stream.writeText(Json::FastWriter().write(root).c_str());
index f0e9758..e9a120f 100644 (file)
@@ -14,7 +14,7 @@
 using namespace Response;
 
 bool OpBoundsHandler::canHandle(const char* method, const char* url) {
-    static const char* kBasePath = "/batchBounds/";
+    static const char* kBasePath = "/gpuOpBounds/";
     return 0 == strcmp(method, MHD_HTTP_METHOD_POST) &&
            0 == strncmp(url, kBasePath, strlen(kBasePath));
 }
index a44e594..852c526 100644 (file)
@@ -14,7 +14,7 @@
 using namespace Response;
 
 bool OpsHandler::canHandle(const char* method, const char* url) {
-    const char* kBasePath = "/batches";
+    const char* kBasePath = "/ops";
     return 0 == strncmp(url, kBasePath, strlen(kBasePath));
 }
 
@@ -27,7 +27,7 @@ int OpsHandler::handle(Request* request, MHD_Connection* connection, const char*
         return MHD_NO;
     }
 
-    // /batches
+    // /ops
     if (0 == strcmp(method, MHD_HTTP_METHOD_GET)) {
         int n = request->getLastOp();