From 08e88c8df15171924b404a5f1e6fc3eaead82032 Mon Sep 17 00:00:00 2001 From: RuiwenTang Date: Thu, 28 Nov 2024 17:36:14 +0800 Subject: [PATCH] gl_engine: Fix the wrong bounds cause composition not correct The bounds should allow negative origins, only zero width or height bounds needs discard. --- src/renderer/gl_engine/tvgGlGeometry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/gl_engine/tvgGlGeometry.cpp b/src/renderer/gl_engine/tvgGlGeometry.cpp index c3284f63..92437661 100644 --- a/src/renderer/gl_engine/tvgGlGeometry.cpp +++ b/src/renderer/gl_engine/tvgGlGeometry.cpp @@ -220,7 +220,7 @@ RenderRegion GlGeometry::getBounds() const static_cast(ceil(right - floor(left))), static_cast(ceil(bottom - floor(top))), }; - if (bounds.x < 0 || bounds.y < 0 || bounds.w < 0 || bounds.h < 0) { + if (bounds.w < 0 || bounds.h < 0) { return mBounds; } else { return bounds;