diff options
| author | 2019-09-26 23:37:41 +0000 | |
|---|---|---|
| committer | 2019-09-26 23:37:41 +0000 | |
| commit | 1e2c68b7a8b7bd00e3f5385cf029a3eb41bba601 (patch) | |
| tree | b60c911633834dbe110c02ea414b9274b11f50f5 /libs | |
| parent | 910f4edd15ec5fb38e1a261fede8985653282b19 (diff) | |
| parent | c9691d57787e43ad26ac6edb3880d25365c4a43e (diff) | |
Merge "Fix rounded corner scission clipping"
Diffstat (limited to 'libs')
| -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(); } |