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

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

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

Powered by Google App Engine
This is Rietveld 408576698