OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGLFragmentProcessor_DEFINED | 8 #ifndef GrGLFragmentProcessor_DEFINED |
9 #define GrGLFragmentProcessor_DEFINED | 9 #define GrGLFragmentProcessor_DEFINED |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void setData(const GrGLProgramDataManager& pdman, const GrFragmentProcessor&
processor); | 73 void setData(const GrGLProgramDataManager& pdman, const GrFragmentProcessor&
processor); |
74 | 74 |
75 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil
der*) {} | 75 static void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuil
der*) {} |
76 | 76 |
77 int numChildProcessors() const { return fChildProcessors.count(); } | 77 int numChildProcessors() const { return fChildProcessors.count(); } |
78 | 78 |
79 GrGLFragmentProcessor* childProcessor(int index) const { | 79 GrGLFragmentProcessor* childProcessor(int index) const { |
80 return fChildProcessors[index]; | 80 return fChildProcessors[index]; |
81 } | 81 } |
82 | 82 |
| 83 void emitChild(int childIndex, const char* inputColor, SkString* outputColor
, EmitArgs& args); |
| 84 |
83 protected: | 85 protected: |
84 /** A GrGLFragmentProcessor instance can be reused with any GrFragmentProces
sor that produces | 86 /** A GrGLFragmentProcessor instance can be reused with any GrFragmentProces
sor that produces |
85 the same stage key; this function reads data from a GrFragmentProcessor and
uploads any | 87 the same stage key; this function reads data from a GrFragmentProcessor and
uploads any |
86 uniform variables required by the shaders created in emitCode(). The GrFragm
entProcessor | 88 uniform variables required by the shaders created in emitCode(). The GrFragm
entProcessor |
87 parameter is guaranteed to be of the same type that created this GrGLFragmen
tProcessor and | 89 parameter is guaranteed to be of the same type that created this GrGLFragmen
tProcessor and |
88 to have an identical processor key as the one that created this GrGLFragment
Processor. */ | 90 to have an identical processor key as the one that created this GrGLFragment
Processor. */ |
89 // TODO update this to pass in GrFragmentProcessor | 91 // TODO update this to pass in GrFragmentProcessor |
90 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} | 92 virtual void onSetData(const GrGLProgramDataManager&, const GrProcessor&) {} |
91 | 93 |
92 private: | 94 private: |
93 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; | 95 SkTArray<GrGLFragmentProcessor*, true> fChildProcessors; |
94 | 96 |
95 friend class GrFragmentProcessor; | 97 friend class GrFragmentProcessor; |
96 typedef GrGLProcessor INHERITED; | 98 typedef GrGLProcessor INHERITED; |
97 }; | 99 }; |
98 | 100 |
99 #endif | 101 #endif |
OLD | NEW |