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

Unified Diff: tools/debugger/SkDrawCommand.cpp

Issue 1761003004: Fix SkiaServe gpu JSON to work with any reordering algorithm (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: feedback inc Created 4 years, 10 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/SkDrawCommand.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDrawCommand.cpp
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 34cbee7ff5ed5ff78728a0d22e93b3c9327422cb..1790536b5c34b8a4493a0dd60bd5720423b2a19e 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -25,14 +25,8 @@
#include "SkValidatingReadBuffer.h"
#include "SkWriteBuffer.h"
-#if SK_SUPPORT_GPU
-#include "GrContext.h"
-#include "GrRenderTarget.h"
-#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"
#define SKDEBUGCANVAS_ATTRIBUTE_BOUNDS "bounds"
@@ -227,37 +221,6 @@ Json::Value SkDrawCommand::toJSON(UrlDataManager& urlDataManager) const {
return result;
}
-Json::Value SkDrawCommand::drawToAndCollectJSON(SkCanvas* canvas,
- UrlDataManager& urlDataManager,
- int opIndex) const {
- Json::Value result = this->toJSON(urlDataManager);
-
- SkASSERT(canvas);
-
-#if SK_SUPPORT_GPU
- GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
- if (rt) {
- GrContext* ctx = rt->getContext();
- if(ctx) {
- GrAuditTrail* at = ctx->getAuditTrail();
- GrAuditTrail::AutoCollectBatches enable(at, opIndex);
- this->execute(canvas);
-
- // TODO if this is inefficient we could add a method to GrAuditTrail which takes
- // a Json::Value and is only compiled in this file
- Json::Value parsedFromString;
- Json::Reader reader;
- SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson(opIndex).c_str(),
- parsedFromString);
- SkASSERT(parsingSuccessful);
-
- result[SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL] = parsedFromString;
- }
- }
-#endif
- return result;
-}
-
#define INSTALL_FACTORY(name) factories.set(SkString(GetCommandString(k ## name ##_OpType)), \
(FROM_JSON) Sk ## name ## Command::fromJSON)
SkDrawCommand* SkDrawCommand::fromJSON(Json::Value& command, UrlDataManager& urlDataManager) {
« no previous file with comments | « tools/debugger/SkDrawCommand.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698