aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState.cpp
Commit message (Collapse)AuthorAge
* 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>
* make most of SkColorPriv.h privateGravatar Cary Clark2017-09-15
| | | | | | | | | | | | | created new file src/core/SkColorData.h for internal consumption. Note that many of the functions there are unused as well. Bug: skia: 6898 R: reed@google.com Change-Id: I25bfd5a9c21f53558c4ca65a77eb5d322d897c6d Reviewed-on: https://skia-review.googlesource.com/46848 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com>
* 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>
* Remove SK_SUPPORT_LEGACY_BILERP2 dead codeGravatar Florin Malita2017-08-22
| | | | | | | | | Flag no longer defined. Change-Id: I4b4aa33ecd23b485cf80d79882f52da96c82a567 Reviewed-on: https://skia-review.googlesource.com/36822 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* use rasterpipeline if localmatrix is rotated or skewed for imagesGravatar Mike Reed2017-08-21
| | | | | | | | | Bug: skia: Change-Id: Ib269b5b9d79b055fe614aaacfd7e0d05d48f6085 Reviewed-on: https://skia-review.googlesource.com/33180 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Skip bilerp for integral-translate-only matrices (!clamp-clamp case)Gravatar Florin Malita2017-08-15
| | | | | | | | | | | | | | | | We've landed https://skia-review.googlesource.com/24126 to restore this optimization, but we check too late: for non-clamp/clamp cases we'd already adjusted the matrix scale, so the optimization never kicks in. Relocate the integral translation check before all other matrix adjustments. BUG=chromium:744674 Change-Id: I395d327c3ddf74dc6d23bb8aee782ec62a7373f1 Reviewed-on: https://skia-review.googlesource.com/34840 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove dead SK_SUPPORT_LEGACY_BILERP codeGravatar Florin Malita2017-07-31
| | | | | | | Change-Id: Iec5725d594cc4726ac72526a1cc62f48e35b6647 Reviewed-on: https://skia-review.googlesource.com/28640 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@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>
* Add guard to unblock the Chromium rollGravatar Florin Malita2017-07-18
| | | | | | | | | TBR= Change-Id: I87f96fb88479de770490ce4cce6ad840acb90241 Reviewed-on: https://skia-review.googlesource.com/24261 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Skip bilerp for integral-translate-only matricesGravatar Florin Malita2017-07-17
| | | | | | | | | BUG=chromium:744674 Change-Id: I053a0c26b0f644faa11f469b8a6486302a5efae6 Reviewed-on: https://skia-review.googlesource.com/24126 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Delete dead SK_SUPPORT_LEGACY_BILERP_IGNORING_HACK codeGravatar Florin Malita2017-07-17
| | | | | | | Change-Id: I367436ea5bef476a2e596f01bb57fa5b817a3619 Reviewed-on: https://skia-review.googlesource.com/24122 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* remove unreachable perspective code for imageshaderGravatar Mike Reed2017-07-12
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: If9a7df3e1c387098b00bf1cc1a37c36c6d256ef1 Reviewed-on: https://skia-review.googlesource.com/22348 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* guard legacy bilerp-ignorning hackGravatar Mike Reed2017-07-06
| | | | | | | | Bug: skia:6835 Change-Id: I7f3136595299f9193bc9173a03b782888043aeb5 Reviewed-on: https://skia-review.googlesource.com/21722 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* remove unreachable samples for non-N32 imageshadersGravatar Mike Reed2017-06-29
| | | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I2d9a22b22d72c81a742b8fd497797bff8174915b Reviewed-on: https://skia-review.googlesource.com/21264 Commit-Queue: Eric Boren <borenet@google.com> Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove unused SkFilterProcsGravatar Mike Reed2017-06-21
| | | | | | | | | CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Bug: skia: Change-Id: I7f9abb3ecb1c7b4fd18a703198c54c6d8f5e1ef7 Reviewed-on: https://skia-review.googlesource.com/20429 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* bicubic, attempt gazillionGravatar Mike Klein2016-12-09
| | | | | | | | | | | | | - explicitly separate bilinear_ stages in x and y too BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Ib7b4f9d26ea6abe9171068e92424479d811ee606 Reviewed-on: https://skia-review.googlesource.com/5636 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@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>
* Avoid matrix inverse in SkBitmapProcInfo::init for translate-only casesGravatar fmalita2016-11-03
| | | | | | | | | | | If fInvMatrix doesn't have a scale component, the really-close-to-no-scale logic is a no-op. We can avoid an inverse op by hoisting the check out of just_trans_clamp/just_trans_general. R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2472003004 Review-Url: https://codereview.chromium.org/2472003004
* Fix kMediumQuality invMatrix setup for sizes == mip levelsGravatar fmalita2016-11-03
| | | | | | | | | | When downscaling with kMediumQuality in non-clamp mode, if we happen to hit a size == mip level, then SkBitmapProcInfo::init takes the trivial matrix path and doesn't set up a matrix for normalized coords on the assumption that we're going to ignore the transform. But kMediumQuality disables allow_ignore_fractional_translate, so we take the filter path after all - but with an incorrect matrix. R=reed@google.com BUG=chromium:661180 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2476713002 Review-Url: https://codereview.chromium.org/2476713002
* Remove some useless declarationsGravatar sylvestre.ledru2016-09-01
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270613003 Review-Url: https://codereview.chromium.org/2270613003
* 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
* Remove NEON runtime detection support.Gravatar mtklein2016-05-05
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952953004 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/1952953004
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* 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
* 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
* Remove SK_SUPPORT_LEGACY_SAMPLER_BIASGravatar fmalita2016-02-02
| | | | | | | | | The guard has been removed from Chromium, this is now dead code. TBR=reed@google.com,caryclark@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658563002 Review URL: https://codereview.chromium.org/1658563002
* Sampler bias for all nofilter flavorsGravatar fmalita2016-02-02
| | | | | | | | | | | | Instead of a piecemeal approach to sampler bias (http://crrev.com/1642273002, http://crrev.com/1539083002), audit all nofilter procs (grep "fInvProc(") and convert them to SkBitmapProcStateAutoMapper. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656833002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot R=reed@google.com Review URL: https://codereview.chromium.org/1656833002
* Fix S32_D32_constX_shaderproc assertGravatar fmalita2016-02-01
| | | | | | | | | | | | | | | After https://crrev.com/1642273002, fFilterOneY includes a rounding bias which is not accounted for in the debug-mode S32_D32_constX_shaderproc check. Update the S32_D32_constX_shaderproc assert to use the (biased) SkBitmapProcStateAutoMapper utility. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1655823002 R=reed@google.com BUG=skia:4874 Review URL: https://codereview.chromium.org/1655823002
* Suppress SkBitmapProcState assert temporarilyGravatar fmalita2016-02-01
| | | | | | | | TBR=jcgregorio@google.com,reed@google.com BUG=skia:4874 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1658573002 Review URL: https://codereview.chromium.org/1658573002
* 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 dead code around SK_SUPPORT_LEGACY_TRANSLATEROUNDHACKGravatar reed2016-01-21
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1611183002 TBR= Review URL: https://codereview.chromium.org/1611183002
* change kMedium_SkFilterQuality to never pop if we're scalingGravatar reed2016-01-20
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1605193002 Review URL: https://codereview.chromium.org/1605193002
* remove fragile assertGravatar reed2016-01-20
| | | | | | | | | | | | | The assert basically wants the following to always be true (but it aint) floor(int + 0.5 + float) == floor(0.5 + float) + int ... where int + 0.5 happens first, and then we add the float. BUG=skia:4825 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1609873003 Review URL: https://codereview.chromium.org/1609873003
* don't preround in bitmap scaling setupGravatar reed2016-01-19
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1607853003 Review URL: https://codereview.chromium.org/1607853003
* 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
* 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
* 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