OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrTBackendProcessorFactory_DEFINED | 8 #ifndef GrTBackendProcessorFactory_DEFINED |
9 #define GrTBackendProcessorFactory_DEFINED | 9 #define GrTBackendProcessorFactory_DEFINED |
10 | 10 |
11 #include "GrBackendProcessorFactory.h" | 11 #include "GrBackendProcessorFactory.h" |
| 12 #include "gl/GrGLProgramEffects.h" |
12 | 13 |
13 /** | 14 /** |
14 * Implements GrBackendEffectFactory for a GrProcessor subclass as a singleton.
This can be used by | 15 * Implements GrBackendEffectFactory for a GrProcessor subclass as a singleton.
This can be used by |
15 * most GrProcessor subclasses to implement the GrProcessor::getFactory() method
: | 16 * most GrProcessor subclasses to implement the GrProcessor::getFactory() method
: |
16 * | 17 * |
17 * const GrBackendEffectFactory& MyEffect::getFactory() const { | 18 * const GrBackendEffectFactory& MyEffect::getFactory() const { |
18 * return GrTBackendEffectFactory<MyEffect>::getInstance(); | 19 * return GrTBackendEffectFactory<MyEffect>::getInstance(); |
19 * } | 20 * } |
20 * | 21 * |
21 * Using this class requires that the GrProcessor subclass always produces the s
ame GrGLProcessor | 22 * Using this class requires that the GrProcessor subclass always produces the s
ame GrGLProcessor |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 : public GrTBackendProcessorFactory<ProcessorClass, | 92 : public GrTBackendProcessorFactory<ProcessorClass, |
92 GrBackendFragmentProcessorFactory, | 93 GrBackendFragmentProcessorFactory, |
93 GrFragmentProcessor, | 94 GrFragmentProcessor, |
94 GrGLFragmentProcessor> { | 95 GrGLFragmentProcessor> { |
95 protected: | 96 protected: |
96 GrTBackendFragmentProcessorFactory() {} | 97 GrTBackendFragmentProcessorFactory() {} |
97 }; | 98 }; |
98 | 99 |
99 | 100 |
100 #endif | 101 #endif |
OLD | NEW |