aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapProcState_matrixProcs.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* add decal tilemode to shadersGravatar Mike Reed2018-02-16
| | | | | | | | | | | | | Plenty more to follow-up: - gradients - gpu impl Bug: skia:7638 Change-Id: I8e54fd0e24921f040f178c793b36c7fb855b136e Reviewed-on: https://skia-review.googlesource.com/107420 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@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>
* 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>
* Consolidate TILEX_LOW_BITS/TILEY_LOW_BITS -> EXTRACT_LOW_BITSGravatar Florin Malita2016-12-19
| | | | | | | | | | | R=reed@google.com CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I5450d1ae3239c9d4e70502fc042222410ac77e72 Reviewed-on: https://skia-review.googlesource.com/6265 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@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>
* 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
* Remove version checks for _MSC_VER < 1800 (msvs2013).Gravatar bungeman2016-03-10
| | | | | | | | | | | | We already actively do not support older versions of the vc++ compiler and runtime, so don't check for them anymore. TBR=reed No API changes. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777213003 Review URL: https://codereview.chromium.org/1777213003
* 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
* 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
* ubsan shift fixesGravatar caryclark2015-12-09
| | | | | | | | | | | Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned. Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros. R=reed@google.com,mtklein@google.com BUG=skia:4633 Review URL: https://codereview.chromium.org/1503423003
* Fix up signed-integer-overflow warningsGravatar tomhudson2015-12-07
| | | | | | | | | | | | | | | | | When checking whether a matrix was a pure scale, we subtracted 0x3f800000 from the diagonals; if the diagonal value was already very negative, we'd underflow. Replace subtraction with XOR. When dealing with repeating tiled bitmaps, when the bitmap was very large, we'd multiply an offset by 65535, possibly causing underflow. Throw in a cast to long (casting to unsigned also silences the warning and wouldn't involve extension, but I can't convince myself that it's correct). BUG=skia:4635 R=mtklein@google.com Review URL: https://codereview.chromium.org/1504933002
* switch bitmapshader internals over to pixmapGravatar reed2015-06-04
| | | | | | | BUG=skia: NOTRY=True Review URL: https://codereview.chromium.org/1158273007
* SkPaint::FilterLevel -> SkFilterQualityGravatar reed2015-03-16
| | | | | | | | | clone (+rebase) of https://codereview.chromium.org/1009183002/ BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1014533004
* short circuit high quality scales that are actually the identityGravatar humper2014-08-08
| | | | | | | | | | | transform BUG=skia: R=reed@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/456843002
* Cleanup of SSE optimization files.Gravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | | | | | | | | | | | | General cleanup of optimization files for x86/SSEx. Renamed the opts_check_SSE2.cpp file to _x86, since it's not specific to SSE2. Commented out the ColorRect32 optimization, since it's disabled anyway, to make it more visible. Also fixed a lot of indentation, inclusion guards, spelling, copyright headers, braces, whitespace, and sorting of includes. Author: henrik.smiding@intel.com Signed-off-by: Henrik Smiding <henrik.smiding@intel.com> R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com Author: henrik.smiding@intel.com Review URL: https://codereview.chromium.org/264603002 git-svn-id: http://skia.googlecode.com/svn/trunk@14464 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of use templates instead of macros to build blitters ↵Gravatar reed@google.com2014-04-14
| | | | | | | | | | | | (https://codereview.chromium.org/120633004/)" This reverts commit e9d2798fd37e2fb33b545d142a5baa21a4b747fe. BUG=skia: Review URL: https://codereview.chromium.org/236303008 git-svn-id: http://skia.googlecode.com/svn/trunk@14185 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of use templates instead of macros to build blitters ↵Gravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/120633004/) Reason for revert: Broke build. Original issue's description: > use templates instead of macros to build blitters > > BUG= > > Committed: http://code.google.com/p/skia/source/detail?r=14178 R=mtklein@google.com, reed@google.com TBR=mtklein@google.com, reed@google.com NOTREECHECKS=true NOTRY=true BUG= Author: bungeman@google.com Review URL: https://codereview.chromium.org/236593006 git-svn-id: http://skia.googlecode.com/svn/trunk@14180 2bbb7eff-a529-9590-31e7-b0007b416f81
* use templates instead of macros to build blittersGravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | BUG= R=mtklein@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/120633004 git-svn-id: http://skia.googlecode.com/svn/trunk@14178 2bbb7eff-a529-9590-31e7-b0007b416f81
* ARM Skia NEON patches - 18 - Preparation work for BitmapProcStateGravatar commit-bot@chromium.org2013-09-05
| | | | | | | | | | | | | | | | | | | | | | BitmapProcState: clean a little and get rid of some asm replacing the apparently stupid dx+dx+dx leads to more instructions being generated. Signed-off-by: Kévin PETIT <kevin.petit@arm.com> BitmapProcState: move code common to C and NEON to a separate header Signed-off-by: Kévin PETIT <kevin.petit@arm.com> BUG= R=djsollen@google.com Author: kevin.petit.arm@gmail.com Review URL: https://chromiumcodereview.appspot.com/21931002 git-svn-id: http://skia.googlecode.com/svn/trunk@11109 2bbb7eff-a529-9590-31e7-b0007b416f81
* fold SK_CPU_HAS_CONDITION_INSTR through as always definedGravatar commit-bot@chromium.org2013-07-30
| | | | | | | | | | | BUG= R=reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/21122005 git-svn-id: http://skia.googlecode.com/svn/trunk@10432 2bbb7eff-a529-9590-31e7-b0007b416f81
* stop using bitmap-filter flags outside of paint itself, as a step towards ↵Gravatar reed@google.com2013-07-22
| | | | | | | | | | really changing them into an enum BUG= Review URL: https://codereview.chromium.org/19825002 git-svn-id: http://skia.googlecode.com/svn/trunk@10240 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix trivial matrix computationGravatar humper@google.com2013-07-14
| | | | | | | | | | | | | | Revert "Reverted 10056-10059" This reverts commit bab4ebcaa7270c3b866a8e10917c39b055ebd51a. Fix broken GM test, reintroduce image scaling. BUG= Review URL: https://codereview.chromium.org/18721006 git-svn-id: http://skia.googlecode.com/svn/trunk@10066 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverted 10056-10059Gravatar robertphillips@google.com2013-07-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@10060 2bbb7eff-a529-9590-31e7-b0007b416f81
* Working plumb of image scaling:Gravatar humper@google.com2013-07-12
| | | | | | | | | | | | | | | | 1) always generate mipmaps if we detect that we are downsampling. 2) pre-scale the image if we detect that we are upsampling (currently valid for scale+translate only) 3) A few miscellaneous bug fixes related to image scaling. Still need SSE/Neon versions of these image scalers. BUG= R=bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/18978014 git-svn-id: http://skia.googlecode.com/svn/trunk@10056 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* eliminate all warnings in non-thirdparty code on macGravatar humper@google.com2013-01-07
| | | | | | | | | | | | | | | | Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions. Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here. Lots of unused variables removed, and one nasty const issue handled. There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch. I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one. BUG= Review URL: https://codereview.appspot.com/7067044 git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
* correctly handle negative values in fixed_clamp()Gravatar reed@google.com2012-10-09
| | | | | | Review URL: https://codereview.appspot.com/6633049 git-svn-id: http://skia.googlecode.com/svn/trunk@5867 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* rm: Introduce SK_ARM_NEON_WRAP handy wrapper macro.Gravatar digit@google.com2012-08-06
| | | | | | | It is used to simplify arm/neon dispatch logic code. Review URL: https://codereview.appspot.com/6458060 git-svn-id: http://skia.googlecode.com/svn/trunk@4958 2bbb7eff-a529-9590-31e7-b0007b416f81
* arm: dynamic NEON support for SkBitmapProcState matrix operations.Gravatar digit@google.com2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements dynamic ARM NEON support for the functions implemented by src/core/SkBitmapProcState_matrixProcs.cpp. - Because the SkBitmapProcState_matrix_{clamp,repeat}.h headers are NEON-specific, they are renamed with a _neon.h suffix, and moved to src/opts/ (from src/core/) - Add a new file src/opts/SkBitmapProcState_matrixProcs_neon.cpp which implements the NEON code paths for all builds, and add it to the 'opts_neon' static library. - Modify SkBitmapProcState_matrixProcs.cpp to select the right code-path depending on our build configuration. Note that in the case where 'arm_neon == 1', we do not embed regular ARM code paths in the final binary. Only 'arm_neon_optional == 1' builds will contain both regular and NEON code paths at the same time. Note that there doesn't seem to be a simple way to put the NEON-specific selection from that currently is in SkBitmapProcState_matrixProcs.cpp into src/opts/. Doing so would require much more drastic restructuring. This is also true of the other SkBitmapProcState source files that will be touched in a future patch. Review URL: https://codereview.appspot.com/6453065 git-svn-id: http://skia.googlecode.com/svn/trunk@4888 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix calling (and checking) the decal_ functions when the input is ↵Gravatar reed@google.com2012-06-13
| | | | | | | | | | | | | SkFractionalInt. The bug was to cast to SkFixed from SkFractionalInt, when what we needed to do was shift the fractional guy down to fixed. This bug was only caught on an android device w/o neon, since other configs have assembly for their matrixproc that didn't have this bug. Review URL: https://codereview.appspot.com/6303074 git-svn-id: http://skia.googlecode.com/svn/trunk@4256 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix/revert the unsigned-shift change made to clamp in 3836. For clamp we wantGravatar reed@google.com2012-05-04
| | | | | | | | to see the negatives, so we must have a signed shift. git-svn-id: http://skia.googlecode.com/svn/trunk@3839 2bbb7eff-a529-9590-31e7-b0007b416f81
* We were numerically overflowing our 16bit coordinates that we communicateGravatar reed@google.com2012-05-03
| | | | | | | | | | | | | between these two procs. The fixes was in two parts: 1. Just don't draw bitmaps larger than 64K-1 in width or height, since we can't represent those coordinates in our transport format (yet). 2. Perform an unsigned shift during the calculation, so we don't get sign-extension bleed when packing the two values (X,Y) into our 32bit slot. Review URL: https://codereview.appspot.com/6173046 git-svn-id: http://skia.googlecode.com/svn/trunk@3836 2bbb7eff-a529-9590-31e7-b0007b416f81
* speculative fix for debug/release problem on windows with mirror bitmapsGravatar reed@google.com2012-04-18
| | | | | | Review URL: https://codereview.appspot.com/6063051 git-svn-id: http://skia.googlecode.com/svn/trunk@3728 2bbb7eff-a529-9590-31e7-b0007b416f81
* don't flip the fractional bits (low 4) for bilerp when in kMirror_TileModeGravatar reed@google.com2012-03-09
| | | | | | Review URL: https://codereview.appspot.com/5795043 git-svn-id: http://skia.googlecode.com/svn/trunk@3357 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added BSD license language where missing.Gravatar caryclark@google.com2012-02-17
| | | | | | | See Chromium bug 98464, Review URL: https://codereview.appspot.com/5671083 git-svn-id: http://skia.googlecode.com/svn/trunk@3218 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix overflow in matrixproc, and add debugging code to test thatGravatar reed@android.com2010-04-14
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@548 2bbb7eff-a529-9590-31e7-b0007b416f81
* add neon opts for matrix procsGravatar reed@android.com2009-09-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@353 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix typo in matrix proc index computation, where we were always taking theGravatar reed@android.com2009-08-14
| | | | | | | | perspective case when affine would have been enough (and lots faster). git-svn-id: http://skia.googlecode.com/svn/trunk@323 2bbb7eff-a529-9590-31e7-b0007b416f81
* add method to compute max count for a given buffer size in the bitmap shader.Gravatar reed@android.com2009-08-14
| | | | | | | | fix bug in quad loop of fill_sequential where we were going one quad too far. git-svn-id: http://skia.googlecode.com/svn/trunk@322 2bbb7eff-a529-9590-31e7-b0007b416f81
* add special matrixprocs when the matrix is at most translate. These are fasterGravatar reed@android.com2009-08-13
| | | | | | | | | | | (somewhat) than their scale counterparts, but are also numerically exact for any size bitmaps. The scale versions, because they operate in a scaled 65535 space, are not always exact for large images (due to SK_Fixed1 / width) loss of bits git-svn-id: http://skia.googlecode.com/svn/trunk@320 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81