aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkDraw_vertices.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/SkDraw_vertices.cpp b/src/core/SkDraw_vertices.cpp
index 8c1ad1f007..000be07cea 100644
--- a/src/core/SkDraw_vertices.cpp
+++ b/src/core/SkDraw_vertices.cpp
@@ -223,6 +223,15 @@ void SkDraw::drawVertices(SkVertices::VertexMode vmode, int count,
SkPoint* devVerts = outerAlloc.makeArray<SkPoint>(count);
fMatrix->mapPoints(devVerts, vertices, count);
+ {
+ SkRect bounds;
+ // this also sets bounds to empty if we see a non-finite value
+ bounds.set(devVerts, count);
+ if (bounds.isEmpty()) {
+ return;
+ }
+ }
+
VertState state(count, indices, indexCount);
VertState::Proc vertProc = state.chooseProc(vmode);