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

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

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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/core/SkXfermode.cpp ('k') | src/effects/SkBlurMaskFilter.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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698