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

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

Issue 851143003: Remove willReadDst from GrFragmentProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferXP
Patch Set: Rebase Created 5 years, 11 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/GrOptDrawState.cpp ('k') | src/gpu/GrProcOptInfo.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 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 #ifndef GrProcOptInfo_DEFINED 8 #ifndef GrProcOptInfo_DEFINED
9 #define GrProcOptInfo_DEFINED 9 #define GrProcOptInfo_DEFINED
10 10
(...skipping 10 matching lines...) Expand all
21 * optimizations related to eliminating stages and vertex attributes that aren't necessary for a 21 * optimizations related to eliminating stages and vertex attributes that aren't necessary for a
22 * draw. 22 * draw.
23 */ 23 */
24 class GrProcOptInfo { 24 class GrProcOptInfo {
25 public: 25 public:
26 GrProcOptInfo() 26 GrProcOptInfo()
27 : fInOut(0, static_cast<GrColorComponentFlags>(0), false) 27 : fInOut(0, static_cast<GrColorComponentFlags>(0), false)
28 , fFirstEffectStageIndex(0) 28 , fFirstEffectStageIndex(0)
29 , fInputColorIsUsed(true) 29 , fInputColorIsUsed(true)
30 , fInputColor(0) 30 , fInputColor(0)
31 , fReadsDst(false)
32 , fReadsFragPosition(false) {} 31 , fReadsFragPosition(false) {}
33 32
34 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s tartColor, 33 void calcWithInitialValues(const GrFragmentStage*, int stageCount, GrColor s tartColor,
35 GrColorComponentFlags flags, bool areCoverageStag es); 34 GrColorComponentFlags flags, bool areCoverageStag es);
36 35
37 void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStag e*, int stagecount); 36 void calcColorWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentStag e*, int stagecount);
38 void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentS tage*, 37 void calcCoverageWithPrimProc(const GrPrimitiveProcessor*, const GrFragmentS tage*,
39 int stagecount); 38 int stagecount);
40 39
41 bool isSolidWhite() const { return fInOut.isSolidWhite(); } 40 bool isSolidWhite() const { return fInOut.isSolidWhite(); }
(...skipping 26 matching lines...) Expand all
68 */ 67 */
69 bool inputColorIsUsed() const { return fInputColorIsUsed; } 68 bool inputColorIsUsed() const { return fInputColorIsUsed; }
70 69
71 /** 70 /**
72 * If input color is used and per-vertex colors are not used, this is the in put color to the 71 * If input color is used and per-vertex colors are not used, this is the in put color to the
73 * first effective stage. 72 * first effective stage.
74 */ 73 */
75 GrColor inputColorToEffectiveStage() const { return fInputColor; } 74 GrColor inputColorToEffectiveStage() const { return fInputColor; }
76 75
77 /** 76 /**
78 * Returns true if any of the stages preserved by GrProcOptInfo read the dst color.
79 */
80 bool readsDst() const { return fReadsDst; }
81
82 /**
83 * Returns true if any of the stages preserved by GrProcOptInfo read the fra g position. 77 * Returns true if any of the stages preserved by GrProcOptInfo read the fra g position.
84 */ 78 */
85 bool readsFragPosition() const { return fReadsFragPosition; } 79 bool readsFragPosition() const { return fReadsFragPosition; }
86 80
87 private: 81 private:
88 void internalCalc(const GrFragmentStage*, int stagecount, bool initWillReadF ragPosition); 82 void internalCalc(const GrFragmentStage*, int stagecount, bool initWillReadF ragPosition);
89 83
90 GrInvariantOutput fInOut; 84 GrInvariantOutput fInOut;
91 int fFirstEffectStageIndex; 85 int fFirstEffectStageIndex;
92 bool fInputColorIsUsed; 86 bool fInputColorIsUsed;
93 GrColor fInputColor; 87 GrColor fInputColor;
94 bool fReadsDst;
95 bool fReadsFragPosition; 88 bool fReadsFragPosition;
96 }; 89 };
97 90
98 #endif 91 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrOptDrawState.cpp ('k') | src/gpu/GrProcOptInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698