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

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

Issue 1276913002: Add Batch logging (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/GrCommandBuilder.cpp ('k') | src/gpu/GrReorderCommandBuilder.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 "GrInOrderCommandBuilder.h" 8 #include "GrInOrderCommandBuilder.h"
9 9
10 #include "GrBufferedDrawTarget.h" 10 #include "GrBufferedDrawTarget.h"
(...skipping 10 matching lines...) Expand all
21 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace)); 21 SkASSERT(kIncClamp_StencilOp == pathStencilSettings.failOp(pathFace));
22 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace)); 22 SkASSERT(0x1 != pathStencilSettings.writeMask(pathFace));
23 SkASSERT(!pathStencilSettings.isTwoSided()); 23 SkASSERT(!pathStencilSettings.isTwoSided());
24 } 24 }
25 return isWinding; 25 return isWinding;
26 } 26 }
27 27
28 GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(State* state, Gr Batch* batch) { 28 GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(State* state, Gr Batch* batch) {
29 // Check if there is a Batch Draw we can batch with 29 // Check if there is a Batch Draw we can batch with
30 batch->setPipeline(state->getPipeline()); 30 batch->setPipeline(state->getPipeline());
31 GrBATCH_INFO("In-Recording (%s, %u)\n", batch->name(), batch->uniqueID());
31 if (!this->cmdBuffer()->empty() && 32 if (!this->cmdBuffer()->empty() &&
32 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) { 33 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) {
33 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() ); 34 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() );
34 if (previous->fState == state && previous->fBatch->combineIfPossible(bat ch)) { 35 if (previous->fState == state && previous->fBatch->combineIfPossible(bat ch)) {
36 GrBATCH_INFO("\tBatching with (%s, %u)\n",
37 previous->fBatch->name(), previous->fBatch->uniqueID()) ;
35 return NULL; 38 return NULL;
36 } 39 }
37 } 40 }
38 41
39 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (state, batch , 42 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (state, batch ,
40 this->batchT arget())); 43 this->batchT arget()));
41 } 44 }
42 45
43 GrTargetCommands::Cmd* 46 GrTargetCommands::Cmd*
44 GrInOrderCommandBuilder::recordStencilPath(const GrPipelineBuilder& pipelineBuil der, 47 GrInOrderCommandBuilder::recordStencilPath(const GrPipelineBuilder& pipelineBuil der,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 123
121 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange)); 124 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange));
122 dp->fIndices = savedIndices; 125 dp->fIndices = savedIndices;
123 dp->fIndexType = indexType; 126 dp->fIndexType = indexType;
124 dp->fTransforms = savedTransforms; 127 dp->fTransforms = savedTransforms;
125 dp->fTransformType = transformType; 128 dp->fTransformType = transformType;
126 dp->fCount = count; 129 dp->fCount = count;
127 dp->fStencilSettings = stencilSettings; 130 dp->fStencilSettings = stencilSettings;
128 return dp; 131 return dp;
129 } 132 }
OLDNEW
« no previous file with comments | « src/gpu/GrCommandBuilder.cpp ('k') | src/gpu/GrReorderCommandBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698