| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 GrFragmentProcessor_DEFINED | 8 #ifndef GrFragmentProcessor_DEFINED |
| 9 #define GrFragmentProcessor_DEFINED | 9 #define GrFragmentProcessor_DEFINED |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Subclass implements this to support getConstantColorComponents(...). | 121 * Subclass implements this to support getConstantColorComponents(...). |
| 122 * | 122 * |
| 123 * Note: it's up to the subclass implementation to do any recursive call to
compute the child | 123 * Note: it's up to the subclass implementation to do any recursive call to
compute the child |
| 124 * procs' output invariants; computeInvariantOutput will not be recursive. | 124 * procs' output invariants; computeInvariantOutput will not be recursive. |
| 125 */ | 125 */ |
| 126 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; | 126 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0; |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 void notifyRefCntIsZero() const final; |
| 130 |
| 129 /** Returns a new instance of the appropriate *GL* implementation class | 131 /** Returns a new instance of the appropriate *GL* implementation class |
| 130 for the given GrFragmentProcessor; caller is responsible for deleting | 132 for the given GrFragmentProcessor; caller is responsible for deleting |
| 131 the object. */ | 133 the object. */ |
| 132 virtual GrGLFragmentProcessor* onCreateGLInstance() const = 0; | 134 virtual GrGLFragmentProcessor* onCreateGLInstance() const = 0; |
| 133 | 135 |
| 134 /** Implemented using GLFragmentProcessor::GenKey as described in this class
's comment. */ | 136 /** Implemented using GLFragmentProcessor::GenKey as described in this class
's comment. */ |
| 135 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, | 137 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, |
| 136 GrProcessorKeyBuilder* b) const = 0; | 138 GrProcessorKeyBuilder* b) const = 0; |
| 137 | 139 |
| 138 /** | 140 /** |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 int fNumTransformsExclChildren; | 178 int fNumTransformsExclChildren; |
| 177 | 179 |
| 178 // TODO: These must convert their processors to pending-execution refs when
the parent is | 180 // TODO: These must convert their processors to pending-execution refs when
the parent is |
| 179 // converted (do this automatically in GrProgramElement?). | 181 // converted (do this automatically in GrProgramElement?). |
| 180 SkTArray<const GrFragmentProcessor*, true> fChildProcessors; | 182 SkTArray<const GrFragmentProcessor*, true> fChildProcessors; |
| 181 | 183 |
| 182 typedef GrProcessor INHERITED; | 184 typedef GrProcessor INHERITED; |
| 183 }; | 185 }; |
| 184 | 186 |
| 185 #endif | 187 #endif |
| OLD | NEW |