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

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

Issue 901663007: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/GrDrawTarget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrBatchTarget.h" 8 #include "GrBatchTarget.h"
9 9
10 #include "GrBufferAllocPool.h" 10 #include "GrBufferAllocPool.h"
11 #include "GrPipeline.h" 11 #include "GrPipeline.h"
12 12
13 /* 13 /*
14 void GrBatchTarget::flush() { 14 void GrBatchTarget::flush() {
15 FlushBuffer::Iter iter(fFlushBuffer); 15 FlushBuffer::Iter iter(fFlushBuffer);
16 fVertexPool->unmap(); 16 fVertexPool->unmap();
17 fIndexPool->unmap(); 17 fIndexPool->unmap();
18 18
19 while (iter.next()) { 19 while (iter.next()) {
20 GrProgramDesc desc; 20 GrProgramDesc desc;
21 BufferedFlush* bf = iter.get(); 21 BufferedFlush* bf = iter.get();
22 const GrPipeline* pipeline = bf->fPipeline; 22 const GrPipeline* pipeline = bf->fPipeline;
23 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); 23 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
24 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); 24 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, pipeline->descInfo() ,
25 bf->fBatchTracker);
25 26
26 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); 27 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
27 for (int i = 0; i < bf->fDraws.count(); i++) { 28 for (int i = 0; i < bf->fDraws.count(); i++) {
28 fGpu->draw(args, bf->fDraws[i]); 29 fGpu->draw(args, bf->fDraws[i]);
29 } 30 }
30 } 31 }
31 fFlushBuffer.reset(); 32 fFlushBuffer.reset();
32 }*/ 33 }*/
33 /* 34 /*
34 void GrBatchTarget::flushNext(int n) { 35 void GrBatchTarget::flushNext(int n) {
35 for (; n > 0; n--) { 36 for (; n > 0; n--) {
36 SkDEBUGCODE(bool verify =) fIter.next(); 37 SkDEBUGCODE(bool verify =) fIter.next();
37 SkASSERT(verify); 38 SkASSERT(verify);
38 GrProgramDesc desc; 39 GrProgramDesc desc;
39 BufferedFlush* bf = fIter.get(); 40 BufferedFlush* bf = fIter.get();
40 const GrPipeline* pipeline = bf->fPipeline; 41 const GrPipeline* pipeline = bf->fPipeline;
41 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get(); 42 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get();
42 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracker); 43 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, pipeline->descInfo() ,
44 bf->fBatchTracker);
43 45
44 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); 46 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
45 for (int i = 0; i < bf->fDraws.count(); i++) { 47 for (int i = 0; i < bf->fDraws.count(); i++) {
46 fGpu->draw(args, bf->fDraws[i]); 48 fGpu->draw(args, bf->fDraws[i]);
47 } 49 }
48 } 50 }
49 }*/ 51 }*/
OLDNEW
« no previous file with comments | « src/gpu/GrBatchTarget.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698