aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.h
Commit message (Collapse)AuthorAge
* plumb through arenaallocGravatar Mike Reed2018-07-16
| | | | | | | | | | | - simplifies the older pattern of storage/size - removes a dynamic allocation in defaultbitmapcontroller Bug: skia: Change-Id: Ibc937d3e0c057e78cc0c8bf7d9ad2d824eb240d9 Reviewed-on: https://skia-review.googlesource.com/141321 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* make skmatrix getmapproc privateGravatar Cary Clark2017-10-20
| | | | | | | | | | | | | | Make SkMatrix MapXYProc MapPtsProc and friends private. Code search turned up no clients in chromium, google3, android. Fingers crossed. R:reed@google.com Bug: skia:6898 Change-Id: Iee20fe5150499215a09f67cc6f117b685f38f455 Reviewed-on: https://skia-review.googlesource.com/62140 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove code associated with legacy affine imageshadersGravatar Mike Reed2017-08-23
| | | | | | | | | | | requires https://skia-review.googlesource.com/c/33180 CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I226e120cc5aebe393bda8bc069e7927fdc981a0e Reviewed-on: https://skia-review.googlesource.com/36800 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Assume HQ is handled by pipeline, delete legacy code-pathGravatar Mike Reed2017-07-20
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: If6f0d0a57463bf99a66d674e65a62ce3931d0116 Reviewed-on: https://skia-review.googlesource.com/24644 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix clamp lowbits extraction when combined with non-clampGravatar Florin Malita2016-12-19
| | | | | | | | | R=reed@google.com Change-Id: I1dc17c827077e968d4dbcd0f9ea8da8e1732b253 Reviewed-on: https://skia-review.googlesource.com/6231 Commit-Queue: Florin Malita <fmalita@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Use unsigned arithmetic for SkBitmapProcStateAutoMapper biasGravatar Florin Malita2016-12-12
| | | | | | | | | | | | To avoid undefined int underflow behavior. BUG=skia:6017 R=mtklein@google.com,reed@google.com Change-Id: Ib707ad5e1d87eda70525c56db14849c4164c5640 Reviewed-on: https://skia-review.googlesource.com/5861 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Remove dest surface color mode from bitmap controllerGravatar Brian Osman2016-12-06
| | | | | | | | | | | This is already on the bitmap provider - no need to plumb it here. BUG=skia: Change-Id: Ie8c5aef8ea443c58d59598aa66e357ad4c212b25 Reviewed-on: https://skia-review.googlesource.com/5621 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Simplify SkBitmapProviderGravatar Florin Malita2016-11-10
| | | | | | | | | | | | | | | | | | We're no longer using SkBitmap sources for SkBitmapProvider, so we can restrict it to SkImage only. At this point we could also remove it, but I think it'll come in handy when we add shader subset support. BUG=skia:5806 R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4655 Change-Id: I298da253cc8f7c1205b543521e62060a202a9f78 Reviewed-on: https://skia-review.googlesource.com/4655 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Rename SkSourceGammaTreatment to SkDestinationSurfaceColorModeGravatar Brian Osman2016-11-09
| | | | | | | | | | | | | | | This is much more explicit about what that type represents (are we in legacy mode or not), which also makes it suitable for other (upcoming) usage. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4529 Change-Id: Iacb397c34e7765f1ca86c0195bc622b2be4d9acf Reviewed-on: https://skia-review.googlesource.com/4529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* respect srgb gamma when building mipsGravatar reed2016-06-10
| | | | | | | | | | | Proposed policy: - If the target is *legacy* (e.g. L32/PMColor) ignore gamma - If the target is S32/F16 respect gamma BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2029373004 Review-Url: https://codereview.chromium.org/2029373004
* WIP: experimental bilerp pipeline.Gravatar herb2016-03-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1775963002 Review URL: https://codereview.chromium.org/1775963002
* Document BitmapStateAutoMapper.Gravatar herb2016-03-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1815373002 Review URL: https://codereview.chromium.org/1815373002
* fission bitmapprocstateGravatar reed2016-03-02
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753903002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1753903002
* Rename SkBitmapProcStateAutoMapper methodsGravatar fmalita2016-02-03
| | | | | | | | | | | | | | x(),y() -> fractionalIntX(), fractionalIntY() (to clarify the return type) Also add fixed & int helpers. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666433003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1666433003
* Use SkBitmapProcStateAutoMapper for filter samplers alsoGravatar fmalita2016-02-03
| | | | | | | | | | | | | | | | | | | | | Observation: filter procs are also biased by s.fFilterOne{X,Y} / 2. They all do something along these lines: s.fInvProc(s.fInvMatrix, SkIntToScalar(x) + SK_ScalarHalf, SkIntToScalar(y) + SK_ScalarHalf, &srcPt); SkFixed fx = SkScalarToFixed(srcPt.fX) - (s.fFilterOneX >> 1); SkFixed fy = SkScalarToFixed(srcPt.fY) - (s.fFilterOneX >> 1); It's trivial to extend SkBitmapProcStateAutoMapper to handle this internally, and convert everyone off explicit mapping. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1661613002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1661613002
* Remove SkBitmapProcStateAutoMapper's overflow checkGravatar fmalita2016-01-30
| | | | | | | | | | | | (follow-up to https://codereview.chromium.org/1642273002) Add an optional SkPoint outparam, and relocate the overflow check to the only client which needs it. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1650403002 Review URL: https://codereview.chromium.org/1650403002
* Add sampler bias for the nofilter/translate specializationsGravatar fmalita2016-01-30
| | | | | | | | | | | | | | | | 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
* Remove SK_SUPPORT_LEGACY_BITMAP_SAMPLER_BIASGravatar fmalita2016-01-07
| | | | | | | | | No longer defined in Chromium. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568893002 Review URL: https://codereview.chromium.org/1568893002
* clean up dead x86 filter opts codeGravatar mtklein2016-01-05
| | | | | | | | | | This is dead after removing shadeSpan16(). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1553233004 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1553233004
* remove shadeSpan16 from shaderGravatar reed2016-01-05
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556003003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review URL: https://codereview.chromium.org/1556003003
* [Reland] Repeating SkBitmapProcState rounding biasGravatar fmalita2016-01-04
| | | | | | | | | | | | | | | | 1) observe the bias in repeat matrix procs also. 2) add utility for device space -> bitmap space mapping. 3) remove unneeded filter bias This is a reland of https://codereview.chromium.org/1529833003/. The main difference (and the fix) vs. the prev version is increased precision: the mapper now operates with SkFractionalInts. R=reed@google.com BUG=skia:4680, skia:4649 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1539083002 Review URL: https://codereview.chromium.org/1539083002
* Fix UB function problems for shaders and mask.Gravatar herb2015-12-18
| | | | | | | | | BUG=skia:4634 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002 Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388 Review URL: https://codereview.chromium.org/1530743002
* Revert of Repeating SkBitmapProcState rounding bias (patchset #6 id:100001 ↵Gravatar fmalita2015-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of https://codereview.chromium.org/1529833003/ ) Reason for revert: We need a SkFractionalInt auto mapper flavor, otherwise we're losing precision for some procs => seaming artifacs (https://gold.skia.org/diff?test=giantbitmap_mirror_point_rotate&left=0dd7a412fce81586e6a142e039ec2de9&top=a706d4bb2b8e994b936445b87115b07e) Original issue's description: > Repeating SkBitmapProcState rounding bias > > Observe the bias in repeat matrix procs also. > > Introduce a utility class to handle device space -> bitmap space > mapping. > > BUG=skia:4680,skia:4649 > R=reed@google.com > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529833003 > > Committed: https://skia.googlesource.com/skia/+/5ae7fdcc3d7712da3193c39a751e88b092aa82db TBR=reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4680,skia:4649 Review URL: https://codereview.chromium.org/1531423003
* Revert of Fix UB function problems for shaders and mask. (patchset #3 ↵Gravatar herb2015-12-18
| | | | | | | | | | | | | | | | | | | | | | | id:40001 of https://codereview.chromium.org/1530743002/ ) Reason for revert: Breaks man gold tests. Original issue's description: > Fix UB function problems for shaders and mask. > > BUG=skia:4634 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002 > > Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388 TBR=mtklein@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4634 Review URL: https://codereview.chromium.org/1534243002
* Repeating SkBitmapProcState rounding biasGravatar fmalita2015-12-18
| | | | | | | | | | | | | Observe the bias in repeat matrix procs also. Introduce a utility class to handle device space -> bitmap space mapping. BUG=skia:4680,skia:4649 R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529833003 Review URL: https://codereview.chromium.org/1529833003
* Fix UB function problems for shaders and mask.Gravatar herb2015-12-17
| | | | | | | BUG=skia:4634 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002 Review URL: https://codereview.chromium.org/1530743002
* SkBitmapProcState rounding biasGravatar fmalita2015-12-15
| | | | | | | | | | | | | Epsilon bias to keep bitmap sample rounding consistent with geometry rounding. Also update the GM to draw an outer border + drop uninteresting scales in favor of negative scale variants. BUG=skia:4680,skia:4649 R=reed@google.com,caryclark@google.com,mtklein@google.com Review URL: https://codereview.chromium.org/1527633002
* move SkBitmapProvider to its own fileGravatar reed2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1346713002
* use SkBitmapProvider for shader-contextGravatar reed2015-09-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1343123005
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Move SkTemplates.h to private.Gravatar bungeman2015-08-19
| | | | | | | | SkTemplates.h contains a number of Skia specific utilities which are not designed for external use. In addition to reducing the external support burden, this will allow Skia to freely refactor this file. Review URL: https://codereview.chromium.org/1272293004
* Move LightingShader to effectsGravatar robertphillips2015-07-29
| | | | | | | | | | | Additionally this CL: forces the light colors to be opaque forces the light direction to be normalized adds a raster implementation adds a gm Review URL: https://codereview.chromium.org/1245883003
* switch bitmapshader internals over to pixmapGravatar reed2015-06-04
| | | | | | | BUG=skia: NOTRY=True Review URL: https://codereview.chromium.org/1158273007
* refactor bitmapshader to use a controllerGravatar reed2015-06-04
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1153123003
* remove dead code after HQ changeGravatar reed2015-01-20
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/845303005
* reorg filter quality cascadeGravatar reed2015-01-16
| | | | | | | BUG=skia: NOTREECHECKS=True Review URL: https://codereview.chromium.org/844913004
* separate out the scaline-choosing to simplify chooseProcsGravatar reed2015-01-14
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/796063007
* Add SSSE3 acceleration for S32_D16_filter_DXDYGravatar qiankun.miao2014-12-04
| | | | | | | | | | | | | With this CL, related nanobench can be improved for 565 config. bitmap_BGRA_8888_scale_rotate_bilerp 115us -> 70.5us 0.61x bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp 115us -> 70.5us 0.61x bitmap_BGRA_8888_update_scale_rotate_bilerp 112us -> 68us 0.6x BUG=skia: Committed: https://skia.googlesource.com/skia/+/45a05780867a06b9f8a8d5240cf6c5d5a2c15a35 Review URL: https://codereview.chromium.org/773753002
* Revert of Add SSSE3 acceleration for S32_D16_filter_DXDY (patchset #3 ↵Gravatar jam2014-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | id:40001 of https://codereview.chromium.org/773753002/) Reason for revert: breaks build when not using SSE3, since the two method definitions differ in parameter types (typo) Original issue's description: > Add SSSE3 acceleration for S32_D16_filter_DXDY > > With this CL, related nanobench can be improved for 565 config. > bitmap_BGRA_8888_scale_rotate_bilerp 115us -> 70.5us 0.61x > bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp 115us -> 70.5us 0.61x > bitmap_BGRA_8888_update_scale_rotate_bilerp 112us -> 68us 0.6x > > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/45a05780867a06b9f8a8d5240cf6c5d5a2c15a35 TBR=mtklein@google.com,qkmiao@gmail.com,qiankun.miao@intel.com NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/761103003
* Add SSSE3 acceleration for S32_D16_filter_DXDYGravatar qiankun.miao2014-12-02
| | | | | | | | | | | With this CL, related nanobench can be improved for 565 config. bitmap_BGRA_8888_scale_rotate_bilerp 115us -> 70.5us 0.61x bitmap_BGRA_8888_update_volatile_scale_rotate_bilerp 115us -> 70.5us 0.61x bitmap_BGRA_8888_update_scale_rotate_bilerp 112us -> 68us 0.6x BUG=skia: Review URL: https://codereview.chromium.org/773753002
* Switch SkBitmapProcState's SkFractionalInt to 32.32.Gravatar mtklein2014-11-21
| | | | | | | | | | | 16 bits are not enough to hold the integral part of fx in Clamp_S32_opaque_D32_nofilter_DX_shaderproc. Weirdly, no GM diffs on my desktop. BUG=skia:3096 Review URL: https://codereview.chromium.org/733163003
* Second attempt to land the integral image scaling change.Gravatar humper2014-08-28
| | | | | | | | | | | | | | | | | | Scale all images to the nearest rounded integer, and if there's still any scaling factor left over, pass it on to the subsequent bilerp code. Should avoid artifacts when tiling scaled images. Original CL received an LGTM from reed; new version disabled tiling in the downsamplebitmap GM; I verified that this fixes the issue we were seeing there on non-neon androids. BUG=skia:2888 R=reed@android.com TBR=reed Author: humper@google.com Review URL: https://codereview.chromium.org/514383003
* rename ScaledImageCache to ResourceCacheGravatar reed2014-08-28
| | | | | | | | | BUG=skia: R=bsalomon@google.com, mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/511283002
* manual revert of bitmap scale change while I investigate failuresGravatar humper2014-08-28
| | | | | | | | | | | on chromeos TBR=reed NOTREECHECKS=True Author: humper@google.com Review URL: https://codereview.chromium.org/516923003
* always scale to an integer; compensate for fractional image sizes by leaving ↵Gravatar humper2014-08-27
| | | | | | | | | | | the fractional scale in the matrix BUG=skia: R=reed@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/470233002
* remove commented-out codeGravatar reed2014-08-26
| | | | | | | | | TBR=senorblanco@google.com NOTRY=True Author: reed@google.com Review URL: https://codereview.chromium.org/505253002
* retool image cache to be generic cache, allowing the client to subclass ↵Gravatar reed2014-08-26
| | | | | | | | | | | | | | | "Rec", so they can provide a custom Key and arbitrary Value. Follow-on CLs - rename ScaledimageCache to something like GeneralCache - explore if we can use call-backs or some mechanism to completely hide "lock/unlock", by forcing all clients to support "copying" their value out of the cache as the result of a Find. R=mtklein@google.com, senorblanco@google.com, bsalomon@google.com, qiankun.miao@intel.com, senorblanco@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/507483002
* Refactor bitmap scaler to make it easier to migrate rest of chrome to use itGravatar humper2014-06-27
| | | | | | | | | | | | | | Previously, the set of platform-specific function pointers to do fast convolution (e.g., neon, SSE) were passed in a structure to the scaler. I refactored this so that the scaler fills in these function pointers after it's called, so the caller doesn't have to worry about it. R=mtklein@google.com TBR=mtklein NOTRY=True Author: humper@google.com Review URL: https://codereview.chromium.org/354193002
* Revert of Revert of Extract most of the mutable state of SkShader into a ↵Gravatar commit-bot@chromium.org2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | separate Context object. (https://codereview.chromium.org/249643002/) Reason for revert: Chromium side change landed along side DEPS roll that includes r14323. Original issue's description: > Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/) > > Reason for revert: > This is blocking the DEPS roll into Chromium. Failures can be seen here: > > http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333 > > Original issue's description: > > Extract most of the mutable state of SkShader into a separate Context object. > > > > SkShader currently stores some state during draw calls via setContext(...). > > Move that mutable state into a separate SkShader::Context class that is > > constructed on demand for the duration of the draw. > > > > Calls to setContext() are replaced with createContext() which returns a context > > corresponding to the shader object or NULL if the parameters to createContext > > are invalid. > > > > TEST=out/Debug/dm > > BUG=skia:1976 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14216 > > > > Committed: http://code.google.com/p/skia/source/detail?r=14323 > > TBR=scroggo@google.com,skyostil@chromium.org,tomhudson@chromium.org,senorblanco@chromium.org,reed@google.com,bungeman@google.com,dominikg@chromium.org > NOTREECHECKS=true > NOTRY=true > BUG=skia:1976 > > Committed: http://code.google.com/p/skia/source/detail?r=14326 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:1976 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/246403013 git-svn-id: http://skia.googlecode.com/svn/trunk@14328 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Extract most of the mutable state of SkShader into a separate ↵Gravatar commit-bot@chromium.org2014-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context object. (https://codereview.chromium.org/207683004/) Reason for revert: This is blocking the DEPS roll into Chromium. Failures can be seen here: http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333 Original issue's description: > Extract most of the mutable state of SkShader into a separate Context object. > > SkShader currently stores some state during draw calls via setContext(...). > Move that mutable state into a separate SkShader::Context class that is > constructed on demand for the duration of the draw. > > Calls to setContext() are replaced with createContext() which returns a context > corresponding to the shader object or NULL if the parameters to createContext > are invalid. > > TEST=out/Debug/dm > BUG=skia:1976 > > Committed: http://code.google.com/p/skia/source/detail?r=14216 > > Committed: http://code.google.com/p/skia/source/detail?r=14323 R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org NOTREECHECKS=true NOTRY=true BUG=skia:1976 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/249643002 git-svn-id: http://skia.googlecode.com/svn/trunk@14326 2bbb7eff-a529-9590-31e7-b0007b416f81