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

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

Issue 1292113002: fix up batch_spew (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrTargetCommands.h » ('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 "GrReorderCommandBuilder.h" 8 #include "GrReorderCommandBuilder.h"
9 9
10 template <class Left, class Right> 10 template <class Left, class Right>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 GrBATCH_INFO("\tOutcome:\n"); 48 GrBATCH_INFO("\tOutcome:\n");
49 if (!this->cmdBuffer()->empty()) { 49 if (!this->cmdBuffer()->empty()) {
50 GrTargetCommands::CmdBuffer::ReverseIter reverseIter(*this->cmdBuffer()) ; 50 GrTargetCommands::CmdBuffer::ReverseIter reverseIter(*this->cmdBuffer()) ;
51 51
52 do { 52 do {
53 if (Cmd::kDrawBatch_CmdType == reverseIter->type()) { 53 if (Cmd::kDrawBatch_CmdType == reverseIter->type()) {
54 DrawBatch* previous = static_cast<DrawBatch*>(reverseIter.get()) ; 54 DrawBatch* previous = static_cast<DrawBatch*>(reverseIter.get()) ;
55 55
56 if (previous->batch()->pipeline()->getRenderTarget() != rt) { 56 if (previous->batch()->pipeline()->getRenderTarget() != rt) {
57 GrBATCH_INFO("\t\tBreaking because of (%s, B%u) Rendertarget \n", 57 GrBATCH_INFO("\t\tBreaking because of (%s, B%u) Rendertarget \n",
58 previous->fBatch->name(), previous->fBatch->uni queID()); 58 previous->batch()->name(), previous->batch()->u niqueID());
59 break; 59 break;
60 } 60 }
61 // We cannot continue to search backwards if the render target c hanges 61 // We cannot continue to search backwards if the render target c hanges
62 if (previous->batch()->combineIfPossible(batch, caps)) { 62 if (previous->batch()->combineIfPossible(batch, caps)) {
63 GrBATCH_INFO("\t\tCombining with (%s, B%u)\n", 63 GrBATCH_INFO("\t\tCombining with (%s, B%u)\n",
64 previous->fBatch->name(), previous->fBatch->uni queID()); 64 previous->batch()->name(), previous->batch()->u niqueID());
65 return NULL; 65 return NULL;
66 } 66 }
67 67
68 if (intersect(previous->batch()->bounds(), batch->bounds())) { 68 if (intersect(previous->batch()->bounds(), batch->bounds())) {
69 GrBATCH_INFO("\t\tIntersects with (%s, B%u)\n", 69 GrBATCH_INFO("\t\tIntersects with (%s, B%u)\n",
70 previous->fBatch->name(), previous->fBatch->uni queID()); 70 previous->batch()->name(), previous->batch()->u niqueID());
71 break; 71 break;
72 } 72 }
73 } else if (Cmd::kClear_CmdType == reverseIter->type()) { 73 } else if (Cmd::kClear_CmdType == reverseIter->type()) {
74 Clear* previous = static_cast<Clear*>(reverseIter.get()); 74 Clear* previous = static_cast<Clear*>(reverseIter.get());
75 75
76 // We cannot continue to search backwards if the render target c hanges 76 // We cannot continue to search backwards if the render target c hanges
77 if (previous->renderTarget() != rt) { 77 if (previous->renderTarget() != rt) {
78 GrBATCH_INFO("\t\tBreaking because of Clear's Rendertarget c hange\n"); 78 GrBATCH_INFO("\t\tBreaking because of Clear's Rendertarget c hange\n");
79 break; 79 break;
80 } 80 }
(...skipping 19 matching lines...) Expand all
100 #endif 100 #endif
101 } 101 }
102 #if GR_BATCH_SPEW 102 #if GR_BATCH_SPEW
103 else { 103 else {
104 GrBATCH_INFO("\t\tBreaking because empty command buffer\n"); 104 GrBATCH_INFO("\t\tBreaking because empty command buffer\n");
105 } 105 }
106 #endif 106 #endif
107 107
108 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch, this- >batchTarget())); 108 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch, this- >batchTarget()));
109 } 109 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698