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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/gl/builders/GrGLFragmentShaderBuilder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 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 GrFragmentProcessor_DEFINED 8 #ifndef GrFragmentProcessor_DEFINED
9 #define GrFragmentProcessor_DEFINED 9 #define GrFragmentProcessor_DEFINED
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 * getFactory()). The processor subclass should not compare its coord transf orms as that will 145 * getFactory()). The processor subclass should not compare its coord transf orms as that will
146 * be performed automatically in the non-virtual isEqual(). 146 * be performed automatically in the non-virtual isEqual().
147 */ 147 */
148 virtual bool onIsEqual(const GrFragmentProcessor&) const = 0; 148 virtual bool onIsEqual(const GrFragmentProcessor&) const = 0;
149 149
150 bool hasSameTransforms(const GrFragmentProcessor&) const; 150 bool hasSameTransforms(const GrFragmentProcessor&) const;
151 151
152 bool fUsesLocalCoords; 152 bool fUsesLocalCoords;
153 153
154 /** 154 /**
155 * This stores the transforms of this proc, followed by all the transforms o f this proc's 155 * fCoordTransforms stores the transforms of this proc, followed by all the transforms of this
156 * children. In other words, each proc stores all the transforms of its subt ree. 156 * proc's children. In other words, each proc stores all the transforms of i ts subtree as if
157 * they were collected using preorder traversal.
158 *
159 * Example:
160 * Suppose we have frag proc A, who has two children B and D. B has a child C, and D has
161 * two children E and F. Suppose procs A, B, C, D, E, F have 1, 2, 1, 1, 3, 2 transforms
162 * respectively. The following shows what the fCoordTransforms array of each proc would contain:
163 *
164 * (A)
165 * [a1,b1,b2,c1,d1,e1,e2,e3,f1,f2]
166 * / \
167 * / \
168 * (B) (D)
169 * [b1,b2,c1] [d1,e1,e2,e3,f1,f2]
170 * / / \
171 * / / \
172 * (C) (E) (F)
173 * [c1] [e1,e2,e3] [f1,f2]
174 *
157 * The same goes for fTextureAccesses with textures. 175 * The same goes for fTextureAccesses with textures.
158 */ 176 */
159 SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms; 177 SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
160 178
161 SkTArray<GrFragmentStage, false> fChildProcessors; 179 SkTArray<GrFragmentStage, false> fChildProcessors;
162 180
163 typedef GrProcessor INHERITED; 181 typedef GrProcessor INHERITED;
164 }; 182 };
165 183
166 #endif 184 #endif
OLDNEW
« 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