aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkMath.h
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>
* Remove SkMulDiv.Gravatar Ben Wagner2018-06-13
| | | | | | | | | | | This removes the last use of SkMulDiv. This last use was in the conversion code for FontConfig widths and weights which is modified to use SkScaler instead of SkFixed. Change-Id: Ia20a2066cbc42e986c44fc573829edf86973846e Reviewed-on: https://skia-review.googlesource.com/134426 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Ben Wagner <bungeman@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>
* Remove sk_64_isS32 and sk_64_asS32Gravatar Herb Derby2018-05-21
| | | | | | | | | This is an API change. I assume that only Skia uses these routines. Change-Id: Iefc98fa5c0b83eb4f52c478e345fd99121ecb254 Reviewed-on: https://skia-review.googlesource.com/129440 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.Gravatar mtklein2016-08-16
| | | | | | | | | | | | We think Android can cache these better than a global freelist allows. This removes the freelisting but adds reset() to allow reuse. I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248693004 Review-Url: https://codereview.chromium.org/2248693004
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* remove (now unused) SkDivBitsGravatar reed2016-04-28
| | | | | | | | | needs https://codereview.chromium.org/1927823002/ to land first BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925913002 Review-Url: https://codereview.chromium.org/1925913002
* 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
* The compiler can generate smulbb perfectly well nowadays.Gravatar mtklein2015-08-07
| | | | | | BUG=skia:4117 Review URL: https://codereview.chromium.org/1273203002
* Make SkIsPow2 templatedGravatar bsalomon2015-07-31
| | | | Review URL: https://codereview.chromium.org/1271533002
* Disable the noisiest /analyze warning in Chrome. ~3,700/12,000Gravatar brucedawson2015-01-30
| | | | | | | | | | | | | | | | | | Decades ago Intel decided that the bsr (Bit Scan Reverse) instruction should have undefined results if its argument is zero. This probably makes the instruction harder to implement and it definitely makes it more difficult to use. In SkCLZ_portable it requires a check for a zero argument, but despite that check /analyze still warns that _BitScanReverse might fail (because it doesn't know what can cause failures). Because this warning occurs in a frequently included header file it ends up being very noisy, accounting for ~30% of all warnings (before deduplication). Suppressing this useless warning will make the raw results easier to look through. Review URL: https://codereview.chromium.org/872673007
* SK_CPU_ARM --> SK_CPU_ARM32Gravatar mtklein2014-06-03
| | | | | | | | | | | That's what it means. It keeps confusing us as named today. BUG=skia: R=djsollen@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/314643004
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-04-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@14270 2bbb7eff-a529-9590-31e7-b0007b416f81
* inline SkMulDiv now that 64bit mul is inlineableGravatar commit-bot@chromium.org2014-04-19
| | | | | | | | | | TBR=caryclark@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/242493006 git-svn-id: http://skia.googlecode.com/svn/trunk@14268 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert of https://codereview.chromium.org/113823003/"Gravatar reed@google.com2013-12-30
| | | | | | | | | | This reverts commit 68b4b32066ea0ba9dbb5d326a836f8a54297b7aa. BUG= Review URL: https://codereview.chromium.org/122293002 git-svn-id: http://skia.googlecode.com/svn/trunk@12842 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of https://codereview.chromium.org/113823003/Gravatar commit-bot@chromium.org2013-12-30
| | | | | | | | | | | | | | | | Reason for revert: need to update callsites in linux codecs R=robertphillips@google.com TBR=robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG= Author: reed@google.com Review URL: https://codereview.chromium.org/122283002 git-svn-id: http://skia.googlecode.com/svn/trunk@12841 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove Sk64 from public API, and start to remove usage internallyGravatar reed@google.com2013-12-30
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/113823003 git-svn-id: http://skia.googlecode.com/svn/trunk@12840 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkDivMod with a special case for ARM.Gravatar commit-bot@chromium.org2013-09-26
| | | | | | | | | | | BUG=skia:1663 R=djsollen@google.com, tomhudson@google.com, reed@google.com Author: mtklein@google.com Review URL: https://chromiumcodereview.appspot.com/24159009 git-svn-id: http://skia.googlecode.com/svn/trunk@11482 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of r10671 (Experiments on calculating reciprocal of square root) due ↵Gravatar robertphillips@google.com2013-08-12
| | | | | | | | | | | | to bots failures: Win7: http://108.170.217.252:10117/builders/Build-Win7-VS2010-x86-Debug/builds/715/steps/BuildMost/logs/stdio Win8: http://108.170.217.252:10117/builders/Build-Win8-VS2012-x86-Debug/builds/383/steps/BuildMost/logs/stdio Mac10.6: http://108.170.217.252:10117/builders/Build-Mac10.6-GCC-x86-Debug/builds/1259/steps/BuildMost/logs/stdio git-svn-id: http://skia.googlecode.com/svn/trunk@10672 2bbb7eff-a529-9590-31e7-b0007b416f81
* Experiments on calculating reciprocal of square rootGravatar commit-bot@chromium.org2013-08-12
| | | | | | | | | | | BUG= R=reed@google.com, rmistry@chromium.org, bsalomon@google.com, tomhudson@chromium.org, tomhudson@google.com Author: yang.gu@intel.com Review URL: https://chromiumcodereview.appspot.com/21755002 git-svn-id: http://skia.googlecode.com/svn/trunk@10671 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable __builtin_clz for GNUC (and clang), recognizing that it is ↵Gravatar reed@google.com2013-04-29
| | | | | | | | | | undefined for a zero argument, so we check for that explicitly. git-svn-id: http://skia.googlecode.com/svn/trunk@8905 2bbb7eff-a529-9590-31e7-b0007b416f81
* temp work-around for mysterious failure of shadertext2 when using __builtin_clzGravatar reed@google.com2013-04-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8900 2bbb7eff-a529-9590-31e7-b0007b416f81
* reland 8897 (was not a build-breaker) and fix MathTest (was a build-breaker)Gravatar reed@google.com2013-04-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8899 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 8897 -- broke clang buildGravatar reed@google.com2013-04-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8898 2bbb7eff-a529-9590-31e7-b0007b416f81
* use intrinsics on more platforms for SkCLZGravatar reed@google.com2013-04-29
| | | | | | Review URL: https://codereview.chromium.org/14418004 git-svn-id: http://skia.googlecode.com/svn/trunk@8897 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix asserts in SkMulDiv255Round, and add testGravatar reed@google.com2013-04-22
| | | | | | Review URL: https://codereview.chromium.org/13934010 git-svn-id: http://skia.googlecode.com/svn/trunk@8813 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
* first cut at making iOS workGravatar caryclark@google.com2012-09-20
| | | | | | | | | | | | | Replace __arm__ with SK_CPU_ARM add support for iOS simulator and device fix const warning in iOSSampleApp update gyp files https://code.google.com/p/skia/issues/detail?id=900 tracks fixing missing arm assembly Review URL: https://codereview.appspot.com/6552045 git-svn-id: http://skia.googlecode.com/svn/trunk@5606 2bbb7eff-a529-9590-31e7-b0007b416f81
* move SkSqrt32 back into SkMath.h -- was referenced in SkEmbossMask.cppGravatar reed@google.com2012-08-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5000 2bbb7eff-a529-9590-31e7-b0007b416f81
* Privatization:Gravatar reed@google.com2012-08-07
| | | | | | | | move SkFDot.h to private move parts of SkMath.h into SkMathPriv.h Review URL: https://codereview.appspot.com/6461045 git-svn-id: http://skia.googlecode.com/svn/trunk@4997 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add support for ARM without EDSP and ARMv6+Gravatar george@mozilla.com2012-07-27
| | | | | | | | Original Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=751814 Review URL: https://codereview.appspot.com/6405065 git-svn-id: http://skia.googlecode.com/svn/trunk@4818 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unneeded check for thumb. see http://codereview.appspot.com/4539048/Gravatar reed@google.com2011-06-02
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1477 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove optional impl for SkClampMax that relied on not wrapping, as in factGravatar reed@google.com2011-03-24
| | | | | | | | we do sometimes (e.g. gradients). git-svn-id: http://skia.googlecode.com/svn/trunk@1003 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream mulDiv255Ceil() from WebKit to the skia repository.Gravatar senorblanco@chromium.org2010-12-07
| | | | | | | | | | (Patch by Noel Gordon (noel.gordon@gmail.com)) Review URL: http://codereview.appspot.com/3466042 git-svn-id: http://skia.googlecode.com/svn/trunk@632 2bbb7eff-a529-9590-31e7-b0007b416f81
* add copysign for ints and floatsGravatar reed@android.com2010-02-09
| | | | | | | | | fix addArc to not wrap around if the sweepAngle is close to 360 but lost precision when convert to radians (and then to unit vectors ala sin/cos) git-svn-id: http://skia.googlecode.com/svn/trunk@495 2bbb7eff-a529-9590-31e7-b0007b416f81
* chant __ARM_ARCH_4__ to __ARM_ARCH_4T__, to reflect known android targetsGravatar reed@android.com2010-01-04
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@467 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix compliation on gcc-4.3 and ARMv5TGravatar deanm@chromium.org2009-08-21
| | | | | | | | | | | | - smulbb is only on ARMv5TE and above (p316, ARM Architecture Reference Manual) - an empty clobber list causes a compiler error with my compiler, gcc-4.3.2 Patch by Joel Stanley <joel@jms.id.au> Review URL: http://codereview.appspot.com/96165 git-svn-id: http://skia.googlecode.com/svn/trunk@329 2bbb7eff-a529-9590-31e7-b0007b416f81
* move xfermode modes from porterduff into xfermode itselfGravatar reed@android.com2009-06-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@232 2bbb7eff-a529-9590-31e7-b0007b416f81
* patch SkMath.h to build in ARMv4Gravatar reed@android.com2009-03-05
| | | | | | | | test code for mac fonts (disabled) git-svn-id: http://skia.googlecode.com/svn/trunk@110 2bbb7eff-a529-9590-31e7-b0007b416f81
* add initial unittest framework (tests)Gravatar reed@android.com2009-02-27
| | | | | | | | move some previous unittests out of core classes and into tests git-svn-id: http://skia.googlecode.com/svn/trunk@96 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