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

Side by Side Diff: src/effects/SkArithmeticMode_gpu.h

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review cleanup Created 5 years, 10 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/effects/SkArithmeticMode_gpu.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 #ifndef SkArithmeticMode_gpu_DEFINED 8 #ifndef SkArithmeticMode_gpu_DEFINED
9 #define SkArithmeticMode_gpu_DEFINED 9 #define SkArithmeticMode_gpu_DEFINED
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI, 93 void getInvariantOutput(const GrProcOptInfo& colorPOI, const GrProcOptInfo& coveragePOI,
94 GrXPFactory::InvariantOutput*) const SK_OVERRIDE; 94 GrXPFactory::InvariantOutput*) const SK_OVERRIDE;
95 95
96 private: 96 private:
97 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM Color); 97 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM Color);
98 98
99 GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI, 99 GrXferProcessor* onCreateXferProcessor(const GrProcOptInfo& colorPOI,
100 const GrProcOptInfo& coveragePOI, 100 const GrProcOptInfo& coveragePOI,
101 const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE; 101 const GrDeviceCoordTexture* dstCopy) const SK_OVERRIDE;
102 102
103 bool willReadDstColor() const SK_OVERRIDE { return true; } 103 bool willReadDstColor(const GrProcOptInfo& colorPOI,
104 const GrProcOptInfo& coveragePOI) const SK_OVERRIDE {
105 return true;
106 }
104 107
105 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE { 108 bool onIsEqual(const GrXPFactory& xpfBase) const SK_OVERRIDE {
106 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>() ; 109 const GrArithmeticXPFactory& xpf = xpfBase.cast<GrArithmeticXPFactory>() ;
107 if (fK1 != xpf.fK1 || 110 if (fK1 != xpf.fK1 ||
108 fK2 != xpf.fK2 || 111 fK2 != xpf.fK2 ||
109 fK3 != xpf.fK3 || 112 fK3 != xpf.fK3 ||
110 fK4 != xpf.fK4 || 113 fK4 != xpf.fK4 ||
111 fEnforcePMColor != xpf.fEnforcePMColor) { 114 fEnforcePMColor != xpf.fEnforcePMColor) {
112 return false; 115 return false;
113 } 116 }
114 return true; 117 return true;
115 } 118 }
116 119
117 GR_DECLARE_XP_FACTORY_TEST; 120 GR_DECLARE_XP_FACTORY_TEST;
118 121
119 float fK1, fK2, fK3, fK4; 122 float fK1, fK2, fK3, fK4;
120 bool fEnforcePMColor; 123 bool fEnforcePMColor;
121 124
122 typedef GrXPFactory INHERITED; 125 typedef GrXPFactory INHERITED;
123 }; 126 };
124 127
125 #endif 128 #endif
126 #endif 129 #endif
OLDNEW
« no previous file with comments | « include/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698