OLD | NEW |
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 /////////////////////////////////////////////////////////////////////////////// | 74 /////////////////////////////////////////////////////////////////////////////// |
75 // Xfer Processor | 75 // Xfer Processor |
76 /////////////////////////////////////////////////////////////////////////////// | 76 /////////////////////////////////////////////////////////////////////////////// |
77 | 77 |
78 class GrArithmeticXPFactory : public GrXPFactory { | 78 class GrArithmeticXPFactory : public GrXPFactory { |
79 public: | 79 public: |
80 static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enfo
rcePMColor) { | 80 static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enfo
rcePMColor) { |
81 return new GrArithmeticXPFactory(k1, k2, k3, k4, enforcePMColor); | 81 return new GrArithmeticXPFactory(k1, k2, k3, k4, enforcePMColor); |
82 } | 82 } |
83 | 83 |
84 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const
override { | |
85 return true; | |
86 } | |
87 | |
88 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, | 84 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, |
89 GrXPFactory::InvariantBlendedColor*) const ove
rride; | 85 GrXPFactory::InvariantBlendedColor*) const ove
rride; |
90 | 86 |
91 private: | 87 private: |
92 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); | 88 GrArithmeticXPFactory(float k1, float k2, float k3, float k4, bool enforcePM
Color); |
93 | 89 |
94 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, | 90 GrXferProcessor* onCreateXferProcessor(const GrCaps& caps, |
95 const GrProcOptInfo& colorPOI, | 91 const GrProcOptInfo& colorPOI, |
96 const GrProcOptInfo& coveragePOI, | 92 const GrProcOptInfo& coveragePOI, |
97 bool hasMixedSamples, | 93 bool hasMixedSamples, |
(...skipping 21 matching lines...) Expand all Loading... |
119 GR_DECLARE_XP_FACTORY_TEST; | 115 GR_DECLARE_XP_FACTORY_TEST; |
120 | 116 |
121 float fK1, fK2, fK3, fK4; | 117 float fK1, fK2, fK3, fK4; |
122 bool fEnforcePMColor; | 118 bool fEnforcePMColor; |
123 | 119 |
124 typedef GrXPFactory INHERITED; | 120 typedef GrXPFactory INHERITED; |
125 }; | 121 }; |
126 | 122 |
127 #endif | 123 #endif |
128 #endif | 124 #endif |
OLD | NEW |