CanvasKit version 0.37.1
Make CPU nearest image sampling round down and remove matrix tweak

Manipulating the "total matrix" is incompatible with the
idea that effects might insert non-linear transformations of the
local coords.

Instead we modify the code that samples images to round down at
exact integers by subtracting one ULP before taking the floor. This makes drawing an image at 1:1 device to image pixels but with a half pixel skew continue to select each image pixel once. However -1:1 with
a half pixel skew will repeat one value and miss one value.

Put behind guard for now pending Chrome test rebaseline.

Bug: skia:13752
Change-Id: If86f6cf9821c0dd23bc7835d89a789d0d70e546a
Commit-Queue: Brian Salomon <>
Reviewed-by: Brian Osman <>
4 files changed