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

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

Issue 2110123003: Move dump of batches to be after the forwardCombine call in prepareBatches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | 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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void GrDrawingManager::flush() { 60 void GrDrawingManager::flush() {
61 if (fFlushing || this->wasAbandoned()) { 61 if (fFlushing || this->wasAbandoned()) {
62 return; 62 return;
63 } 63 }
64 fFlushing = true; 64 fFlushing = true;
65 65
66 SkDEBUGCODE(bool result =) 66 SkDEBUGCODE(bool result =)
67 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>( &fDrawTargets); 67 SkTTopoSort<GrDrawTarget, GrDrawTarget::TopoSortTraits>( &fDrawTargets);
68 SkASSERT(result); 68 SkASSERT(result);
69 69
70 for (int i = 0; i < fDrawTargets.count(); ++i) {
71 fDrawTargets[i]->prepareBatches(&fFlushState);
72 }
73
70 // Enable this to print out verbose batching information 74 // Enable this to print out verbose batching information
71 #if 0 75 #if 0
72 for (int i = 0; i < fDrawTargets.count(); ++i) { 76 for (int i = 0; i < fDrawTargets.count(); ++i) {
73 SkDEBUGCODE(fDrawTargets[i]->dump();) 77 SkDEBUGCODE(fDrawTargets[i]->dump();)
74 } 78 }
75 #endif 79 #endif
76 80
77 for (int i = 0; i < fDrawTargets.count(); ++i) {
78 fDrawTargets[i]->prepareBatches(&fFlushState);
79 }
80
81 // Upload all data to the GPU 81 // Upload all data to the GPU
82 fFlushState.preIssueDraws(); 82 fFlushState.preIssueDraws();
83 83
84 for (int i = 0; i < fDrawTargets.count(); ++i) { 84 for (int i = 0; i < fDrawTargets.count(); ++i) {
85 fDrawTargets[i]->drawBatches(&fFlushState); 85 fDrawTargets[i]->drawBatches(&fFlushState);
86 } 86 }
87 87
88 SkASSERT(fFlushState.nextDrawToken() == fFlushState.nextTokenToFlush()); 88 SkASSERT(fFlushState.nextDrawToken() == fFlushState.nextTokenToFlush());
89 89
90 for (int i = 0; i < fDrawTargets.count(); ++i) { 90 for (int i = 0; i < fDrawTargets.count(); ++i) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 fContext, this, std::mov e(rt), 180 fContext, this, std::mov e(rt),
181 surfaceProps, 181 surfaceProps,
182 fContext->getAuditTrail( ), fSingleOwner)); 182 fContext->getAuditTrail( ), fSingleOwner));
183 } 183 }
184 } 184 }
185 185
186 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), surfaceProps, 186 return sk_sp<GrDrawContext>(new GrDrawContext(fContext, this, std::move(rt), surfaceProps,
187 fContext->getAuditTrail(), 187 fContext->getAuditTrail(),
188 fSingleOwner)); 188 fSingleOwner));
189 } 189 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698