1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "GrBatchTarget.h"
#include "GrPipeline.h"
/*
void GrBatchTarget::flush() {
FlushBuffer::Iter iter(fFlushBuffer);
fVertexPool->unmap();
fIndexPool->unmap();
while (iter.next()) {
GrProgramDesc desc;
BufferedFlush* bf = iter.get();
const GrPipeline* pipeline = bf->fPipeline;
const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker);
GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
for (int i = 0; i < bf->fDraws.count(); i++) {
fGpu->draw(args, bf->fDraws[i]);
}
}
fFlushBuffer.reset();
}*/
/*
void GrBatchTarget::flushNext(int n) {
for (; n > 0; n--) {
SkDEBUGCODE(bool verify =) fIter.next();
SkASSERT(verify);
GrProgramDesc desc;
BufferedFlush* bf = fIter.get();
const GrPipeline* pipeline = bf->fPipeline;
const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker);
GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
for (int i = 0; i < bf->fDraws.count(); i++) {
fGpu->draw(args, bf->fDraws[i]);
}
}
}*/
|