Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Issue 49463005: Fix narrowing conversion errors from r11986 (Closed)

Created:
7 years, 1 month ago by enne (OOO)
Modified:
7 years, 1 month ago
Reviewers:
epoger, reed1
CC:
skia-review_googlegroups.com, fmalita_google_do_not_use
Visibility:
Public.

Description

Fix narrowing conversion errors from r11986 Although this function only gets used for SkMScalar=float, it gets compiled in when SkMScalar=double. R=epoger@google.com BUG=1764 Committed: http://code.google.com/p/skia/source/detail?r=11991

Patch Set 1 #

Total comments: 1

Patch Set 2 : Wrap #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M src/utils/SkMatrix44.cpp View 1 1 chunk +4 lines, -1 line 3 comments Download

Messages

Total messages: 10 (0 generated)
enne (OOO)
I think this should fix things.
7 years, 1 month ago (2013-10-28 21:14:19 UTC) #1
epoger
LGTM (assuming trybots pass) Thanks for the fix, and trying it on the affected trybots. ...
7 years, 1 month ago (2013-10-28 21:17:33 UTC) #2
enne (OOO)
BuildSkiaLib passed on the Mac10.6 bot, so will CQ this since the tree is red.
7 years, 1 month ago (2013-10-28 21:25:52 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/enne@chromium.org/49463005/70001
7 years, 1 month ago (2013-10-28 21:26:08 UTC) #4
commit-bot: I haz the power
Change committed as 11991
7 years, 1 month ago (2013-10-28 22:05:46 UTC) #5
reed1
https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp File src/utils/SkMatrix44.cpp (right): https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp#newcode823 src/utils/SkMatrix44.cpp:823: SkMScalarToFloat(mat[0][i]) * sx + This technique throws away all ...
7 years, 1 month ago (2013-10-29 14:58:52 UTC) #6
epoger
https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp File src/utils/SkMatrix44.cpp (right): https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp#newcode823 src/utils/SkMatrix44.cpp:823: SkMScalarToFloat(mat[0][i]) * sx + On 2013/10/29 14:58:52, reed1 wrote: ...
7 years, 1 month ago (2013-10-29 15:18:29 UTC) #7
reed1
On 2013/10/29 15:18:29, epoger wrote: > https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp > File src/utils/SkMatrix44.cpp (right): > > https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp#newcode823 > ...
7 years, 1 month ago (2013-10-29 15:49:12 UTC) #8
enne (OOO)
https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp File src/utils/SkMatrix44.cpp (right): https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp#newcode823 src/utils/SkMatrix44.cpp:823: SkMScalarToFloat(mat[0][i]) * sx + On 2013/10/29 14:58:52, reed1 wrote: ...
7 years, 1 month ago (2013-10-29 16:56:37 UTC) #9
reed1
7 years, 1 month ago (2013-10-29 16:58:42 UTC) #10
Message was sent while issue was closed.
On 2013/10/29 16:56:37, enne wrote:
> https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp
> File src/utils/SkMatrix44.cpp (right):
> 
>
https://codereview.chromium.org/49463005/diff/70001/src/utils/SkMatrix44.cpp#...
> src/utils/SkMatrix44.cpp:823: SkMScalarToFloat(mat[0][i]) * sx +
> On 2013/10/29 14:58:52, reed1 wrote:
> > This technique throws away all of the precision benefits of having doubles
in
> > MScalar. Look at map2_af for an alternate technique. It keeps all
> intermediates
> > in doubles (MScalar), and just pays the (perf) cost of the conversion when
> > writing the final answer.
> 
> When SkMScalar is a float, map2_af's technique is slow because of all the
float
> to double conversions.  I think there either need to be #ifdefs or some use of
> SkMScalar as intermediates to keep floats as floats and doubles as doubles
> without the conversion cost.

Good observation. Perhaps it should have taken the input X,Y as MScalars instead
of explicitly doubles.

Powered by Google App Engine
This is Rietveld 408576698