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

Unified Diff: include/gpu/GrFragmentProcessor.h

Issue 1286293002: Added class AutoFragmentChildProcAdvance to be constructed before a child emitCode and destructed a… (Closed) Base URL: https://skia.googlesource.com/skia@cs3_onBeforeAfter
Patch Set: added comment explaining AutoFragmentChildProcAdvance 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
« no previous file with comments | « no previous file | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrFragmentProcessor.h
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index bbc2f2bb0704f69c3af8e80b49871195b22c21dc..4b2f96d7f9168e301b8255019961a2949030f870 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -152,8 +152,26 @@ private:
bool fUsesLocalCoords;
/**
- * This stores the transforms of this proc, followed by all the transforms of this proc's
- * children. In other words, each proc stores all the transforms of its subtree.
+ * fCoordTransforms stores the transforms of this proc, followed by all the transforms of this
+ * proc's children. In other words, each proc stores all the transforms of its subtree as if
+ * they were collected using preorder traversal.
+ *
+ * Example:
+ * Suppose we have frag proc A, who has two children B and D. B has a child C, and D has
+ * two children E and F. Suppose procs A, B, C, D, E, F have 1, 2, 1, 1, 3, 2 transforms
+ * respectively. The following shows what the fCoordTransforms array of each proc would contain:
+ *
+ * (A)
+ * [a1,b1,b2,c1,d1,e1,e2,e3,f1,f2]
+ * / \
+ * / \
+ * (B) (D)
+ * [b1,b2,c1] [d1,e1,e2,e3,f1,f2]
+ * / / \
+ * / / \
+ * (C) (E) (F)
+ * [c1] [e1,e2,e3] [f1,f2]
+ *
* The same goes for fTextureAccesses with textures.
*/
SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
« no previous file with comments | « no previous file | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698