diff options
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index c0150776b76c..c2e6ee39a9c9 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1265,7 +1265,7 @@ bool OpenGLRenderer::quickRejectPreStroke(float left, float top, float right, fl } bool OpenGLRenderer::quickReject(float left, float top, float right, float bottom) { - if (mSnapshot->isIgnored()) { + if (mSnapshot->isIgnored() || bottom <= top || right <= left) { return true; } @@ -1951,6 +1951,11 @@ void OpenGLRenderer::drawConvexPath(const SkPath& path, SkPaint* paint) { // TODO: try clipping large paths to viewport PathRenderer::convexPathVertices(path, paint, mSnapshot->transform, vertexBuffer); + if (!vertexBuffer.getSize()) { + // no vertices to draw + return; + } + setupDraw(); setupDrawNoTexture(); if (isAA) setupDrawAA(); |