OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "SkNWayCanvas.h" | 8 #include "SkNWayCanvas.h" |
9 | 9 |
10 SkNWayCanvas::SkNWayCanvas(int width, int height) | 10 SkNWayCanvas::SkNWayCanvas(int width, int height) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 const SkColor colors[], SkXfermode* xmode, | 278 const SkColor colors[], SkXfermode* xmode, |
279 const uint16_t indices[], int indexCount, | 279 const uint16_t indices[], int indexCount, |
280 const SkPaint& paint) { | 280 const SkPaint& paint) { |
281 Iter iter(fList); | 281 Iter iter(fList); |
282 while (iter.next()) { | 282 while (iter.next()) { |
283 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode, | 283 iter->drawVertices(vmode, vertexCount, vertices, texs, colors, xmode, |
284 indices, indexCount, paint); | 284 indices, indexCount, paint); |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 void SkNWayCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) { | 288 void SkNWayCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4]
, |
| 289 const SkPoint texCoords[4], SkXfermode* xmode, |
| 290 const SkPaint& paint) { |
| 291 if (NULL == cubics) { |
| 292 return; |
| 293 } |
| 294 |
289 Iter iter(fList); | 295 Iter iter(fList); |
290 while (iter.next()) { | 296 while (iter.next()) { |
291 iter->drawPatch(patch, paint); | 297 iter->drawPatch(cubics, colors, texCoords, xmode, paint); |
292 } | 298 } |
293 } | 299 } |
294 | 300 |
295 void SkNWayCanvas::drawData(const void* data, size_t length) { | 301 void SkNWayCanvas::drawData(const void* data, size_t length) { |
296 Iter iter(fList); | 302 Iter iter(fList); |
297 while (iter.next()) { | 303 while (iter.next()) { |
298 iter->drawData(data, length); | 304 iter->drawData(data, length); |
299 } | 305 } |
300 } | 306 } |
301 | 307 |
(...skipping 18 matching lines...) Expand all Loading... |
320 iter->addComment(kywd, value); | 326 iter->addComment(kywd, value); |
321 } | 327 } |
322 } | 328 } |
323 | 329 |
324 void SkNWayCanvas::endCommentGroup() { | 330 void SkNWayCanvas::endCommentGroup() { |
325 Iter iter(fList); | 331 Iter iter(fList); |
326 while (iter.next()) { | 332 while (iter.next()) { |
327 iter->endCommentGroup(); | 333 iter->endCommentGroup(); |
328 } | 334 } |
329 } | 335 } |
OLD | NEW |