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

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

Issue 1930623003: Clean up test drawContext usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo Created 4 years, 7 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 | « tools/VisualBench/WrappedBenchmark.h ('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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "SkCanvasPriv.h" 8 #include "SkCanvasPriv.h"
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 return fCommandVector; 411 return fCommandVector;
412 } 412 }
413 413
414 SkTDArray <SkDrawCommand*>& SkDebugCanvas::getDrawCommands() { 414 SkTDArray <SkDrawCommand*>& SkDebugCanvas::getDrawCommands() {
415 return fCommandVector; 415 return fCommandVector;
416 } 416 }
417 417
418 GrAuditTrail* SkDebugCanvas::getAuditTrail(SkCanvas* canvas) { 418 GrAuditTrail* SkDebugCanvas::getAuditTrail(SkCanvas* canvas) {
419 GrAuditTrail* at = nullptr; 419 GrAuditTrail* at = nullptr;
420 #if SK_SUPPORT_GPU 420 #if SK_SUPPORT_GPU
421 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); 421 GrContext* ctx = canvas->getGrContext();
422 if (rt) { 422 if (ctx) {
423 GrContext* ctx = rt->getContext(); 423 at = ctx->getAuditTrail();
424 if (ctx) {
425 at = ctx->getAuditTrail();
426 }
427 } 424 }
428 #endif 425 #endif
429 return at; 426 return at;
430 } 427 }
431 428
432 void SkDebugCanvas::drawAndCollectBatches(int n, SkCanvas* canvas) { 429 void SkDebugCanvas::drawAndCollectBatches(int n, SkCanvas* canvas) {
433 #if SK_SUPPORT_GPU 430 #if SK_SUPPORT_GPU
434 GrAuditTrail* at = this->getAuditTrail(canvas); 431 GrAuditTrail* at = this->getAuditTrail(canvas);
435 if (at) { 432 if (at) {
436 // loop over all of the commands and draw them, this is to collect reord ering 433 // loop over all of the commands and draw them, this is to collect reord ering
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 803 }
807 804
808 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 805 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
809 if (fCalledAddStackData) { 806 if (fCalledAddStackData) {
810 fClipStackData.appendf("<br>"); 807 fClipStackData.appendf("<br>");
811 addPathData(devPath, "pathOut"); 808 addPathData(devPath, "pathOut");
812 return true; 809 return true;
813 } 810 }
814 return false; 811 return false;
815 } 812 }
OLDNEW
« no previous file with comments | « tools/VisualBench/WrappedBenchmark.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698