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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1577093003: Add batch names and bounds to json debug information (Closed) Base URL: https://skia.googlesource.com/skia.git@audittrail-wireupcontext
Patch Set: rebase Created 4 years, 11 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 | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 3918ce2a2179a5a45da62427f1637e703f7a35ea..bae4cabaae3876c104db7ae520a34784617d8942 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -8,6 +8,7 @@
#include "GrDrawTarget.h"
+#include "GrAuditTrail.h"
#include "GrCaps.h"
#include "GrGpu.h"
#include "GrPath.h"
@@ -20,6 +21,8 @@
#include "GrTexture.h"
#include "GrVertexBuffer.h"
+#include "SkStrokeRec.h"
+
#include "batches/GrClearBatch.h"
#include "batches/GrCopySurfaceBatch.h"
#include "batches/GrDiscardBatch.h"
@@ -28,17 +31,16 @@
#include "batches/GrRectBatchFactory.h"
#include "batches/GrStencilPathBatch.h"
-#include "SkStrokeRec.h"
-
////////////////////////////////////////////////////////////////////////////////
// Experimentally we have found that most batching occurs within the first 10 comparisons.
static const int kDefaultMaxBatchLookback = 10;
GrDrawTarget::GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider* resourceProvider,
- const Options& options)
+ GrAuditTrail* auditTrail, const Options& options)
: fGpu(SkRef(gpu))
, fResourceProvider(resourceProvider)
+ , fAuditTrail(auditTrail)
, fFlags(0)
, fRenderTarget(rt) {
// TODO: Stop extracting the context (currently needed by GrClipMaskManager)
@@ -466,7 +468,7 @@ void GrDrawTarget::recordBatch(GrBatch* batch) {
// 1) check every draw
// 2) intersect with something
// 3) find a 'blocker'
-
+ GR_AUDIT_TRAIL_ADDBATCH(fAuditTrail, batch->name(), batch->bounds());
GrBATCH_INFO("Re-Recording (%s, B%u)\n"
"\tBounds LRTB (%f, %f, %f, %f)\n",
batch->name(),
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrDrawingManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698