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

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

Issue 1293583002: Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove duplicated fields in GrVertexBatch 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/GrProcOptInfo.h ('k') | src/gpu/GrReorderCommandBuilder.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 2014 Google Inc. 2 * Copyright 2014 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 "GrProcOptInfo.h" 8 #include "GrProcOptInfo.h"
9 9
10 #include "GrGeometryProcessor.h" 10 #include "GrGeometryProcessor.h"
11 11
12 #include "batches/GrBatch.h" 12 #include "batches/GrBatch.h"
13 13
14 void GrProcOptInfo::calcColorWithBatch(const GrBatch* batch, 14 void GrProcOptInfo::calcColorWithBatch(const GrDrawBatch* batch,
15 const GrFragmentStage* stages, 15 const GrFragmentStage* stages,
16 int stageCount) { 16 int stageCount) {
17 GrInitInvariantOutput out; 17 GrInitInvariantOutput out;
18 batch->getInvariantOutputColor(&out); 18 batch->getInvariantOutputColor(&out);
19 fInOut.reset(out); 19 fInOut.reset(out);
20 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); 20 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition());
21 } 21 }
22 22
23 void GrProcOptInfo::calcCoverageWithBatch(const GrBatch* batch, 23 void GrProcOptInfo::calcCoverageWithBatch(const GrDrawBatch* batch,
24 const GrFragmentStage* stages, 24 const GrFragmentStage* stages,
25 int stageCount) { 25 int stageCount) {
26 GrInitInvariantOutput out; 26 GrInitInvariantOutput out;
27 batch->getInvariantOutputCoverage(&out); 27 batch->getInvariantOutputCoverage(&out);
28 fInOut.reset(out); 28 fInOut.reset(out);
29 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition()); 29 this->internalCalc(stages, stageCount, batch->willReadFragmentPosition());
30 } 30 }
31 31
32 void GrProcOptInfo::calcColorWithPrimProc(const GrPrimitiveProcessor* primProc, 32 void GrProcOptInfo::calcColorWithPrimProc(const GrPrimitiveProcessor* primProc,
33 const GrFragmentStage* stages, 33 const GrFragmentStage* stages,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 fInputColor = fInOut.color(); 87 fInputColor = fInOut.color();
88 fInputColorIsUsed = true; 88 fInputColorIsUsed = true;
89 // Since we are clearing all previous color stages we are in a state where we have found 89 // Since we are clearing all previous color stages we are in a state where we have found
90 // zero stages that don't multiply the inputColor. 90 // zero stages that don't multiply the inputColor.
91 fInOut.resetNonMulStageFound(); 91 fInOut.resetNonMulStageFound();
92 // Reset these since we don't care if previous stages read these val ues 92 // Reset these since we don't care if previous stages read these val ues
93 fReadsFragPosition = initWillReadFragmentPosition; 93 fReadsFragPosition = initWillReadFragmentPosition;
94 } 94 }
95 } 95 }
96 } 96 }
OLDNEW
« no previous file with comments | « src/gpu/GrProcOptInfo.h ('k') | src/gpu/GrReorderCommandBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698