Index: src/gpu/GrProcessor.cpp |
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp |
index 3090d0f461016391e6e5429fe06792f25c977a57..0eaab75b61b3028d3981b933c6e63b5198fb5795 100644 |
--- a/src/gpu/GrProcessor.cpp |
+++ b/src/gpu/GrProcessor.cpp |
@@ -13,6 +13,7 @@ |
#include "GrMemoryPool.h" |
#include "GrXferProcessor.h" |
#include "SkSpinlock.h" |
+#include "gl/GrGLFragmentProcessor.h" |
#if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
@@ -156,6 +157,15 @@ bool GrFragmentProcessor::isEqual(const GrFragmentProcessor& that, |
return true; |
} |
+GrGLFragmentProcessor* GrFragmentProcessor::createGLInstance() const { |
+ GrGLFragmentProcessor* glFragProc = this->onCreateGLInstance(); |
+ glFragProc->fChildProcessors.push_back_n(fChildProcessors.count()); |
+ for (int i = 0; i < fChildProcessors.count(); ++i) { |
+ glFragProc->fChildProcessors[i] = fChildProcessors[i].processor()->createGLInstance(); |
+ } |
+ return glFragProc; |
+} |
+ |
void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) { |
fCoordTransforms.push_back(transform); |
fUsesLocalCoords = fUsesLocalCoords || transform->sourceCoords() == kLocal_GrCoordSet; |