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

Issue 2499783002: Move SaturatedArithmetic from Blink to base (Closed)

Created:
4 years, 1 month ago by enne (OOO)
Modified:
4 years, 1 month ago
Reviewers:
danakj, esprehn, Nico
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, blink-reviews-style_chromium.org, blink-reviews-wtf_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dcheng, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, Mikhail, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move SaturatedArithmetic from Blink to base This is a more efficient implementation than what gfx is doing in most cases. This CL moves it to base, updates coding style, and switches gfx to using it. TBR=thakis@chromium.org BUG=659381 Committed: https://crrev.com/42cb2e5d1ee0e5a9e1073307b93df913d2df913f Cr-Commit-Position: refs/heads/master@{#433474}

Patch Set 1 #

Total comments: 1

Patch Set 2 : With forwarding header #

Patch Set 3 : Readd files oops #

Total comments: 1

Patch Set 4 : With nacl ifdef #

Patch Set 5 : With inline assembly compiler flag #

Patch Set 6 : 32-bit only #

Patch Set 7 : Better 32-bit ifdefs #

Patch Set 8 : Allow inline assembly #

Patch Set 9 : Add flag dependencies #

Patch Set 10 : Now without nacl #

Patch Set 11 : Revert flag addition #

Unified diffs Side-by-side diffs Delta from patch set Stats (+331 lines, -511 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
A base/numerics/saturated_arithmetic.h View 1 2 3 4 5 6 7 8 9 1 chunk +101 lines, -0 lines 0 comments Download
A + base/numerics/saturated_arithmetic_arm.h View 1 2 5 chunks +23 lines, -21 lines 0 comments Download
A base/numerics/saturated_arithmetic_unittest.cc View 2 1 chunk +141 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/LayoutUnit.h View 1 7 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/geometry/IntPoint.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/wtf/BUILD.gn View 1 2 chunks +0 lines, -2 lines 0 comments Download
D third_party/WebKit/Source/wtf/SaturatedArithmetic.h View 1 1 chunk +11 lines, -83 lines 0 comments Download
D third_party/WebKit/Source/wtf/SaturatedArithmeticTest.cpp View 1 chunk +0 lines, -153 lines 0 comments Download
D third_party/WebKit/Source/wtf/asm/SaturatedArithmeticARM.h View 1 chunk +0 lines, -100 lines 0 comments Download
M tools/ubsan/blacklist.txt View 1 chunk +1 line, -1 line 0 comments Download
M tools/ubsan/security_blacklist.txt View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/geometry/point.h View 3 chunks +9 lines, -9 lines 0 comments Download
M ui/gfx/geometry/rect.h View 1 chunk +15 lines, -6 lines 0 comments Download
M ui/gfx/geometry/rect.cc View 3 chunks +7 lines, -4 lines 0 comments Download
M ui/gfx/geometry/safe_integer_conversions.h View 1 chunk +0 lines, -46 lines 0 comments Download
M ui/gfx/geometry/safe_integer_conversions_unittest.cc View 1 chunk +0 lines, -68 lines 0 comments Download
M ui/gfx/geometry/size.cc View 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/geometry/vector2d.cc View 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 50 (28 generated)
danakj
LGTM https://codereview.chromium.org/2499783002/diff/1/base/numerics/saturated_arithmetic.h File base/numerics/saturated_arithmetic.h (right): https://codereview.chromium.org/2499783002/diff/1/base/numerics/saturated_arithmetic.h#newcode67 base/numerics/saturated_arithmetic.h:67: template <int FractionalShift> nit: should be kFractionalShift? or ...
4 years, 1 month ago (2016-11-12 02:03:19 UTC) #6
enne (OOO)
+esprehn for blink wtf +thakis for tools/ubsan rename
4 years, 1 month ago (2016-11-14 21:06:35 UTC) #10
esprehn
lgtm, I think we might want to rename kIntMaxForLayoutUnit? https://codereview.chromium.org/2499783002/diff/40001/base/numerics/saturated_arithmetic.h File base/numerics/saturated_arithmetic.h (right): https://codereview.chromium.org/2499783002/diff/40001/base/numerics/saturated_arithmetic.h#newcode71 base/numerics/saturated_arithmetic.h:71: ...
4 years, 1 month ago (2016-11-14 22:26:06 UTC) #14
enne (OOO)
Amazingly, this code used to compile in Blink only because the CPU(ARM) path is never ...
4 years, 1 month ago (2016-11-15 22:09:52 UTC) #19
enne (OOO)
On 2016/11/15 at 22:09:52, enne wrote: > Amazingly, this code used to compile in Blink ...
4 years, 1 month ago (2016-11-15 22:11:19 UTC) #20
enne (OOO)
Oops, or maybe I need something more specific. Blink uses CPU(ARM) and maybe ARCH_CPU_ARM_FAMILY is ...
4 years, 1 month ago (2016-11-15 22:11:43 UTC) #21
danakj
On Tue, Nov 15, 2016 at 2:11 PM, enne@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > Oops, ...
4 years, 1 month ago (2016-11-15 22:22:27 UTC) #22
danakj
On Tue, Nov 15, 2016 at 2:11 PM, enne@chromium.org via codereview.chromium.org <reply@chromiumcodereview-hr.appspotmail.com> wrote: > Oops, ...
4 years, 1 month ago (2016-11-15 22:22:27 UTC) #23
esprehn
I doubt that was intentional, we should use the qadd version on all arm platforms.
4 years, 1 month ago (2016-11-15 22:26:29 UTC) #24
danakj
On Tue, Nov 15, 2016 at 2:26 PM, <esprehn@chromium.org> wrote: > I doubt that was ...
4 years, 1 month ago (2016-11-15 22:32:10 UTC) #25
danakj
On Tue, Nov 15, 2016 at 2:26 PM, <esprehn@chromium.org> wrote: > I doubt that was ...
4 years, 1 month ago (2016-11-15 22:32:11 UTC) #26
esprehn
On 2016/11/15 at 22:32:11, danakj wrote: > On Tue, Nov 15, 2016 at 2:26 PM, ...
4 years, 1 month ago (2016-11-15 22:55:31 UTC) #27
enne (OOO)
Ok, got this to compile finally. TBRing thakis for ubsan rename.
4 years, 1 month ago (2016-11-17 00:02:00 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2499783002/180001
4 years, 1 month ago (2016-11-17 00:04:45 UTC) #35
danakj
On Tue, Nov 15, 2016 at 2:55 PM, <esprehn@chromium.org> wrote: > On 2016/11/15 at 22:32:11, ...
4 years, 1 month ago (2016-11-17 00:05:26 UTC) #36
danakj
On Tue, Nov 15, 2016 at 2:55 PM, <esprehn@chromium.org> wrote: > On 2016/11/15 at 22:32:11, ...
4 years, 1 month ago (2016-11-17 00:05:27 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/123276)
4 years, 1 month ago (2016-11-17 01:35:26 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2499783002/200001
4 years, 1 month ago (2016-11-17 18:59:46 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/274871) linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 1 month ago (2016-11-17 21:18:59 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2499783002/200001
4 years, 1 month ago (2016-11-21 02:10:23 UTC) #46
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-11-21 04:31:28 UTC) #48
commit-bot: I haz the power
4 years, 1 month ago (2016-11-21 04:36:36 UTC) #50
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/42cb2e5d1ee0e5a9e1073307b93df913d2df913f
Cr-Commit-Position: refs/heads/master@{#433474}

Powered by Google App Engine
This is Rietveld 408576698