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

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

Issue 1118403003: create GrInOrderCommandBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@rect-batch
Patch Set: Created 5 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 | « src/gpu/GrInOrderDrawBuffer.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 2011 Google Inc. 2 * Copyright 2011 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 "GrInOrderDrawBuffer.h" 8 #include "GrInOrderDrawBuffer.h"
9 9
10 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context, 10 GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrContext* context,
11 GrVertexBufferAllocPool* vertexPool, 11 GrVertexBufferAllocPool* vertexPool,
12 GrIndexBufferAllocPool* indexPool) 12 GrIndexBufferAllocPool* indexPool)
13 : INHERITED(context, vertexPool, indexPool) 13 : INHERITED(context, vertexPool, indexPool)
14 , fCommands(SkNEW_ARGS(GrCommandBuilder, (context->getGpu(), vertexPool, ind exPool))) 14 , fCommands(SkNEW_ARGS(GrInOrderCommandBuilder, (context->getGpu(), vertexPo ol, indexPool)))
15 , fPathIndexBuffer(kPathIdxBufferMinReserve * sizeof(char)/4) 15 , fPathIndexBuffer(kPathIdxBufferMinReserve * sizeof(char)/4)
16 , fPathTransformBuffer(kPathXformBufferMinReserve * sizeof(float)/4) 16 , fPathTransformBuffer(kPathXformBufferMinReserve * sizeof(float)/4)
17 , fPipelineBuffer(kPipelineBufferMinReserve) 17 , fPipelineBuffer(kPipelineBufferMinReserve)
18 , fDrawID(0) { 18 , fDrawID(0) {
19 19
20 SkASSERT(vertexPool); 20 SkASSERT(vertexPool);
21 SkASSERT(indexPool); 21 SkASSERT(indexPool);
22 } 22 }
23 23
24 GrInOrderDrawBuffer::~GrInOrderDrawBuffer() { 24 GrInOrderDrawBuffer::~GrInOrderDrawBuffer() {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 fPrevState->getPipeline()->isEqual(*state->getPipeline())) { 192 fPrevState->getPipeline()->isEqual(*state->getPipeline())) {
193 this->unallocState(state); 193 this->unallocState(state);
194 } else { 194 } else {
195 fPrevState.reset(state); 195 fPrevState.reset(state);
196 } 196 }
197 197
198 this->recordTraceMarkersIfNecessary( 198 this->recordTraceMarkersIfNecessary(
199 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps())); 199 fCommands->recordXferBarrierIfNecessary(*fPrevState->getPipeline(), *this->caps()));
200 return fPrevState; 200 return fPrevState;
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698