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

Issue 2744423002: Handle large rects better. (Closed)

Created:
3 years, 9 months ago by Peter Mayo
Modified:
3 years, 8 months ago
Reviewers:
danakj, jaydasika
CC:
chromium-reviews, cc-bugs_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle large rects better. Handling rects that are essentially infinite in one or two directions is not symmetric because we use an assymetric representation for many. We have to be careful not to overflow our representation(s) around these to keep as much meaningful state as possible. BUG=None CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2744423002 Cr-Commit-Position: refs/heads/master@{#460848} Committed: https://chromium.googlesource.com/chromium/src/+/9711f036f202f53ae0bfa6bb6195c3e61ecae274

Patch Set 1 : Handle large rects better. #

Total comments: 3

Patch Set 2 : Followup fixes #

Total comments: 3

Patch Set 3 : rebase #

Patch Set 4 : Add ARM code branch #

Total comments: 1

Patch Set 5 : typo #

Patch Set 6 : typo #

Patch Set 7 : comments, pointers over refs, and tweaks #

Patch Set 8 : Rebased, Use HasHeight, Symmetric test #

Total comments: 2

Patch Set 9 : Self comments #

Patch Set 10 : TestPass and rebase #

Patch Set 11 : Fix borderline unit test particular result #

Total comments: 1

Patch Set 12 : Rebased on size patch #

Total comments: 23

Patch Set 13 : Typos. Rebased. #

Total comments: 11

Patch Set 14 : Review Feedback #

Total comments: 7

Patch Set 15 : Rebased #

Patch Set 16 : Nits #

Total comments: 2

Patch Set 17 : Add comment and change constant reference. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -138 lines) Patch
M base/numerics/saturated_arithmetic.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M base/numerics/saturated_arithmetic_arm.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +8 lines, -3 lines 0 comments Download
M ui/gfx/geometry/rect.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/geometry/rect.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +66 lines, -22 lines 0 comments Download
M ui/gfx/geometry/rect_conversions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +17 lines, -23 lines 0 comments Download
M ui/gfx/geometry/rect_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +110 lines, -70 lines 0 comments Download
M ui/gfx/skia_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -13 lines 0 comments Download
M ui/gfx/skrect_conversion_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -7 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 49 (27 generated)
Peter Mayo
add SKiRecttoRect https://codereview.chromium.org/2744423002/diff/20001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/20001/ui/gfx/geometry/rect.cc#newcode167 ui/gfx/geometry/rect.cc:167: if (rdx >= std::numeric_limits<int>::max() / 2) { ...
3 years, 9 months ago (2017-03-14 18:36:00 UTC) #3
danakj
Thanks, I'll wait for you to publish again after addressing the feedback we noted.
3 years, 9 months ago (2017-03-14 20:15:57 UTC) #5
Peter Mayo
Published again. https://codereview.chromium.org/2744423002/diff/20001/ui/gfx/geometry/rect_conversions.cc File ui/gfx/geometry/rect_conversions.cc (right): https://codereview.chromium.org/2744423002/diff/20001/ui/gfx/geometry/rect_conversions.cc#newcode93 ui/gfx/geometry/rect_conversions.cc:93: return Rect(min_x, min_y, max_x - min_x, max_y ...
3 years, 9 months ago (2017-03-17 00:30:48 UTC) #6
Peter Mayo
Rebased - PTAL
3 years, 9 months ago (2017-03-17 16:08:45 UTC) #7
Peter Mayo
https://codereview.chromium.org/2744423002/diff/80001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/80001/ui/gfx/geometry/rect.cc#newcode63 ui/gfx/geometry/rect.cc:63: // This is the per-axis heuristic for picking the ...
3 years, 9 months ago (2017-03-22 22:40:16 UTC) #16
Peter Mayo
Comments below are handled, and rebased on top of the size handling CL. https://codereview.chromium.org/2744423002/diff/160001/ui/gfx/geometry/rect_conversions.cc File ...
3 years, 9 months ago (2017-03-23 00:01:31 UTC) #17
Peter Mayo
On 2017/03/23 00:01:31, Peter Mayo wrote: > Comments below are handled, and rebased on top ...
3 years, 9 months ago (2017-03-24 00:45:45 UTC) #18
Peter Mayo
On 2017/03/24 00:45:45, Peter Mayo wrote: > On 2017/03/23 00:01:31, Peter Mayo wrote: > > ...
3 years, 9 months ago (2017-03-24 00:46:28 UTC) #19
danakj
On Thu, Mar 23, 2017 at 8:45 PM, <petermayo@chromium.org> wrote: > On 2017/03/23 00:01:31, Peter ...
3 years, 9 months ago (2017-03-24 19:53:02 UTC) #20
Peter Mayo
On 2017/03/24 19:53:02, danakj wrote: > ... > > I would suggest going thru git ...
3 years, 9 months ago (2017-03-24 20:44:29 UTC) #23
Peter Mayo
https://codereview.chromium.org/2744423002/diff/220001/cc/trees/layer_tree_host_common_unittest.cc File cc/trees/layer_tree_host_common_unittest.cc (right): https://codereview.chromium.org/2744423002/diff/220001/cc/trees/layer_tree_host_common_unittest.cc#newcode1129 cc/trees/layer_tree_host_common_unittest.cc:1129: // the clip, and is only empty so land ...
3 years, 8 months ago (2017-03-28 19:32:56 UTC) #32
jaydasika
cc/trees/layer_tree_host_common_unittest.cc lgtm https://codereview.chromium.org/2744423002/diff/240001/cc/trees/layer_tree_host_common_unittest.cc File cc/trees/layer_tree_host_common_unittest.cc (right): https://codereview.chromium.org/2744423002/diff/240001/cc/trees/layer_tree_host_common_unittest.cc#newcode1131 cc/trees/layer_tree_host_common_unittest.cc:1131: // way around, and the Projection of ...
3 years, 8 months ago (2017-03-28 20:11:49 UTC) #33
Peter Mayo
https://codereview.chromium.org/2744423002/diff/240001/cc/trees/layer_tree_host_common_unittest.cc File cc/trees/layer_tree_host_common_unittest.cc (right): https://codereview.chromium.org/2744423002/diff/240001/cc/trees/layer_tree_host_common_unittest.cc#newcode1129 cc/trees/layer_tree_host_common_unittest.cc:1129: // the clip, and is only empty so land ...
3 years, 8 months ago (2017-03-28 20:15:40 UTC) #34
danakj
Thanks the comments are very good, a few small details to polish but I like ...
3 years, 8 months ago (2017-03-28 20:40:35 UTC) #35
Peter Mayo
Addressed, rebased and ready to go? https://codereview.chromium.org/2744423002/diff/240001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/240001/ui/gfx/geometry/rect.cc#newcode174 ui/gfx/geometry/rect.cc:174: SetRect(0, 0, 0, ...
3 years, 8 months ago (2017-03-29 18:49:26 UTC) #36
danakj
Thanks for the test changes, they look nicer now! https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc#newcode72 ui/gfx/geometry/rect.cc:72: ...
3 years, 8 months ago (2017-03-29 19:00:48 UTC) #39
Peter Mayo
https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc#newcode72 ui/gfx/geometry/rect.cc:72: *span = base::SaturatedSubtraction(max, min); On 2017/03/28 20:40:35, danakj wrote: ...
3 years, 8 months ago (2017-03-29 20:42:48 UTC) #40
danakj
LGTM https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc File ui/gfx/geometry/rect.cc (right): https://codereview.chromium.org/2744423002/diff/260001/ui/gfx/geometry/rect.cc#newcode72 ui/gfx/geometry/rect.cc:72: *span = base::SaturatedSubtraction(max, min); On 2017/03/29 20:42:48, Peter ...
3 years, 8 months ago (2017-03-29 20:50:35 UTC) #41
Peter Mayo
Last patch will be up in a few moments, just recompiling & running unittests to ...
3 years, 8 months ago (2017-03-29 21:10:12 UTC) #42
Peter Mayo
https://codereview.chromium.org/2744423002/diff/280001/ui/gfx/geometry/rect_unittest.cc File ui/gfx/geometry/rect_unittest.cc (right): https://codereview.chromium.org/2744423002/diff/280001/ui/gfx/geometry/rect_unittest.cc#newcode513 ui/gfx/geometry/rect_unittest.cc:513: RectF source(min_int_f, min_int_f, max_int_f * 3.f, max_int * 3.f); ...
3 years, 8 months ago (2017-03-29 21:25:27 UTC) #43
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/2744423002/340001
3 years, 8 months ago (2017-03-30 17:17:50 UTC) #46
commit-bot: I haz the power
3 years, 8 months ago (2017-03-30 19:18:28 UTC) #49
Message was sent while issue was closed.
Committed patchset #17 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/9711f036f202f53ae0bfa6bb6195...

Powered by Google App Engine
This is Rietveld 408576698