viz: Fix GLRenderer TextureDrawQuad UV calculation
crrev.com/c/2069137 added support for visible_rect. Unfortunately it incorrectly computed the UV translation. It had two issues: - It was using right() and bottom() instead of width() and height() when scaling the UV translation part. - It was not scaling the translation part for the input UV. This produced incorrect UVs when a rect was not in the origin and/or the input UV were scaled. This patch fixes the computation using cc::MathUtil::ScaleRectProportional instead. in viz_unittests. Bug: 1059408, 1057953 Test: TextureDrawQuadTranslatedAndVisibleRectInsetTopLeftAndCustomUV Change-Id: Id852f3c43167364a001f33de07892905c7d3b768 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2149637 Commit-Queue: Daniele Castagna <dcastagna@chromium.org> Reviewed-by:Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/master@{#761038}
Showing
637 Bytes