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

Issue 649203003: Type conversion fixes, ui/gfx/ edition. (Closed)

Created:
6 years, 2 months ago by Peter Kasting
Modified:
6 years, 1 month ago
Reviewers:
danakj, ajuma
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Type conversion fixes, ui/gfx/ edition. This is mostly to fix MSVC warnings about possible value truncation. BUG=81439 TEST=none Committed: https://crrev.com/eb00e7e0f5d04772d42a657b6fa7b7aef856be9f Cr-Commit-Position: refs/heads/master@{#302687}

Patch Set 1 #

Patch Set 2 : Fix test #

Total comments: 32

Patch Set 3 : Review comments #

Patch Set 4 : Fix compile #

Total comments: 13

Patch Set 5 : Review comments #

Patch Set 6 : SkIntToMScalar #

Total comments: 8

Patch Set 7 : Review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -125 lines) Patch
M ui/gfx/animation/linear_animation.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/animation/tween.cc View 1 2 3 4 3 chunks +4 lines, -2 lines 0 comments Download
M ui/gfx/color_analysis.cc View 1 2 8 chunks +69 lines, -60 lines 0 comments Download
M ui/gfx/color_utils.cc View 4 chunks +7 lines, -6 lines 0 comments Download
M ui/gfx/display.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/insets.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/gfx/geometry/matrix3_f.cc View 1 chunk +18 lines, -9 lines 0 comments Download
M ui/gfx/geometry/point.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/rect.h View 1 2 3 4 5 6 4 chunks +35 lines, -9 lines 0 comments Download
M ui/gfx/geometry/safe_integer_conversions.h View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
M ui/gfx/geometry/safe_integer_conversions_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/size.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/vector2d.h View 1 chunk +3 lines, -1 line 0 comments Download
M ui/gfx/interpolated_transform.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/skia_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/transform.cc View 1 2 3 4 5 6 5 chunks +11 lines, -11 lines 0 comments Download
M ui/gfx/transform_util.cc View 1 2 3 4 3 chunks +21 lines, -18 lines 0 comments Download

Messages

Total messages: 24 (3 generated)
Peter Kasting
There's one place I wasn't sure the existing code was correct, which I marked with ...
6 years, 2 months ago (2014-10-17 01:26:05 UTC) #2
Peter Kasting
New version up which fixes test failure in patch set 1 by continuing to use ...
6 years, 2 months ago (2014-10-17 23:13:40 UTC) #3
danakj
https://codereview.chromium.org/649203003/diff/20001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/20001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return static_cast<int>( Can you ToFlooredInt here instead of cast+std::floor? ...
6 years, 2 months ago (2014-10-18 18:40:06 UTC) #4
Peter Kasting
Thanks for the thorough review; PTAL. https://codereview.chromium.org/649203003/diff/20001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/20001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return static_cast<int>( On ...
6 years, 2 months ago (2014-10-20 23:38:56 UTC) #5
Peter Kasting
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); Note: This causes test failures ...
6 years, 2 months ago (2014-10-21 00:53:56 UTC) #6
Peter Kasting
Ping danakj
6 years, 2 months ago (2014-10-22 22:27:43 UTC) #7
danakj
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); On 2014/10/21 00:53:56, Peter Kasting ...
6 years, 2 months ago (2014-10-23 15:20:42 UTC) #9
danakj
https://codereview.chromium.org/649203003/diff/20001/ui/gfx/color_utils.cc File ui/gfx/color_utils.cc (right): https://codereview.chromium.org/649203003/diff/20001/ui/gfx/color_utils.cc#newcode202 ui/gfx/color_utils.cc:202: SkAlpha alpha = SkColorGetA(color); On 2014/10/20 23:38:56, Peter Kasting ...
6 years, 2 months ago (2014-10-23 15:35:44 UTC) #10
ajuma
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); On 2014/10/23 15:20:42, danakj wrote: ...
6 years, 2 months ago (2014-10-23 15:44:39 UTC) #11
Peter Kasting
I don't want to be obstinate here, but I'd like to discuss some of these ...
6 years, 2 months ago (2014-10-23 17:29:45 UTC) #12
ajuma
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); On 2014/10/23 17:29:45, Peter Kasting ...
6 years, 2 months ago (2014-10-23 17:37:11 UTC) #13
Peter Kasting
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); On 2014/10/23 17:37:11, ajuma wrote: ...
6 years, 2 months ago (2014-10-23 17:39:52 UTC) #14
ajuma
https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc File ui/gfx/animation/tween.cc (right): https://codereview.chromium.org/649203003/diff/60001/ui/gfx/animation/tween.cc#newcode153 ui/gfx/animation/tween.cc:153: return ToRoundedInt(DoubleValueBetween(value, start, target)); On 2014/10/23 17:39:52, Peter Kasting ...
6 years, 2 months ago (2014-10-23 17:42:15 UTC) #15
danakj
https://codereview.chromium.org/649203003/diff/20001/ui/gfx/color_utils.cc File ui/gfx/color_utils.cc (right): https://codereview.chromium.org/649203003/diff/20001/ui/gfx/color_utils.cc#newcode202 ui/gfx/color_utils.cc:202: SkAlpha alpha = SkColorGetA(color); On 2014/10/23 17:29:45, Peter Kasting ...
6 years, 2 months ago (2014-10-23 17:43:23 UTC) #16
Peter Kasting
New snap up: * Changed Tween::LinearIntValueBetween() back to round-toward-positive-infinity and added a comment about why. ...
6 years, 1 month ago (2014-11-03 20:28:56 UTC) #17
danakj
https://codereview.chromium.org/649203003/diff/100001/ui/gfx/geometry/rect.h File ui/gfx/geometry/rect.h (right): https://codereview.chromium.org/649203003/diff/100001/ui/gfx/geometry/rect.h#newcode22 ui/gfx/geometry/rect.h:22: #include "ui/gfx/geometry/safe_integer_conversions.h" unused? https://codereview.chromium.org/649203003/diff/100001/ui/gfx/geometry/rect.h#newcode231 ui/gfx/geometry/rect.h:231: DCHECK(base::IsValueInRangeForNumericType<int>(scaled_x)); nit: it might ...
6 years, 1 month ago (2014-11-03 20:35:26 UTC) #18
Peter Kasting
PTAL. https://codereview.chromium.org/649203003/diff/100001/ui/gfx/geometry/rect.h File ui/gfx/geometry/rect.h (right): https://codereview.chromium.org/649203003/diff/100001/ui/gfx/geometry/rect.h#newcode22 ui/gfx/geometry/rect.h:22: #include "ui/gfx/geometry/safe_integer_conversions.h" On 2014/11/03 20:35:26, danakj wrote: > ...
6 years, 1 month ago (2014-11-03 22:19:55 UTC) #19
danakj
Thanks! LGTM!
6 years, 1 month ago (2014-11-04 19:57:01 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/649203003/120001
6 years, 1 month ago (2014-11-04 20:24:49 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years, 1 month ago (2014-11-04 22:30:38 UTC) #23
commit-bot: I haz the power
6 years, 1 month ago (2014-11-04 22:31:35 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/eb00e7e0f5d04772d42a657b6fa7b7aef856be9f
Cr-Commit-Position: refs/heads/master@{#302687}

Powered by Google App Engine
This is Rietveld 408576698