ui/ozone/drm: don't use subpixel source crop
DRM supposedly supports subpixel source crop. However, according to drm_plane_funcs.update_plane, devices which don't support that are free to ignore the fractional part, and every device seems to do that as of 5.4. To deal with this, round source crops that are nearly integers and reject overlay candidates that actually require subpixel source crop. The rounding of nearly integer crops addresses an issue where floating point imprecision in a quad's uv_crop could lead to a visible difference depending on whether or not the quad was put in an overlay. The visible difference arose because drivers truncate the fractional part of the source crop, which could lead to a 1px discrepancy in the source crop. BUG=chromium:1099110 Change-Id: Ib20b16ef505574bd63502591db626a7e769f6e88 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366397 Commit-Queue: David Stevens <stevensd@chromium.org> Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Cr-Commit-Position: refs/heads/master@{#801234}
Showing
Please register or sign in to comment