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

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

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 6 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/GrBatchFlushState.h ('k') | src/gpu/GrDrawTarget.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 "GrBatchFlushState.h" 8 #include "GrBatchFlushState.h"
9 9
10 #include "GrBatchAtlas.h" 10 #include "GrBatchAtlas.h"
11 #include "GrPipeline.h" 11 #include "GrPipeline.h"
12 12
13 GrBatchFlushState::GrBatchFlushState(GrGpu* gpu, GrResourceProvider* resourcePro vider) 13 GrBatchFlushState::GrBatchFlushState(GrGpu* gpu, GrResourceProvider* resourcePro vider)
14 : fGpu(gpu) 14 : fGpu(gpu)
15 , fResourceProvider(resourceProvider) 15 , fResourceProvider(resourceProvider)
16 , fCommandBuffer(nullptr)
16 , fVertexPool(gpu) 17 , fVertexPool(gpu)
17 , fIndexPool(gpu) 18 , fIndexPool(gpu)
18 , fLastIssuedToken(GrBatchDrawToken::AlreadyFlushedToken()) 19 , fLastIssuedToken(GrBatchDrawToken::AlreadyFlushedToken())
19 , fLastFlushedToken(0) {} 20 , fLastFlushedToken(0) {}
20 21
21 void* GrBatchFlushState::makeVertexSpace(size_t vertexSize, int vertexCount, 22 void* GrBatchFlushState::makeVertexSpace(size_t vertexSize, int vertexCount,
22 const GrBuffer** buffer, int* startVert ex) { 23 const GrBuffer** buffer, int* startVert ex) {
23 return fVertexPool.makeSpace(vertexSize, vertexCount, buffer, startVertex); 24 return fVertexPool.makeSpace(vertexSize, vertexCount, buffer, startVertex);
24 } 25 }
25 26
26 uint16_t* GrBatchFlushState::makeIndexSpace(int indexCount, 27 uint16_t* GrBatchFlushState::makeIndexSpace(int indexCount,
27 const GrBuffer** buffer, int* startI ndex) { 28 const GrBuffer** buffer, int* startI ndex) {
28 return reinterpret_cast<uint16_t*>(fIndexPool.makeSpace(indexCount, buffer, startIndex)); 29 return reinterpret_cast<uint16_t*>(fIndexPool.makeSpace(indexCount, buffer, startIndex));
29 } 30 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchFlushState.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698