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

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

Issue 1275083002: Don't pass pipeline to GrBatch::generateGeometry() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrDrawContext.cpp ('k') | src/gpu/GrOvalRenderer.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 #include "GrImmediateDrawTarget.h" 8 #include "GrImmediateDrawTarget.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 21 matching lines...) Expand all
32 32
33 if (!shouldDraw) { 33 if (!shouldDraw) {
34 pipeline->~GrPipeline(); 34 pipeline->~GrPipeline();
35 return; 35 return;
36 } 36 }
37 37
38 batch->initBatchTracker(pipeline->infoForPrimitiveProcessor()); 38 batch->initBatchTracker(pipeline->infoForPrimitiveProcessor());
39 39
40 fBatchTarget.resetNumberOfDraws(); 40 fBatchTarget.resetNumberOfDraws();
41 41
42 batch->generateGeometry(&fBatchTarget, pipeline); 42 batch->generateGeometry(&fBatchTarget);
43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws()); 43 batch->setNumberOfDraws(fBatchTarget.numberOfDraws());
44 44
45 fBatchTarget.preFlush(); 45 fBatchTarget.preFlush();
46 fBatchTarget.flushNext(batch->numberOfDraws()); 46 fBatchTarget.flushNext(batch->numberOfDraws());
47 fBatchTarget.postFlush(); 47 fBatchTarget.postFlush();
48 48
49 pipeline->~GrPipeline(); 49 pipeline->~GrPipeline();
50 } 50 }
51 51
52 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color, 52 void GrImmediateDrawTarget::onClear(const SkIRect* rect, GrColor color,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) { 99 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) {
100 const GrXferProcessor& xp = *pipeline->getXferProcessor(); 100 const GrXferProcessor& xp = *pipeline->getXferProcessor();
101 GrRenderTarget* rt = pipeline->getRenderTarget(); 101 GrRenderTarget* rt = pipeline->getRenderTarget();
102 102
103 GrXferBarrierType barrierType; 103 GrXferBarrierType barrierType;
104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { 104 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) {
105 this->getGpu()->xferBarrier(rt, barrierType); 105 this->getGpu()->xferBarrier(rt, barrierType);
106 } 106 }
107 } 107 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698