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

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

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/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/GrBatchTarget.cpp » ('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 #ifndef GrBatchBuffer_DEFINED 8 #ifndef GrBatchBuffer_DEFINED
9 #define GrBatchBuffer_DEFINED 9 #define GrBatchBuffer_DEFINED
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 int numberOfDraws() const { return fNumberOfDraws; } 49 int numberOfDraws() const { return fNumberOfDraws; }
50 void preFlush() { fIter = FlushBuffer::Iter(fFlushBuffer); } 50 void preFlush() { fIter = FlushBuffer::Iter(fFlushBuffer); }
51 void flushNext(int n) { 51 void flushNext(int n) {
52 for (; n > 0; n--) { 52 for (; n > 0; n--) {
53 SkDEBUGCODE(bool verify =) fIter.next(); 53 SkDEBUGCODE(bool verify =) fIter.next();
54 SkASSERT(verify); 54 SkASSERT(verify);
55 GrProgramDesc desc; 55 GrProgramDesc desc;
56 BufferedFlush* bf = fIter.get(); 56 BufferedFlush* bf = fIter.get();
57 const GrPipeline* pipeline = bf->fPipeline; 57 const GrPipeline* pipeline = bf->fPipeline;
58 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get() ; 58 const GrPrimitiveProcessor* primProc = bf->fPrimitiveProcessor.get() ;
59 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracke r); 59 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, pipeline->descIn fo(),
60 bf->fBatchTracker);
60 61
61 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); 62 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
62 63
63 int drawCount = bf->fDraws.count(); 64 int drawCount = bf->fDraws.count();
64 const SkSTArray<1, DrawInfo, true>& draws = bf->fDraws; 65 const SkSTArray<1, DrawInfo, true>& draws = bf->fDraws;
65 for (int i = 0; i < drawCount; i++) { 66 for (int i = 0; i < drawCount; i++) {
66 fGpu->draw(args, draws[i]); 67 fGpu->draw(args, draws[i]);
67 } 68 }
68 } 69 }
69 } 70 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer; 106 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer;
106 107
107 FlushBuffer fFlushBuffer; 108 FlushBuffer fFlushBuffer;
108 // TODO this is temporary 109 // TODO this is temporary
109 FlushBuffer::Iter fIter; 110 FlushBuffer::Iter fIter;
110 int fNumberOfDraws; 111 int fNumberOfDraws;
111 }; 112 };
112 113
113 #endif 114 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/GrBatchTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698