Add sampler bias for the nofilter/translate specializations
authorfmalita <fmalita@chromium.org>
Sat, 30 Jan 2016 18:06:46 +0000 (10:06 -0800)
committerCommit bot <commit-bot@chromium.org>
Sat, 30 Jan 2016 18:06:46 +0000 (10:06 -0800)
commit653c12d773def4d25cbdb78072b84404a5d80957
tree6c2b4f5dd2c03fb6a99875cd77e7a8313b697820
parente645965a7c8bc1f439fa4d7655e8c9fda0b969ca
Add sampler bias for the nofilter/translate specializations

Convert SkBitmapProcState::setupForTranslate() to use
SkBitmapProcStateAutoMapper.  This adds bias for the translate procs:
Clamp_S32_D32_nofilter_trans_shaderproc,
Repeat_S32_D32_nofilter_trans_shaderproc

Since the original impl checks for int overflow, extend
SkBitmapProcStateAutoMapper to detect this condition.

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

Review URL: https://codereview.chromium.org/1642273002
src/core/SkBitmapProcState.cpp
src/core/SkBitmapProcState.h