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

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

Issue 1286043004: Make GrVertexBatch objects hold their own draws during GrDrawTarget flush (Closed) Base URL: https://skia.googlesource.com/skia.git@m
Patch Set: forward decl 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.h ('k') | src/gpu/GrOvalRenderer.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 20 matching lines...) Expand all
31 if (!this->cmdBuffer()->empty() && 31 if (!this->cmdBuffer()->empty() &&
32 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) { 32 Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) {
33 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() ); 33 DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back() );
34 if (previous->batch()->combineIfPossible(batch, caps)) { 34 if (previous->batch()->combineIfPossible(batch, caps)) {
35 GrBATCH_INFO("\tBatching with (%s, %u)\n", 35 GrBATCH_INFO("\tBatching with (%s, %u)\n",
36 previous->batch()->name(), previous->batch()->uniqueID( )); 36 previous->batch()->name(), previous->batch()->uniqueID( ));
37 return NULL; 37 return NULL;
38 } 38 }
39 } 39 }
40 40
41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch, this- >batchTarget())); 41 return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch));
42 } 42 }
43 43
44 GrTargetCommands::Cmd* 44 GrTargetCommands::Cmd*
45 GrInOrderCommandBuilder::recordStencilPath(const GrPipelineBuilder& pipelineBuil der, 45 GrInOrderCommandBuilder::recordStencilPath(const GrPipelineBuilder& pipelineBuil der,
46 const GrPathProcessor* pathProc, 46 const GrPathProcessor* pathProc,
47 const GrPath* path, 47 const GrPath* path,
48 const GrScissorState& scissorState, 48 const GrScissorState& scissorState,
49 const GrStencilSettings& stencilSetti ngs) { 49 const GrStencilSettings& stencilSetti ngs) {
50 StencilPath* sp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), StencilPath, 50 StencilPath* sp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), StencilPath,
51 (path, pipelineBuilder.getRenderT arget())); 51 (path, pipelineBuilder.getRenderT arget()));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange)); 122 DrawPaths* dp = GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawPaths, (sta te, pathRange));
123 dp->fIndices = savedIndices; 123 dp->fIndices = savedIndices;
124 dp->fIndexType = indexType; 124 dp->fIndexType = indexType;
125 dp->fTransforms = savedTransforms; 125 dp->fTransforms = savedTransforms;
126 dp->fTransformType = transformType; 126 dp->fTransformType = transformType;
127 dp->fCount = count; 127 dp->fCount = count;
128 dp->fStencilSettings = stencilSettings; 128 dp->fStencilSettings = stencilSettings;
129 return dp; 129 return dp;
130 } 130 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderCommandBuilder.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698