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

Issue 11312226: cc: Layer that have empty bounds should still have their contentsScale applied in their transforms. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, piman, backer, shawnsingh, Xianzhu, wjmaclean
Visibility:
Public.

Description

cc: Layer that have empty bounds should still have their contentsScale applied in their transforms. The change to add contentsScaleX() and contentsScaleY() allows layers to move between their layer and content space even when they have empty bounds. Now new code is moving between these spaces by multiplying these scale factors, regardless of the layer's bounds, and this seems like the correct thing to do. However, LayerTreeHostCommon is still only applying contentsScaleX|Y() only when the bounds are not empty. This is inconsistent with other code, and ends up causing confusion elsewhere, such as in the scrolling and hit testing code. We remove the if() conditions on the bounds in LTHCommon, so that the transforms on any layer match the contentsScales on that layer. Tests: cc_unittests:LayerTreeHostCommonTest.verifyLayerTransformsInHighDPI cc_unittests:LayerTreeHostCommonTest.verifyContentsScale BUG=160834 R=enne Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167764

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -21 lines) Patch
M cc/layer_tree_host_common.cc View 3 chunks +5 lines, -11 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 7 chunks +31 lines, -10 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
danakj
8 years, 1 month ago (2012-11-14 01:40:49 UTC) #1
danakj
8 years, 1 month ago (2012-11-14 01:40:49 UTC) #2
enne (OOO)
I like this a lot. lgtm
8 years, 1 month ago (2012-11-14 17:23:55 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/11312226/1
8 years, 1 month ago (2012-11-14 18:06:01 UTC) #4
commit-bot: I haz the power
8 years, 1 month ago (2012-11-14 23:34:46 UTC) #5
Change committed as 167764

Powered by Google App Engine
This is Rietveld 408576698