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

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

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: a bit more tweaking Created 5 years, 11 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
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 "GrBatchBuffer.h"
9 #include "GrBufferAllocPool.h"
10 #include "GrOptDrawState.h"
11
12 void GrBatchBuffer::flush() {
13 FlushBuffer::Iter iter(fFlushBuffer);
14 fVertexPool->unmap();
bsalomon 2015/01/21 21:39:29 index pool unmap?
15
16 while (iter.next()) {
17 GrProgramDesc desc;
18 BufferedFlush* bf = iter.get();
19 const GrOptDrawState* optState = bf->fOptState;
20 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
21 fGpu->buildProgramDesc(&desc, *primProc, *optState, optState->descInfo() ,
22 bf->fBatchTracker);
23
24 GrGpu::DrawArgs args(primProc, optState, &desc, &bf->fBatchTracker);
25 for (int i = 0; i < bf->fDraws.count(); i++) {
26 fGpu->draw(args, bf->fDraws[i]);
27 }
28 }
29 fFlushBuffer.reset();
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698