Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: src/gpu/GrDefaultPathRenderer.cpp

Issue 952993004: don't draw if maxVertices returns 0 or > than uin16_t max (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/GrDefaultPathRenderer.cpp b/src/gpu/GrDefaultPathRenderer.cpp
index e4f54ccd61495790a584940ebd24f92898a8b1c6..131b518296a1f9aaa07e5b412d347920002f6e38 100644
--- a/src/gpu/GrDefaultPathRenderer.cpp
+++ b/src/gpu/GrDefaultPathRenderer.cpp
@@ -290,6 +290,11 @@ public:
isIndexed = isIndexed || contourCount > 1;
}
+ if (maxVertices == 0 || maxVertices > ((int)SK_MaxU16 + 1)) {
+ SkDebugf("Cannot render path (%d)\n", maxVertices);
+ return;
+ }
+
// determine primitiveType
int maxIndices = 0;
GrPrimitiveType primitiveType;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698