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

Issue 11418040: gfx::Transform API clean-up (Closed)

Created:
8 years, 1 month ago by Ian Vollick
Modified:
8 years ago
Reviewers:
danakj, sky, shawnsingh
CC:
chromium-reviews, sadrul, ben+watch_chromium.org, tfarina, jonathan.backer, Aaron Boodman, piman+watch_chromium.org, chromium-apps-reviews_chromium.org, cc-bugs_chromium.org
Visibility:
Public.

Description

gfx::Transform API clean-up We have too many ways to do the same thing in gfx::Transform, and their names can lead to confusion. We have the notion of Concat-ing and Preconcat-ing. We've borrowed this verbage from skia. a.preConcat(b) means a = a * b. This may seem counter-intuitive, but is the correct definition if we are multiplying our points/vectors on the right. That said, we almost always want to pre-concat. This what is done throughout WebKit. To simplify matters, rather than having ConcatFoo and PreconcatFoo, we will now only have Foo which does what PreconcatFoo used to. Furthermore, we also have SetFoo which is almost always used immediately after a transform is created, so Foo would do fine (with the optimization mentioned below). Another bit of redundant code eliminated by this CL is InterpolatedTransform::FactorTRS. This function was brittle and naive, and now that gfx::Transform::Blend exists, it needs to go away. Other minor changes rolled into this cleanup: - RotateAbout now takes the newly minted Vector3dF - The Foo functions mentioned above also check for identity to avoid needless matrix multiplications. BUG=159972 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=169476

Patch Set 1 #

Total comments: 11

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+593 lines, -822 lines) Patch
M ash/launcher/overflow_button.cc View 2 chunks +13 lines, -9 lines 0 comments Download
M ash/magnifier/magnification_controller.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ash/system/tray/system_tray_bubble.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ash/system/tray/tray_item_view.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M ash/wm/gestures/long_press_affordance_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M ash/wm/session_state_animator.cc View 2 chunks +9 lines, -6 lines 0 comments Download
M ash/wm/window_animations.cc View 6 chunks +23 lines, -27 lines 0 comments Download
M ash/wm/window_animations_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M ash/wm/window_manager_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ash/wm/workspace/workspace_animations.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M cc/math_util.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M cc/math_util.cc View 1 2 3 2 chunks +2 lines, -12 lines 0 comments Download
M cc/math_util_unittest.cc View 1 2 3 19 chunks +65 lines, -43 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 3 4 2 chunks +6 lines, -4 lines 0 comments Download
M ui/aura/window_unittest.cc View 6 chunks +21 lines, -21 lines 0 comments Download
M ui/base/animation/tween.cc View 2 chunks +4 lines, -31 lines 0 comments Download
M ui/base/events/event.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M ui/compositor/debug_utils.cc View 1 2 3 2 chunks +20 lines, -26 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 2 chunks +7 lines, -3 lines 0 comments Download
M ui/compositor/layer_animation_element_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/compositor/layer_animation_sequence_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/compositor/layer_unittest.cc View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/interpolated_transform.h View 1 6 chunks +15 lines, -18 lines 0 comments Download
M ui/gfx/interpolated_transform.cc View 1 10 chunks +27 lines, -105 lines 0 comments Download
M ui/gfx/interpolated_transform_unittest.cc View 5 chunks +3 lines, -29 lines 0 comments Download
M ui/gfx/transform.h View 1 2 3 3 chunks +18 lines, -67 lines 0 comments Download
M ui/gfx/transform.cc View 1 2 3 2 chunks +107 lines, -193 lines 0 comments Download
M ui/gfx/transform_unittest.cc View 1 2 44 chunks +127 lines, -101 lines 0 comments Download
M ui/gfx/transform_util.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M ui/views/controls/slide_out_view.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M ui/views/corewm/image_grid.cc View 8 chunks +21 lines, -18 lines 0 comments Download
M ui/views/view.cc View 1 2 3 4 chunks +33 lines, -37 lines 0 comments Download
M ui/views/view_unittest.cc View 1 2 3 13 chunks +27 lines, -23 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Ian Vollick
shawnsingh@ how do you feel about the API changes? sky@ for ash and views danakj@ ...
8 years, 1 month ago (2012-11-16 19:26:31 UTC) #1
danakj
https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc File ui/gfx/interpolated_transform.cc (right): https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc#newcode156 ui/gfx/interpolated_transform.cc:156: result.Rotate(interpolated_degrees); I didn't like this change with Set at ...
8 years, 1 month ago (2012-11-16 19:46:12 UTC) #2
shawnsingh
https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc File ui/gfx/interpolated_transform.cc (right): https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc#newcode355 ui/gfx/interpolated_transform.cc:355: InterpolatedMatrixTransform::InterpolateButDoNotCompose(float t) const { On 2012/11/16 19:46:12, danakj wrote: ...
8 years, 1 month ago (2012-11-16 20:51:25 UTC) #3
shawnsingh
Can we please wait on this patch so that the unit tests in http://codereview.chromium.org/11316043/ land ...
8 years, 1 month ago (2012-11-16 20:53:58 UTC) #4
Ian Vollick
https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc File ui/gfx/interpolated_transform.cc (right): https://codereview.chromium.org/11418040/diff/1/ui/gfx/interpolated_transform.cc#newcode167 ui/gfx/interpolated_transform.cc:167: gfx::Vector3dF axis, On 2012/11/16 19:46:12, danakj wrote: > const& ...
8 years, 1 month ago (2012-11-16 21:51:23 UTC) #5
shawnsingh
Thanks for letting the other patch land... I think this is a decent time to ...
8 years, 1 month ago (2012-11-20 18:53:05 UTC) #6
shawnsingh
FYI, I think we need to port the math_util unit tests to transform as part ...
8 years, 1 month ago (2012-11-20 18:57:01 UTC) #7
danakj
On 2012/11/20 18:57:01, shawnsingh wrote: > FYI, I think we need to port the math_util ...
8 years, 1 month ago (2012-11-20 19:00:11 UTC) #8
shawnsingh
Upon closer inspection, the only minor impact of what I'm suggesting: We should port the ...
8 years, 1 month ago (2012-11-20 19:11:41 UTC) #9
danakj
I see, I agree porting those unit tests would make sense, as the functions have ...
8 years, 1 month ago (2012-11-20 19:15:55 UTC) #10
Ian Vollick
On 2012/11/20 19:15:55, danakj wrote: > I see, I agree porting those unit tests would ...
8 years, 1 month ago (2012-11-20 21:53:22 UTC) #11
Ian Vollick
On 2012/11/20 21:53:22, vollick wrote: > On 2012/11/20 19:15:55, danakj wrote: > > I see, ...
8 years, 1 month ago (2012-11-23 17:16:17 UTC) #12
danakj
cc/ LGTM too
8 years, 1 month ago (2012-11-23 18:06:24 UTC) #13
sky
LGTM
8 years ago (2012-11-26 14:42:11 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vollick@chromium.org/11418040/10005
8 years ago (2012-11-26 18:15:42 UTC) #15
commit-bot: I haz the power
8 years ago (2012-11-26 20:13:11 UTC) #16
Message was sent while issue was closed.
Change committed as 169476

Powered by Google App Engine
This is Rietveld 408576698