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

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

Issue 1215643006: more threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager3
Patch Set: tweaks Created 5 years, 5 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 13 matching lines...) Expand all
24 class GrTexture; 24 class GrTexture;
25 25
26 /////////////////////////////////////////////////////////////////////////////// 26 ///////////////////////////////////////////////////////////////////////////////
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(float k1, float k2, float k3, float k4, b ool enforcePMColor, 34 static GrFragmentProcessor* Create(GrShaderDataManager* shaderDataManager, f loat k1, float k2,
35 GrTexture* background) { 35 float k3, float k4, bool enforcePMColor,
36 return SkNEW_ARGS(GrArithmeticFP, (k1, k2, k3, k4, enforcePMColor, backg round)); 36 GrTexture* background) {
37 return SkNEW_ARGS(GrArithmeticFP, (shaderDataManager, k1, k2, k3, k4, en forcePMColor,
38 background));
37 } 39 }
38 40
39 ~GrArithmeticFP() override {}; 41 ~GrArithmeticFP() override {};
40 42
41 const char* name() const override { return "Arithmetic"; } 43 const char* name() const override { return "Arithmetic"; }
42 44
43 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override; 45 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override;
44 46
45 GrGLFragmentProcessor* createGLInstance() const override; 47 GrGLFragmentProcessor* createGLInstance() const override;
46 48
47 float k1() const { return fK1; } 49 float k1() const { return fK1; }
48 float k2() const { return fK2; } 50 float k2() const { return fK2; }
49 float k3() const { return fK3; } 51 float k3() const { return fK3; }
50 float k4() const { return fK4; } 52 float k4() const { return fK4; }
51 bool enforcePMColor() const { return fEnforcePMColor; } 53 bool enforcePMColor() const { return fEnforcePMColor; }
52 54
53 private: 55 private:
54 bool onIsEqual(const GrFragmentProcessor&) const override; 56 bool onIsEqual(const GrFragmentProcessor&) const override;
55 57
56 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 58 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
57 59
58 GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor, 60 GrArithmeticFP(GrShaderDataManager*, float k1, float k2, float k3, float k4,
59 GrTexture* background); 61 bool enforcePMColor, GrTexture* background);
60 62
61 float fK1, fK2, fK3, fK4; 63 float fK1, fK2, fK3, fK4;
62 bool fEnforcePMColor; 64 bool fEnforcePMColor;
63 GrCoordTransform fBackgroundTransform; 65 GrCoordTransform fBackgroundTransform;
64 GrTextureAccess fBackgroundAccess; 66 GrTextureAccess fBackgroundAccess;
65 67
66 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; 68 GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
67 typedef GrFragmentProcessor INHERITED; 69 typedef GrFragmentProcessor INHERITED;
68 }; 70 };
69 71
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 GR_DECLARE_XP_FACTORY_TEST; 117 GR_DECLARE_XP_FACTORY_TEST;
116 118
117 float fK1, fK2, fK3, fK4; 119 float fK1, fK2, fK3, fK4;
118 bool fEnforcePMColor; 120 bool fEnforcePMColor;
119 121
120 typedef GrXPFactory INHERITED; 122 typedef GrXPFactory INHERITED;
121 }; 123 };
122 124
123 #endif 125 #endif
124 #endif 126 #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