OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } | 131 } |
132 } | 132 } |
133 | 133 |
134 const GrEffect* getEffect() const { return fEffect.get(); } | 134 const GrEffect* getEffect() const { return fEffect.get(); } |
135 | 135 |
136 const int* getVertexAttribIndices() const { return fVertexAttribIndices; } | 136 const int* getVertexAttribIndices() const { return fVertexAttribIndices; } |
137 int getVertexAttribIndexCount() const { return fEffect->numVertexAttribs();
} | 137 int getVertexAttribIndexCount() const { return fEffect->numVertexAttribs();
} |
138 | 138 |
139 void convertToPendingExec() { fEffect.convertToPendingExec(); } | 139 void convertToPendingExec() { fEffect.convertToPendingExec(); } |
140 | 140 |
| 141 void remapAttribIndices(const int* map) { |
| 142 for (int i = 0; i < 2; ++i) { |
| 143 if (-1 != fVertexAttribIndices[i]) { |
| 144 fVertexAttribIndices[i] = map[fVertexAttribIndices[i]]; |
| 145 } |
| 146 } |
| 147 } |
| 148 |
141 private: | 149 private: |
142 bool fCoordChangeMatrixSet; | 150 bool fCoordChangeMatrixSet; |
143 SkMatrix fCoordChangeMatrix; | 151 SkMatrix fCoordChangeMatrix; |
144 GrProgramElementRef<const GrEffect> fEffect; | 152 GrProgramElementRef<const GrEffect> fEffect; |
145 int fVertexAttribIndices[2]; | 153 int fVertexAttribIndices[2]; |
146 }; | 154 }; |
147 | 155 |
148 #endif | 156 #endif |
OLD | NEW |