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

Side by Side Diff: src/gpu/GrDrawingManager.cpp

Issue 1580023002: GrAuditTrail hooks in GrContext + GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@audittrail-3-gatherframes
Patch Set: tweaks 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDrawContext.h" 8 #include "GrDrawContext.h"
9 #include "GrDrawingManager.h" 9 #include "GrDrawingManager.h"
10 #include "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (fDrawTargets.count()) { 107 if (fDrawTargets.count()) {
108 SkASSERT(fDrawTargets.count() == 1); 108 SkASSERT(fDrawTargets.count() == 1);
109 // Clear out this flag so the topological sort's SkTTopoSort_CheckAllUnm arked check 109 // Clear out this flag so the topological sort's SkTTopoSort_CheckAllUnm arked check
110 // won't bark 110 // won't bark
111 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag); 111 fDrawTargets[0]->resetFlag(GrDrawTarget::kWasOutput_Flag);
112 } 112 }
113 #else 113 #else
114 fDrawTargets.reset(); 114 fDrawTargets.reset();
115 #endif 115 #endif
116 116
117 // Clear batch debugging output
118 if (GR_BATCH_DEBUGGING_OUTPUT) {
119 SkDebugf("%s\n", fContext->getAuditTrail()->toJson().c_str());
120 // TODO This currently crashes because not all ops are accounted for
121 //GR_AUDIT_TRAIL_RESET(fContext->getAuditTrail());
122 }
123
124 fFlushState.reset(); 117 fFlushState.reset();
125 fFlushing = false; 118 fFlushing = false;
126 } 119 }
127 120
128 GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props, 121 GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props,
129 GrRenderTarget* rt) { 122 GrRenderTarget* rt) {
130 if (this->abandoned()) { 123 if (this->abandoned()) {
131 return nullptr; 124 return nullptr;
132 } 125 }
133 126
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 195
203 return pr; 196 return pr;
204 } 197 }
205 198
206 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt, 199 GrDrawContext* GrDrawingManager::drawContext(GrRenderTarget* rt,
207 const SkSurfaceProps* surfaceProps) { 200 const SkSurfaceProps* surfaceProps) {
208 if (this->abandoned()) { 201 if (this->abandoned()) {
209 return nullptr; 202 return nullptr;
210 } 203 }
211 204
212 return new GrDrawContext(this, rt, surfaceProps, fSingleOwner); 205 return new GrDrawContext(this, rt, surfaceProps, fContext->getAuditTrail(), fSingleOwner);
213 } 206 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698