SkTreatAsSprite should take AA into account
authorfmalita <fmalita@chromium.org>
Thu, 7 Jan 2016 18:34:46 +0000 (10:34 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 7 Jan 2016 18:34:46 +0000 (10:34 -0800)
commitc7e211acd0c9201688de7ff0c9a2271c67440adf
treec21a3f91ab7e063f9874f90ad62d6a970340ad87
parentb7f4b8e94e2414d17eb68a9ceae42b2eea38e604
SkTreatAsSprite should take AA into account

Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

BUG=skia:4761
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566943002

Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

Review URL: https://codereview.chromium.org/1566943002
src/core/SkCanvas.cpp
src/core/SkDraw.cpp
src/core/SkMatrix.cpp
src/core/SkMatrixUtils.h
tests/DrawBitmapRectTest.cpp