-
Roger Johannesson authored
SnapLayerToPhysicalPixelBoundary calculates the sub pixel offset that is needed for a layer to end up on a physical pixel boundary but it does not take into account that a layer can have a scaling transform applied to it. This showed up as a problem when https://chromium-review.googlesource.com/691338 landed since it made layers with scale transforms applied start triggering DCHECKs in CheckSnapped. The reason there was no problem before that CL is that ConvertPointToLayer used to return floored coordinates. This patch attempts to fix this problem by applying the transform scale to the offset vector, similar to how the device scale factor is applied. Bug: 805425 Change-Id: I401de72a465b83b00762a92ad2634ac2fc40dff5 Reviewed-on: https://chromium-review.googlesource.com/883782 Commit-Queue: Antoine Labour <piman@chromium.org> Reviewed-by:
Antoine Labour <piman@chromium.org> Reviewed-by:
Ian Vollick <vollick@chromium.org> Cr-Commit-Position: refs/heads/master@{#531967}
41dd59f3