| Index: src/utils/SkPatchGrid.cpp
|
| diff --git a/src/utils/SkPatchGrid.cpp b/src/utils/SkPatchGrid.cpp
|
| index b1fea574037b9e894de4cc323ff8ef24d790ea2d..a0809f3594db163d19226d7bc0612e11e825bf2b 100644
|
| --- a/src/utils/SkPatchGrid.cpp
|
| +++ b/src/utils/SkPatchGrid.cpp
|
| @@ -174,13 +174,14 @@ void SkPatchGrid::draw(SkCanvas* canvas, SkPaint& paint) {
|
| SkColor colors[4];
|
| this->getPatch(x, y, cubics, colors, texCoords);
|
| SkPatchUtils::VertexData data;
|
| - SkPatchUtils::getVertexData(&data, cubics,
|
| - fModeFlags & kColors_VertexType ? colors : NULL,
|
| - fModeFlags & kTexs_VertexType ? texCoords : NULL,
|
| - maxCols[x], maxRows[y]);
|
| - canvas->drawVertices(SkCanvas::kTriangles_VertexMode, data.fVertexCount,
|
| - data.fPoints, data.fTexCoords, data.fColors, fXferMode,
|
| - data.fIndices, data.fIndexCount, paint);
|
| + if (SkPatchUtils::getVertexData(&data, cubics,
|
| + fModeFlags & kColors_VertexType ? colors : NULL,
|
| + fModeFlags & kTexs_VertexType ? texCoords : NULL,
|
| + maxCols[x], maxRows[y])) {
|
| + canvas->drawVertices(SkCanvas::kTriangles_VertexMode, data.fVertexCount,
|
| + data.fPoints, data.fTexCoords, data.fColors, fXferMode,
|
| + data.fIndices, data.fIndexCount, paint);
|
| + }
|
| }
|
| }
|
| SkDELETE_ARRAY(maxCols);
|
|
|