diff options
| -rw-r--r-- | libs/renderengine/gl/GLESRenderEngine.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/renderengine/gl/GLESRenderEngine.cpp b/libs/renderengine/gl/GLESRenderEngine.cpp index dd4c55d8a7..f39f0663ac 100644 --- a/libs/renderengine/gl/GLESRenderEngine.cpp +++ b/libs/renderengine/gl/GLESRenderEngine.cpp @@ -827,11 +827,14 @@ void GLESRenderEngine::handleRoundedCorners(const DisplaySettings& display, drawMesh(mesh); // The middle part of the layer can turn off blending. - const Rect middleRect(bounds.left, bounds.top + radius, bounds.right, bounds.bottom - radius); - setScissor(middleRect); - mState.cornerRadius = 0.0; - disableBlending(); - drawMesh(mesh); + if (topRect.bottom < bottomRect.top) { + const Rect middleRect(bounds.left, bounds.top + radius, bounds.right, + bounds.bottom - radius); + setScissor(middleRect); + mState.cornerRadius = 0.0; + disableBlending(); + drawMesh(mesh); + } disableScissor(); } |