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

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

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: cleanup 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 "GrPipeline.h"
11
12 void GrBatchTarget::flush() {
13 FlushBuffer::Iter iter(fFlushBuffer);
14 fVertexPool->unmap();
15 fIndexPool->unmap();
16
17 while (iter.next()) {
18 GrProgramDesc desc;
19 BufferedFlush* bf = iter.get();
20 const GrPipeline* pipeline = bf->fPipeline;
21 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
22 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, pipeline->descInfo() ,
23 bf->fBatchTracker);
24
25 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
26 for (int i = 0; i < bf->fDraws.count(); i++) {
27 fGpu->draw(args, bf->fDraws[i]);
28 }
29 }
30 fFlushBuffer.reset();
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698