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

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

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 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/SkAlphaThresholdFilter.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 24 matching lines...) Expand all
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 SkNEW_ARGS(GrArithmeticFP, (procDataManager, k1, k2, k3, k4, enfo rcePMColor,
38 background)); 38 background));
39 } 39 }
40 40
41 ~GrArithmeticFP() override {}; 41 ~GrArithmeticFP() override {};
42 42
43 const char* name() const override { return "Arithmetic"; } 43 const char* name() const override { return "Arithmetic"; }
44 44
45 GrGLFragmentProcessor* createGLInstance() const override;
46
47 float k1() const { return fK1; } 45 float k1() const { return fK1; }
48 float k2() const { return fK2; } 46 float k2() const { return fK2; }
49 float k3() const { return fK3; } 47 float k3() const { return fK3; }
50 float k4() const { return fK4; } 48 float k4() const { return fK4; }
51 bool enforcePMColor() const { return fEnforcePMColor; } 49 bool enforcePMColor() const { return fEnforcePMColor; }
52 50
53 private: 51 private:
52 GrGLFragmentProcessor* onCreateGLInstance() const override;
53
54 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override; 54 void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) c onst override;
55 55
56 bool onIsEqual(const GrFragmentProcessor&) const override; 56 bool onIsEqual(const GrFragmentProcessor&) const override;
57 57
58 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 58 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
59 59
60 GrArithmeticFP(GrProcessorDataManager*, float k1, float k2, float k3, float k4, 60 GrArithmeticFP(GrProcessorDataManager*, float k1, float k2, float k3, float k4,
61 bool enforcePMColor, GrTexture* background); 61 bool enforcePMColor, GrTexture* background);
62 62
63 float fK1, fK2, fK3, fK4; 63 float fK1, fK2, fK3, fK4;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 GR_DECLARE_XP_FACTORY_TEST; 117 GR_DECLARE_XP_FACTORY_TEST;
118 118
119 float fK1, fK2, fK3, fK4; 119 float fK1, fK2, fK3, fK4;
120 bool fEnforcePMColor; 120 bool fEnforcePMColor;
121 121
122 typedef GrXPFactory INHERITED; 122 typedef GrXPFactory INHERITED;
123 }; 123 };
124 124
125 #endif 125 #endif
126 #endif 126 #endif
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698