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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 3 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/effects/SkArithmeticMode.cpp ('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 16 matching lines...) Expand all
27 // Fragment Processor 27 // Fragment Processor
28 /////////////////////////////////////////////////////////////////////////////// 28 ///////////////////////////////////////////////////////////////////////////////
29 29
30 class GrGLArtithmeticFP; 30 class GrGLArtithmeticFP;
31 31
32 class GrArithmeticFP : public GrFragmentProcessor { 32 class GrArithmeticFP : public GrFragmentProcessor {
33 public: 33 public:
34 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, float k1, float k2, 34 static GrFragmentProcessor* Create(GrProcessorDataManager* procDataManager, float k1, float k2,
35 float k3, float k4, bool enforcePMColor, 35 float k3, float k4, bool enforcePMColor,
36 GrTexture* background) { 36 GrTexture* background) {
37 return SkNEW_ARGS(GrArithmeticFP, (procDataManager, k1, k2, k3, k4, enfo rcePMColor, 37 return new GrArithmeticFP(procDataManager, k1, k2, k3, k4, enforcePMColo r, background);
38 background));
39 } 38 }
40 39
41 ~GrArithmeticFP() override {}; 40 ~GrArithmeticFP() override {};
42 41
43 const char* name() const override { return "Arithmetic"; } 42 const char* name() const override { return "Arithmetic"; }
44 43
45 float k1() const { return fK1; } 44 float k1() const { return fK1; }
46 float k2() const { return fK2; } 45 float k2() const { return fK2; }
47 float k3() const { return fK3; } 46 float k3() const { return fK3; }
48 float k4() const { return fK4; } 47 float k4() const { return fK4; }
(...skipping 20 matching lines...) Expand all
69 typedef GrFragmentProcessor INHERITED; 68 typedef GrFragmentProcessor INHERITED;
70 }; 69 };
71 70
72 /////////////////////////////////////////////////////////////////////////////// 71 ///////////////////////////////////////////////////////////////////////////////
73 // Xfer Processor 72 // Xfer Processor
74 /////////////////////////////////////////////////////////////////////////////// 73 ///////////////////////////////////////////////////////////////////////////////
75 74
76 class GrArithmeticXPFactory : public GrXPFactory { 75 class GrArithmeticXPFactory : public GrXPFactory {
77 public: 76 public:
78 static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enfo rcePMColor) { 77 static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enfo rcePMColor) {
79 return SkNEW_ARGS(GrArithmeticXPFactory, (k1, k2, k3, k4, enforcePMColor )); 78 return new GrArithmeticXPFactory(k1, k2, k3, k4, enforcePMColor);
80 } 79 }
81 80
82 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override { 81 bool supportsRGBCoverage(GrColor knownColor, uint32_t knownColorFlags) const override {
83 return true; 82 return true;
84 } 83 }
85 84
86 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI, 85 void getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
87 GrXPFactory::InvariantBlendedColor*) const ove rride; 86 GrXPFactory::InvariantBlendedColor*) const ove rride;
88 87
89 private: 88 private:
(...skipping 27 matching lines...) Expand all
117 GR_DECLARE_XP_FACTORY_TEST; 116 GR_DECLARE_XP_FACTORY_TEST;
118 117
119 float fK1, fK2, fK3, fK4; 118 float fK1, fK2, fK3, fK4;
120 bool fEnforcePMColor; 119 bool fEnforcePMColor;
121 120
122 typedef GrXPFactory INHERITED; 121 typedef GrXPFactory INHERITED;
123 }; 122 };
124 123
125 #endif 124 #endif
126 #endif 125 #endif
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698