gl_engine: Fix the wrong bounds cause composition not correct

The bounds should allow negative origins, only zero width or height bounds needs discard.
This commit is contained in:
RuiwenTang 2024-11-28 17:36:14 +08:00 committed by Hermet Park
parent 89ab573acb
commit c0aab8c738

View file

@ -220,7 +220,7 @@ RenderRegion GlGeometry::getBounds() const
static_cast<int32_t>(ceil(right - floor(left))), static_cast<int32_t>(ceil(right - floor(left))),
static_cast<int32_t>(ceil(bottom - floor(top))), static_cast<int32_t>(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; return mBounds;
} else { } else {
return bounds; return bounds;