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

Unified Diff: tools/skiaserve/Request.cpp

Issue 1747893002: Revert of Add abilitly to query audit trail for batches by draw op (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: 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/skiaserve/Request.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/Request.cpp
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index bcaebde01f518e756c4da1a1f0be480601e4e047..4d256d56d87260af82172ad0cdeb87a408f9f278 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -138,36 +138,12 @@
return true;
}
-GrAuditTrail* Request::getAuditTrail(SkCanvas* canvas) {
- GrAuditTrail* at = nullptr;
-#if SK_SUPPORT_GPU
- GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
- if (rt) {
- GrContext* ctx = rt->getContext();
- if (ctx) {
- at = ctx->getAuditTrail();
- }
- }
-#endif
- return at;
-}
-
-void Request::cleanupAuditTrail(SkCanvas* canvas) {
- GrAuditTrail* at = this->getAuditTrail(canvas);
- if (at) {
- GrAuditTrail::AutoEnable ae(at);
- at->fullReset();
- }
-}
-
SkData* Request::getJsonOps(int n) {
SkCanvas* canvas = this->getCanvas();
Json::Value root = fDebugCanvas->toJSON(fUrlDataManager, n, canvas);
root["mode"] = Json::Value(fGPUEnabled ? "gpu" : "cpu");
SkDynamicMemoryWStream stream;
stream.writeText(Json::FastWriter().write(root).c_str());
-
- this->cleanupAuditTrail(canvas);
return stream.copyToData();
}
@@ -180,7 +156,11 @@
// a Json::Value and is only compiled in this file
Json::Value parsedFromString;
#if SK_SUPPORT_GPU
- GrAuditTrail* at = this->getAuditTrail(canvas);
+ GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
+ SkASSERT(rt);
+ GrContext* ctx = rt->getContext();
+ SkASSERT(ctx);
+ GrAuditTrail* at = ctx->getAuditTrail();
GrAuditTrail::AutoManageBatchList enable(at);
fDebugCanvas->drawTo(canvas, n);
« no previous file with comments | « tools/skiaserve/Request.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698