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

Side by Side Diff: src/gpu/GrBatchFlushState.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/GrBatchFlushState.h ('k') | src/gpu/GrBatchFontCache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrBatchFlushState.h"
9
10 #include "GrBatchAtlas.h"
11 #include "GrPipeline.h"
12
13 GrBatchFlushState::GrBatchFlushState(GrGpu* gpu, GrResourceProvider* resourcePro vider,
14 GrBatchToken lastFlushedToken)
15 : fGpu(gpu)
16 , fUploader(gpu)
17 , fResourceProvider(resourceProvider)
18 , fVertexPool(gpu)
19 , fIndexPool(gpu)
20 , fCurrentToken(lastFlushedToken)
21 , fLastFlushedToken(lastFlushedToken) {}
22
23 void* GrBatchFlushState::makeVertexSpace(size_t vertexSize, int vertexCount,
24 const GrVertexBuffer** buffer, int* sta rtVertex) {
25 return fVertexPool.makeSpace(vertexSize, vertexCount, buffer, startVertex);
26 }
27
28 uint16_t* GrBatchFlushState::makeIndexSpace(int indexCount,
29 const GrIndexBuffer** buffer, int* s tartIndex) {
30 return reinterpret_cast<uint16_t*>(fIndexPool.makeSpace(indexCount, buffer, startIndex));
31 }
OLDNEW
« no previous file with comments | « src/gpu/GrBatchFlushState.h ('k') | src/gpu/GrBatchFontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698