| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 #include "GrGLPath.h" | 9 #include "GrGLPath.h" |
| 10 #include "GrGLPathRendering.h" | 10 #include "GrGLPathRendering.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 SkASSERT(false); // Not reached. | 177 SkASSERT(false); // Not reached. |
| 178 continue; | 178 continue; |
| 179 } | 179 } |
| 180 SkDEBUGCODE(numCoords += num_coords(verb)); | 180 SkDEBUGCODE(numCoords += num_coords(verb)); |
| 181 SkDEBUGCODE(verify_floats(coords, coordsForVerb)); | 181 SkDEBUGCODE(verify_floats(coords, coordsForVerb)); |
| 182 pathCoords.push_back_n(coordsForVerb, coords); | 182 pathCoords.push_back_n(coordsForVerb, coords); |
| 183 } | 183 } |
| 184 SkASSERT(verbCnt == pathCommands.count()); | 184 SkASSERT(verbCnt == pathCommands.count()); |
| 185 SkASSERT(numCoords == pathCoords.count()); | 185 SkASSERT(numCoords == pathCoords.count()); |
| 186 | 186 |
| 187 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, pathCommands.count(), &p
athCommands[0], | 187 GR_GL_CALL(gpu->glInterface(), |
| 188 pathCoords.count(), GR_GL_FLOAT,
&pathCoords[0])); | 188 PathCommands(pathID, pathCommands.count(), pathCommands.begin(), |
| 189 pathCoords.count(), GR_GL_FLOAT, pathCoords.begin())
); |
| 189 return true; | 190 return true; |
| 190 } | 191 } |
| 191 | 192 |
| 192 /* | 193 /* |
| 193 * For now paths only natively support winding and even odd fill types | 194 * For now paths only natively support winding and even odd fill types |
| 194 */ | 195 */ |
| 195 static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill)
{ | 196 static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill)
{ |
| 196 switch (fill) { | 197 switch (fill) { |
| 197 default: | 198 default: |
| 198 SkFAIL("Incomplete Switch\n"); | 199 SkFAIL("Incomplete Switch\n"); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 341 } |
| 341 | 342 |
| 342 INHERITED::onRelease(); | 343 INHERITED::onRelease(); |
| 343 } | 344 } |
| 344 | 345 |
| 345 void GrGLPath::onAbandon() { | 346 void GrGLPath::onAbandon() { |
| 346 fPathID = 0; | 347 fPathID = 0; |
| 347 | 348 |
| 348 INHERITED::onAbandon(); | 349 INHERITED::onAbandon(); |
| 349 } | 350 } |
| OLD | NEW |