Commit Graph

8 Commits

Author SHA1 Message Date
liyuqian
0d2c234e44 Fix SkFixedDiv macro
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
2016-07-13 13:34:46 -07:00
brianosman
14f850abfe Remove Sk(Float|Double)PinToFixed functions, only used in tests.
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
2016-05-06 11:45:55 -07:00
reed
1541130b66 remove SK_SUPPORT_LEGACY_DIVBITS_UB -- chrome no longer defines this
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
2016-04-27 18:45:36 -07:00
fmalita
e7365065ac Revert of For *ToFixed, in debug mode, assert that the value is in range. (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
2016-04-07 19:27:45 -07:00
benjaminwagner
93dc33972c 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

Review URL: https://codereview.chromium.org/1824733002
2016-04-07 09:52:19 -07:00
benjaminwagner
70f1a6c64e Add pinned versions of *ToFixed.
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
2016-04-07 09:23:12 -07:00
benjaminwagner
6c71e0a065 Reverse dependency between SkScalar.h and SkFixed.h.
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
2016-04-07 08:49:31 -07:00
benjaminwagner
dfed06f6ff Make SkFixed private.
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
2016-03-28 10:32:06 -07:00