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

Side by Side Diff: src/effects/SkArithmeticMode_gpu.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 | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/gpu/GrDrawState.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 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 SkArithmeticMode_gpu_DEFINED 8 #ifndef SkArithmeticMode_gpu_DEFINED
9 #define SkArithmeticMode_gpu_DEFINED 9 #define SkArithmeticMode_gpu_DEFINED
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return true; 147 return true;
148 } 148 }
149 149
150 bool canTweakAlphaForCoverage() const SK_OVERRIDE { 150 bool canTweakAlphaForCoverage() const SK_OVERRIDE {
151 return false; 151 return false;
152 } 152 }
153 153
154 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, 154 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
155 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; 155 GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
156 156
157 bool willReadDst(const GrProcOptInfo& colorPOI, 157 bool willReadDst() const SK_OVERRIDE { return true; }
158 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
159 return true;
160 }
161 158
162 private: 159 private:
163 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM Color); 160 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM Color);
164 161
165 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { 162 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
166 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>() ; 163 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>() ;
167 if (fK1 != xpf.fK1 || 164 if (fK1 != xpf.fK1 ||
168 fK2 != xpf.fK2 || 165 fK2 != xpf.fK2 ||
169 fK3 != xpf.fK3 || 166 fK3 != xpf.fK3 ||
170 fK4 != xpf.fK4 || 167 fK4 != xpf.fK4 ||
171 fEnforcePMColor != xpf.fEnforcePMColor) { 168 fEnforcePMColor != xpf.fEnforcePMColor) {
172 return false; 169 return false;
173 } 170 }
174 return true; 171 return true;
175 } 172 }
176 173
177 GR_DECLARE_XP_FACTORY_TEST; 174 GR_DECLARE_XP_FACTORY_TEST;
178 175
179 float fK1, fK2, fK3, fK4; 176 float fK1, fK2, fK3, fK4;
180 bool fEnforcePMColor; 177 bool fEnforcePMColor;
181 178
182 typedef GrXPFactory INHERITED; 179 typedef GrXPFactory INHERITED;
183 }; 180 };
184 181
185 #endif 182 #endif
186 #endif 183 #endif
OLDNEW
« no previous file with comments | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/gpu/GrDrawState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698