[exo] Apply the correct scaling for cursor bitmap
This patch makes sure that cursor bitmap received via wl_pointer_set_cursor is scaled correctly before creating the corresponding PlatformCursor. The previous approach had two issues: 1. The cursor size was incorrect for scale less than 200% since we used default DSF (ManagedDisplayInfo::GetDensityRatio()) instead of the effective one (Display::device_scale_factor()). This led to cursor always being upscaled to 200%. 2. We didn't use the same logic that ash uses for scaling cursors: ui::GetScaleForScaleFactor() + ui::GetSupportedScaleFactor(). So the cursor size was different from ash when using fractional scale. Bug: 1140175 Change-Id: Id034cb6d92718a01e3ac0a70047b1e4224b9cf96 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485157Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Zakhar Voit <zvoit@igalia.com> Cr-Commit-Position: refs/heads/master@{#819517}
Showing
Please register or sign in to comment