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

Side by Side Diff: include/gpu/GrFragmentProcessor.h

Issue 822423004: Move most of the transform logic into the primitive processors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 11 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 | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('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 29 matching lines...) Expand all
40 /** Human-meaningful string to identify this GrFragmentProcessor; may be emb edded 40 /** Human-meaningful string to identify this GrFragmentProcessor; may be emb edded
41 in generated shader code. */ 41 in generated shader code. */
42 virtual const char* name() const = 0; 42 virtual const char* name() const = 0;
43 43
44 int numTransforms() const { return fCoordTransforms.count(); } 44 int numTransforms() const { return fCoordTransforms.count(); }
45 45
46 /** Returns the coordinate transformation at index. index must be valid acco rding to 46 /** Returns the coordinate transformation at index. index must be valid acco rding to
47 numTransforms(). */ 47 numTransforms(). */
48 const GrCoordTransform& coordTransform(int index) const { return *fCoordTran sforms[index]; } 48 const GrCoordTransform& coordTransform(int index) const { return *fCoordTran sforms[index]; }
49 49
50 const SkTArray<const GrCoordTransform*, true>& coordTransforms() const {
51 return fCoordTransforms;
52 }
53
50 /** Will this prceossor read the destination pixel value? */ 54 /** Will this prceossor read the destination pixel value? */
51 bool willReadDstColor() const { return fWillReadDstColor; } 55 bool willReadDstColor() const { return fWillReadDstColor; }
52 56
53 /** Will this prceossor read the source color value? */ 57 /** Will this prceossor read the source color value? */
54 bool willUseInputColor() const { return fWillUseInputColor; } 58 bool willUseInputColor() const { return fWillUseInputColor; }
55 59
56 /** Do any of the coordtransforms for this processor require local coords? * / 60 /** Do any of the coordtransforms for this processor require local coords? * /
57 bool usesLocalCoords() const { return fUsesLocalCoords; } 61 bool usesLocalCoords() const { return fUsesLocalCoords; }
58 62
59 /** Returns true if this and other processor conservatively draw identically . It can only return 63 /** Returns true if this and other processor conservatively draw identically . It can only return
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 137
134 SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms; 138 SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
135 bool fWillReadDstColor; 139 bool fWillReadDstColor;
136 bool fWillUseInputColor; 140 bool fWillUseInputColor;
137 bool fUsesLocalCoords; 141 bool fUsesLocalCoords;
138 142
139 typedef GrProcessor INHERITED; 143 typedef GrProcessor INHERITED;
140 }; 144 };
141 145
142 #endif 146 #endif
OLDNEW
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrAAConvexPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698