aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessor.cpp
diff options
context:
space:
mode:
authorGravatar wangyix <wangyix@google.com>2015-08-19 08:23:12 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-19 08:23:12 -0700
commit93ab254b7e4ce82074e88e219a8e32b31086ca86 (patch)
treeafabd5522c89a78dc1de345f86009c9cefeb3bbd /src/gpu/GrProcessor.cpp
parent5b4a7abd482c7cc06d49cb81138c2baaa4d35e13 (diff)
This change is in preparation for updating how processor keys and meta keys are generated for frag procs.
Diffstat (limited to 'src/gpu/GrProcessor.cpp')
-rw-r--r--src/gpu/GrProcessor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 0eaab75b61..6716ab1d12 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -166,10 +166,24 @@ GrGLFragmentProcessor* GrFragmentProcessor::createGLInstance() const {
return glFragProc;
}
+void GrFragmentProcessor::addTextureAccess(const GrTextureAccess* textureAccess) {
+ // Can't add texture accesses after registering any children since their texture accesses have
+ // already been bubbled up into our fTextureAccesses array
+ SkASSERT(fChildProcessors.empty());
+
+ INHERITED::addTextureAccess(textureAccess);
+ fNumTexturesExclChildren++;
+}
+
void GrFragmentProcessor::addCoordTransform(const GrCoordTransform* transform) {
+ // Can't add transforms after registering any children since their transforms have already been
+ // bubbled up into our fCoordTransforms array
+ SkASSERT(fChildProcessors.empty());
+
fCoordTransforms.push_back(transform);
fUsesLocalCoords = fUsesLocalCoords || transform->sourceCoords() == kLocal_GrCoordSet;
SkDEBUGCODE(transform->setInProcessor();)
+ fNumTransformsExclChildren++;
}
int GrFragmentProcessor::registerChildProcessor(const GrFragmentProcessor* child) {