| 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" | |
| 13 | 12 |
| 14 /** | 13 /** |
| 15 * Implements GrBackendEffectFactory for a GrProcessor subclass as a singleton.
This can be used by | 14 * Implements GrBackendEffectFactory for a GrProcessor subclass as a singleton.
This can be used by |
| 16 * most GrProcessor subclasses to implement the GrProcessor::getFactory() method
: | 15 * most GrProcessor subclasses to implement the GrProcessor::getFactory() method
: |
| 17 * | 16 * |
| 18 * const GrBackendEffectFactory& MyEffect::getFactory() const { | 17 * const GrBackendEffectFactory& MyEffect::getFactory() const { |
| 19 * return GrTBackendEffectFactory<MyEffect>::getInstance(); | 18 * return GrTBackendEffectFactory<MyEffect>::getInstance(); |
| 20 * } | 19 * } |
| 21 * | 20 * |
| 22 * Using this class requires that the GrProcessor subclass always produces the s
ame GrGLProcessor | 21 * 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... |
| 92 : public GrTBackendProcessorFactory<ProcessorClass, | 91 : public GrTBackendProcessorFactory<ProcessorClass, |
| 93 GrBackendFragmentProcessorFactory, | 92 GrBackendFragmentProcessorFactory, |
| 94 GrFragmentProcessor, | 93 GrFragmentProcessor, |
| 95 GrGLFragmentProcessor> { | 94 GrGLFragmentProcessor> { |
| 96 protected: | 95 protected: |
| 97 GrTBackendFragmentProcessorFactory() {} | 96 GrTBackendFragmentProcessorFactory() {} |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 | 99 |
| 101 #endif | 100 #endif |
| OLD | NEW |