aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/private/SkFixed.h
Commit message (Collapse)AuthorAge
* Fix new IT blocks ARMv8Gravatar Amaury Le Leyzour2017-04-26
| | | | | | | | | | | | | | | | | | ARMv8 specifies that an IT block should be followed by only one 16-bit instruction. * SkFloatToFix is back to a C implementation that mirrors the assembly code. * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let the compiler choose what is best in the context of the IT block. And replaced 'keep_dst' by 'ip' where low register or high register does not matter. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: If587110a0c74b637ae99460419d46cf969c694fc Reviewed-on: https://skia-review.googlesource.com/9346 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "Fix new IT blocks ARMv8"Gravatar Mike Klein2017-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 90165c2269bc33ca3d6aaa73d528194daf48da4e. Reason for revert: Skia and Chrome iOS builds broken. ../../third_party/skia/include/private/SkFixed.h:106:41: error: invalid output constraint '+t' in asm asm("vcvt.s32.f32 %0, %0, #16": "+t"(x)); Original change's description: > Fix new IT blocks ARMv8 > > ARMv8 specifies that an IT block should be followed by only one 16-bit instruction. > * SkFloatToFix is back to a C implementation that mirrors the assembly code. > > * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let > the compiler choose what is best in the context of the IT block. And replaced > 'keep_dst' by 'ip' where low register or high register does not matter. > > BUG=skia: > > CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD > > Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b > Reviewed-on: https://skia-review.googlesource.com/9340 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Mike Klein <mtklein@chromium.org> > TBR=mtklein@chromium.org,amaury.leleyzour@arm.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: Idbcbda88039066153e1c34233d43366ab114fd01 Reviewed-on: https://skia-review.googlesource.com/9332 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fix new IT blocks ARMv8Gravatar Amaury Le Leyzour2017-03-06
| | | | | | | | | | | | | | | | | | ARMv8 specifies that an IT block should be followed by only one 16-bit instruction. * SkFloatToFix is back to a C implementation that mirrors the assembly code. * S32A_D565_Opaque_neon switched the usage of the temporary 'ip' register to let the compiler choose what is best in the context of the IT block. And replaced 'keep_dst' by 'ip' where low register or high register does not matter. BUG=skia: CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD Change-Id: I096759841c972e9300c1d0293bc80d3c3ff2747b Reviewed-on: https://skia-review.googlesource.com/9340 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Fixed3232 overflow in LinearGradientContext::shadeSpan()Gravatar Florin Malita2017-02-10
| | | | | | | | | Speculative fix for TAP ubsan failures. Change-Id: Id3a78adbfab04ba3404a23059cbd8c162d812c2e Reviewed-on: https://skia-review.googlesource.com/8315 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "SkScalar: delete code that doesn't compile.""Gravatar Hal Canary2017-02-02
| | | | | | | | | This reverts commit 8233fc82b00763d37a7b0db7890b15c7d58939d4. Change-Id: Ia32ccdb3b385ed28e1b41e553c7d80cf803522cc Reviewed-on: https://skia-review.googlesource.com/7899 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkScalar: delete code thqat doesn't compile."Gravatar Leon Scroggins2017-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 565da18f6e4a0f04dc836ce9d35f31bee31644f7. Reason for revert: breaking android roll: https://googleplex-android-review.git.corp.google.com/#/c/1853481/-1..1 Some code in Android references SK_SCALAR_IS_FLOAT: https://cs.corp.google.com/android/frameworks/base/core/jni/android/graphics/Interpolator.cpp?q=frameworks/base/core/jni/android/graphics/Interpolator.cpp&sq=package:android&l=30 Original change's description: > SkScalar: delete code thqat doesn't compile. > > Change-Id: I8a5c404d6151fca79af5c5a98d4b44924c0ade52 > Reviewed-on: https://skia-review.googlesource.com/7882 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Hal Canary <halcanary@google.com> > TBR=halcanary@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I4df06c4593abaa3ac3877b270a41aec7a9c3fc8f Reviewed-on: https://skia-review.googlesource.com/7888 Commit-Queue: Leon Scroggins <scroggo@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
* SkScalar: delete code thqat doesn't compile.Gravatar Hal Canary2017-02-02
| | | | | | | Change-Id: I8a5c404d6151fca79af5c5a98d4b44924c0ade52 Reviewed-on: https://skia-review.googlesource.com/7882 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Guard against buggy ucrt\math.h.Gravatar Mike Klein2016-11-28
| | | | | | | | | | | | | | BUG=666707 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5089 CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Change-Id: I3bebfdf635d541d92fb84236f0f6fae2da39d691 Reviewed-on: https://skia-review.googlesource.com/5089 Reviewed-by: Bruce Dawson <brucedawson@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Make SkFixedRound/Ceil/FloorToFixed as inline funcGravatar liyuqian2016-10-20
| | | | | | | | | | | | | The macros that we were using will return unsigned int32 instead of signed int32 because of the last 0xFFFF0000 mask. That may bring problems if we right shift that result. Special thanks to mtklein@google.com for helping me find out this issue. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2433233003 Review-Url: https://chromiumcodereview.appspot.com/2433233003
* Fix SkFixedDiv macroGravatar liyuqian2016-07-13
| | | | | | | | | | Previously, the macro won't pass the unit test that I just added in this CL. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2149733002 Review-Url: https://codereview.chromium.org/2149733002
* Remove Sk(Float|Double)PinToFixed functions, only used in tests.Gravatar brianosman2016-05-06
| | | | | | | | | | These were triggering compile-time floating point overflow for one user, and we don't use them. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952303005 Review-Url: https://codereview.chromium.org/1952303005
* remove SK_SUPPORT_LEGACY_DIVBITS_UB -- chrome no longer defines thisGravatar reed2016-04-27
| | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927823002 TBR=mtklein@google.com Review-Url: https://codereview.chromium.org/1927823002
* Revert of For *ToFixed, in debug mode, assert that the value is in range. ↵Gravatar fmalita2016-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:140001 of https://codereview.chromium.org/1824733002/ ) Reason for revert: Asserts in Blink rolls: https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/84520/layout-test-results/results.html STDERR: [1:1:0407/120919:1455366829:INFO:SkFixed.h(88)] ../../third_party/skia/include/private/SkFixed.h:88: fatal error: ""truncf(x * (1 << 16)) == static_cast<float> Original issue's description: > For *ToFixed, in debug mode, assert that the value is in range. > > Use SkFloatPinToFixed in SkTwoPointConicalGradient.cpp because it is failing in DM. fmalita is working on replacing this code with the 4f version, so I'm not bothering to fix it. (The beginnings of a real fix are in https://codereview.chromium.org/1767163003, which I do not plan to commit.) > > BUG=skia:4632 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824733002 > > Committed: https://skia.googlesource.com/skia/+/93dc33972cd6a418e84270298b856d2de08d9c1c TBR=mtklein@google.com,reed@google.com,benjaminwagner@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4632 Review URL: https://codereview.chromium.org/1868933004
* For *ToFixed, in debug mode, assert that the value is in range.Gravatar benjaminwagner2016-04-07
| | | | | | | | | Use SkFloatPinToFixed in SkTwoPointConicalGradient.cpp because it is failing in DM. fmalita is working on replacing this code with the 4f version, so I'm not bothering to fix it. (The beginnings of a real fix are in https://codereview.chromium.org/1767163003, which I do not plan to commit.) BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1824733002 Review URL: https://codereview.chromium.org/1824733002
* Add pinned versions of *ToFixed.Gravatar benjaminwagner2016-04-07
| | | | | | | BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707023002 Review URL: https://codereview.chromium.org/1707023002
* Reverse dependency between SkScalar.h and SkFixed.h.Gravatar benjaminwagner2016-04-07
| | | | | | | | | | | | | | | The following are unused in Chromium, Android, Mozilla, and Google3: - SkFixedToScalar - SkScalarToFixed The following are additionally unused in Skia: - SkStrAppendFixed - SkWriteBuffer::writeFixed BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1841123002 Review URL: https://codereview.chromium.org/1841123002
* Make SkFixed private.Gravatar benjaminwagner2016-03-28
Removed from Chromium in https://codereview.chromium.org/1698083004 and https://codereview.chromium.org/1752953003. Removed from Android in 895781. Removed from Google3 in internal cl/118359061. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1839653002 Review URL: https://codereview.chromium.org/1839653002