OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |