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

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

Issue 1213383005: Rework GrPipelineInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed Created 5 years, 5 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/GrInOrderDrawBuffer.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 15 matching lines...) Expand all
26 26
27 void GrImmediateDrawTarget::onDrawBatch(GrBatch* batch, 27 void GrImmediateDrawTarget::onDrawBatch(GrBatch* batch,
28 const PipelineInfo& pipelineInfo) { 28 const PipelineInfo& pipelineInfo) {
29 SkAlignedSStorage<sizeof(GrPipeline)> pipelineStorage; 29 SkAlignedSStorage<sizeof(GrPipeline)> pipelineStorage;
30 GrPipeline* pipeline = reinterpret_cast<GrPipeline*>(pipelineStorage.get()); 30 GrPipeline* pipeline = reinterpret_cast<GrPipeline*>(pipelineStorage.get());
31 if (!this->setupPipelineAndShouldDraw(pipeline, pipelineInfo)) { 31 if (!this->setupPipelineAndShouldDraw(pipeline, pipelineInfo)) {
32 pipeline->~GrPipeline(); 32 pipeline->~GrPipeline();
33 return; 33 return;
34 } 34 }
35 35
36 batch->initBatchTracker(pipeline->getInitBatchTracker()); 36 batch->initBatchTracker(pipeline->infoForPrimitiveProcessor());
37 37
38 fBatchTarget.resetNumberOfDraws(); 38 fBatchTarget.resetNumberOfDraws();
39 39
40 batch->generateGeometry(&fBatchTarget, pipeline); 40 batch->generateGeometry(&fBatchTarget, pipeline);
41 batch->setNumberOfDraws(fBatchTarget.numberOfDraws()); 41 batch->setNumberOfDraws(fBatchTarget.numberOfDraws());
42 42
43 fBatchTarget.preFlush(); 43 fBatchTarget.preFlush();
44 fBatchTarget.flushNext(batch->numberOfDraws()); 44 fBatchTarget.flushNext(batch->numberOfDraws());
45 fBatchTarget.postFlush(); 45 fBatchTarget.postFlush();
46 46
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) { 90 void GrImmediateDrawTarget::recordXferBarrierIfNecessary(const GrPipeline* pipel ine) {
91 const GrXferProcessor& xp = *pipeline->getXferProcessor(); 91 const GrXferProcessor& xp = *pipeline->getXferProcessor();
92 GrRenderTarget* rt = pipeline->getRenderTarget(); 92 GrRenderTarget* rt = pipeline->getRenderTarget();
93 93
94 GrXferBarrierType barrierType; 94 GrXferBarrierType barrierType;
95 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) { 95 if (xp.willNeedXferBarrier(rt, *this->caps(), &barrierType)) {
96 this->getGpu()->xferBarrier(rt, barrierType); 96 this->getGpu()->xferBarrier(rt, barrierType);
97 } 97 }
98 } 98 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrInOrderDrawBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698