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

Side by Side Diff: tools/debugger/SkDrawCommand.cpp

Issue 1712753002: GrAuditTrail can now be enabled/disabled at runtime (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: removed one more reference to GR_BATCH_DEBUGGING_OUTPUT 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 unified diff | Download patch
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDrawCommand.h" 10 #include "SkDrawCommand.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 UrlDataManager& urlDataManager) const { 229 UrlDataManager& urlDataManager) const {
230 Json::Value result = this->toJSON(urlDataManager); 230 Json::Value result = this->toJSON(urlDataManager);
231 231
232 SkASSERT(canvas); 232 SkASSERT(canvas);
233 233
234 #if SK_SUPPORT_GPU 234 #if SK_SUPPORT_GPU
235 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); 235 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget();
236 if (rt) { 236 if (rt) {
237 GrContext* ctx = rt->getContext(); 237 GrContext* ctx = rt->getContext();
238 if(ctx) { 238 if(ctx) {
239 GrAuditTrail* at = ctx->getAuditTrail();
240 GrAuditTrail::AutoEnable enable(at);
239 this->execute(canvas); 241 this->execute(canvas);
240 GrAuditTrail* at = ctx->getAuditTrail();
241 242
242 // TODO if this is inefficient we could add a method to GrAuditTrail which takes 243 // TODO if this is inefficient we could add a method to GrAuditTrail which takes
243 // a Json::Value and is only compiled in this file 244 // a Json::Value and is only compiled in this file
244 Json::Value parsedFromString; 245 Json::Value parsedFromString;
245 Json::Reader reader; 246 Json::Reader reader;
246 SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson().c_st r(), 247 SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson().c_st r(),
247 parsedFromString) ; 248 parsedFromString) ;
248 SkASSERT(parsingSuccessful); 249 SkASSERT(parsingSuccessful);
249 250
250 result[SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL] = parsedFromString; 251 result[SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL] = parsedFromString;
(...skipping 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 result[SKDEBUGCANVAS_ATTRIBUTE_MATRIX] = make_json_matrix(fMatrix); 3106 result[SKDEBUGCANVAS_ATTRIBUTE_MATRIX] = make_json_matrix(fMatrix);
3106 return result; 3107 return result;
3107 } 3108 }
3108 3109
3109 SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command, 3110 SkSetMatrixCommand* SkSetMatrixCommand::fromJSON(Json::Value& command,
3110 UrlDataManager& urlDataManager) { 3111 UrlDataManager& urlDataManager) {
3111 SkMatrix matrix; 3112 SkMatrix matrix;
3112 extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix); 3113 extract_json_matrix(command[SKDEBUGCANVAS_ATTRIBUTE_MATRIX], &matrix);
3113 return new SkSetMatrixCommand(matrix); 3114 return new SkSetMatrixCommand(matrix);
3114 } 3115 }
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698