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

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

Issue 885923002: Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Back to bool 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, pipeline->descIn fo(), 59 fGpu->buildProgramDesc(&desc, *primProc, *pipeline, bf->fBatchTracke r);
60 bf->fBatchTracker);
61 60
62 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker); 61 GrGpu::DrawArgs args(primProc, pipeline, &desc, &bf->fBatchTracker);
63 62
64 int drawCount = bf->fDraws.count(); 63 int drawCount = bf->fDraws.count();
65 const SkSTArray<1, DrawInfo, true>& draws = bf->fDraws; 64 const SkSTArray<1, DrawInfo, true>& draws = bf->fDraws;
66 for (int i = 0; i < drawCount; i++) { 65 for (int i = 0; i < drawCount; i++) {
67 fGpu->draw(args, draws[i]); 66 fGpu->draw(args, draws[i]);
68 } 67 }
69 } 68 }
70 } 69 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 104
106 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer; 105 typedef GrTRecorder<BufferedFlush, TBufferAlign> FlushBuffer;
107 106
108 FlushBuffer fFlushBuffer; 107 FlushBuffer fFlushBuffer;
109 // TODO this is temporary 108 // TODO this is temporary
110 FlushBuffer::Iter fIter; 109 FlushBuffer::Iter fIter;
111 int fNumberOfDraws; 110 int fNumberOfDraws;
112 }; 111 };
113 112
114 #endif 113 #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