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

Issue 495873002: cc: Stop converting Rect to QuadF to map to an enclosed rect. (Closed)

Created:
6 years, 4 months ago by danakj
Modified:
6 years, 3 months ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews, piman, vmpstr, Ian Vollick
Project:
chromium
Visibility:
Public.

Description

cc: Stop converting Rect to QuadF to map to an enclosed rect. Occlusion tracker converts Rects to QuadF, then does MapClippedQuad, then BoundingBox(), then ToEnclosedRect(). Instead, add methods to MathUtil that mirror the {Map,Project}EnclosingClippedRect methods but for an enclosed rect instead, that work only when the transform preserves 2d axis alignment. In the common case, this avoids converting the integers to floats just to convert back to ints using the costly safe conversion methods. R=enne Committed: https://crrev.com/c8357ff51ba8458cc04848fa4ec4452d2660b160 Cr-Commit-Position: refs/heads/master@{#291785}

Patch Set 1 : enclosed-rect: . #

Total comments: 4

Patch Set 2 : enclosed: . #

Total comments: 1

Patch Set 3 : enclosed: . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -39 lines) Patch
M cc/base/math_util.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M cc/base/math_util.cc View 1 2 7 chunks +51 lines, -22 lines 0 comments Download
M cc/base/math_util_unittest.cc View 1 2 1 chunk +73 lines, -0 lines 0 comments Download
M cc/trees/occlusion_tracker.cc View 1 2 4 chunks +8 lines, -17 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
danakj
I could probably make the MathUtil code cleaner/less copying or otherwise somehow a nicer more ...
6 years, 4 months ago (2014-08-21 02:06:32 UTC) #1
enne (OOO)
https://codereview.chromium.org/495873002/diff/20001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/495873002/diff/20001/cc/base/math_util.cc#newcode266 cc/base/math_util.cc:266: return gfx::ToEnclosedRect(projected_quad.BoundingBox()); This code was here before, but is ...
6 years, 4 months ago (2014-08-21 17:54:05 UTC) #2
danakj
https://codereview.chromium.org/495873002/diff/20001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/495873002/diff/20001/cc/base/math_util.cc#newcode266 cc/base/math_util.cc:266: return gfx::ToEnclosedRect(projected_quad.BoundingBox()); On 2014/08/21 17:54:05, enne wrote: > This ...
6 years, 4 months ago (2014-08-21 17:58:08 UTC) #3
danakj
Patchset #2 (id:40001) has been deleted
6 years, 4 months ago (2014-08-25 19:13:36 UTC) #4
danakj
PTAL I did something simpler, with reduced math all around, and added tests.
6 years, 4 months ago (2014-08-25 19:13:59 UTC) #5
enne (OOO)
lgtm https://codereview.chromium.org/495873002/diff/60001/cc/base/math_util.cc File cc/base/math_util.cc (right): https://codereview.chromium.org/495873002/diff/60001/cc/base/math_util.cc#newcode190 cc/base/math_util.cc:190: gfx::Rect MathUtil::MapEnclosedNonClippedRect(const gfx::Transform& transform, Do you think this ...
6 years, 4 months ago (2014-08-25 19:58:56 UTC) #6
danakj
Used MapEnclosedRectWith2dAxisAlignedTransform as per chat-based decision.
6 years, 4 months ago (2014-08-25 20:30:46 UTC) #7
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 4 months ago (2014-08-25 20:30:49 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/495873002/80001
6 years, 4 months ago (2014-08-25 20:31:24 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel_swarming on tryserver.chromium.mac ...
6 years, 4 months ago (2014-08-25 21:34:09 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-25 22:37:03 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/6665)
6 years, 4 months ago (2014-08-25 22:37:04 UTC) #12
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 4 months ago (2014-08-25 22:45:21 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/495873002/80001
6 years, 4 months ago (2014-08-25 22:48:55 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (80001) as 52211584ea6cc6f573ebbc51d7b925ace1e6adb5
6 years, 4 months ago (2014-08-25 23:37:34 UTC) #15
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 02:38:28 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/c8357ff51ba8458cc04848fa4ec4452d2660b160
Cr-Commit-Position: refs/heads/master@{#291785}

Powered by Google App Engine
This is Rietveld 408576698