Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: src/gpu/GrProcessor.cpp

Issue 1298233002: Added fNumTransformsExclChildren and fNumTexturesExclChildren; changed emitChild() to forward search (Closed) Base URL: https://skia.googlesource.com/skia@cs3_emitchild
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrProcessor.cpp
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 0eaab75b61b3028d3981b933c6e63b5198fb5795..6716ab1d12d6b2030f21fed850c34d83c6a0c0e0 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) {

Powered by Google App Engine
This is Rietveld 408576698