diff options
| author | 2013-02-08 13:46:40 -0800 | |
|---|---|---|
| committer | 2013-02-08 13:46:40 -0800 | |
| commit | d71ff91dcd79f6beea4bbe768ab3bcbb1a6d7c39 (patch) | |
| tree | e9a9233171a5edfaf03f2a81f468a7133f54b462 /libs/hwui/OpenGLRenderer.cpp | |
| parent | d68c0964765b48934f528600ba5fe51b45cb8ae1 (diff) | |
Apply the clip rect/region to drawLines()
Without the check to quickReject, drawConvexPath would never
setup the clip properly.
Change-Id: I23e5b25de3383c9e9b86eea4ee7a9552f8d9efb4
Diffstat (limited to 'libs/hwui/OpenGLRenderer.cpp')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 708ff554d070..08e2332df80b 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -2145,6 +2145,11 @@ status_t OpenGLRenderer::drawLines(float* points, int count, SkPaint* paint) { VertexBuffer buffer; SkRect bounds; PathTessellator::tessellateLines(points, count, paint, mSnapshot->transform, bounds, buffer); + + if (quickReject(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom)) { + return DrawGlInfo::kStatusDone; + } + dirtyLayer(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, *mSnapshot->transform); bool useOffset = !paint->isAntiAlias(); @@ -2166,6 +2171,7 @@ status_t OpenGLRenderer::drawPoints(float* points, int count, SkPaint* paint) { strokeWidth = 1.0f; } const float halfWidth = strokeWidth / 2; + int alpha; SkXfermode::Mode mode; getAlphaAndMode(paint, &alpha, &mode); |