[graphite] Detect and apply nearest filtering for image shaders

Here we detect pixel aligned blit-like image draws. Some devices have
low precision filtering and will produce degraded (blurry) images
unexpectedly for sequential exact pixel blits when not using nearest
filtering. This is common for canvas scrolling implementations.
Forcing nearest filtering when possible can also be a minor perf/power
optimization depending on the hardware.

A fix for ganesh has already landed:
https://skia-review.googlesource.com/c/skia/+/825416

Bug: 338071687
Change-Id: I9a5043579f45979d62e5bc9ef0b120fe8e3f72a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/849684
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
8 files changed