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

Issue 10915313: cc: Apply the layer's initial CSS scale to the contentsScale to render text at the right resolution. (Closed)

Created:
8 years, 3 months ago by danakj
Modified:
8 years, 2 months ago
Reviewers:
jamesr, piman, enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org, jonathan.backer, piman, aelias_OOO_until_Jul13, Xianzhu, shawnsingh, twiz, wjmaclean, alokp
Visibility:
Public.

Description

cc: Apply the layer's initial CSS scale to the contentsScale to render text at the right resolution. Currently the transform does not affect the scale of a layer's contents. This means that when a layer with a scale on it becomes composited, its text is rendered at 1x and then scaled up during rendering, which makes for very fuzzy text. This change applies the scale from the layer's CSS transform to the contentsScale so that text is rendered at the same pixel resolution as it will be drawn on screen. Tests: cc_unittests:CCLayerTreeHostCommonTest.verifyContentsScale cc_unittests:CCLayerTreeHostCommonTest.verifyContentsScaleForSurfaces BUG=149943 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=161472

Patch Set 1 #

Patch Set 2 : indent-fix #

Patch Set 3 : reference-consistency-in-mathutil #

Patch Set 4 : rebase #

Patch Set 5 : implement in CCLTHCommon #

Patch Set 6 : dont update during animation #

Patch Set 7 : remove extra header #

Total comments: 2

Patch Set 8 : initialLayerScale #

Patch Set 9 : initialLayerScale #

Patch Set 10 : initialCssScale #

Total comments: 2

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : #

Total comments: 1

Patch Set 14 : #

Patch Set 15 : rebase add math.h #

Patch Set 16 : rebase #

Patch Set 17 : #

Patch Set 18 : rebase #

Patch Set 19 : css scale = 1 when perspective #

Patch Set 20 : fix test build #

Patch Set 21 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+461 lines, -157 lines) Patch
M cc/damage_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M cc/layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +6 lines, -0 lines 0 comments Download
M cc/layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_iterator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +3 lines, -3 lines 0 comments Download
M cc/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +1 line, -28 lines 0 comments Download
M cc/layer_tree_host_common.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -2 lines 0 comments Download
M cc/layer_tree_host_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 11 chunks +81 lines, -21 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 38 chunks +291 lines, -53 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -4 lines 0 comments Download
M cc/math_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -0 lines 0 comments Download
M cc/math_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +15 lines, -0 lines 0 comments Download
M cc/occlusion_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 18 chunks +52 lines, -44 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
danakj
8 years, 3 months ago (2012-09-17 19:36:18 UTC) #1
danakj
Implemented the contentsScale setting into CCLTHCommon so that we can use the combinedTransform.
8 years, 3 months ago (2012-09-17 21:46:36 UTC) #2
piman
https://codereview.chromium.org/10915313/diff/11001/cc/CCMathUtil.cpp File cc/CCMathUtil.cpp (right): https://codereview.chromium.org/10915313/diff/11001/cc/CCMathUtil.cpp#newcode382 cc/CCMathUtil.cpp:382: return sqrtf(fabs(p1.x() - p2.x()) * fabs(p1.x() - p2.x()) + ...
8 years, 3 months ago (2012-09-17 23:53:37 UTC) #3
danakj
https://codereview.chromium.org/10915313/diff/11001/cc/CCMathUtil.cpp File cc/CCMathUtil.cpp (right): https://codereview.chromium.org/10915313/diff/11001/cc/CCMathUtil.cpp#newcode382 cc/CCMathUtil.cpp:382: return sqrtf(fabs(p1.x() - p2.x()) * fabs(p1.x() - p2.x()) + ...
8 years, 3 months ago (2012-09-17 23:55:05 UTC) #4
jamesr
I don't think we can afford to unconditionally raster at post-scale size - there's a ...
8 years, 3 months ago (2012-09-17 23:57:13 UTC) #5
danakj
Here's a patch that will not regress RAF based animations, but will take care of ...
8 years, 3 months ago (2012-09-22 15:44:49 UTC) #6
enne (OOO)
I like this approach a lot more. It solves the problem of compositing overlap making ...
8 years, 2 months ago (2012-10-02 19:13:18 UTC) #7
jamesr
I'm not sure I understand the interaction with pageScale here - how does that work? ...
8 years, 2 months ago (2012-10-02 19:22:05 UTC) #8
danakj
On 2012/10/02 19:22:05, jamesr wrote: > I'm not sure I understand the interaction with pageScale ...
8 years, 2 months ago (2012-10-02 19:28:04 UTC) #9
danakj
On 2012/10/02 19:13:18, enne wrote: > I like this approach a lot more. It solves ...
8 years, 2 months ago (2012-10-02 19:52:50 UTC) #10
jamesr
Approach seems fine.
8 years, 2 months ago (2012-10-03 01:04:53 UTC) #11
danakj
Ok this patch works with surfaces properly now! I tested with a layout test and ...
8 years, 2 months ago (2012-10-03 03:04:40 UTC) #12
danakj
Oh, I still need to yakshave the struct business.
8 years, 2 months ago (2012-10-03 03:05:39 UTC) #13
danakj
This should also fix the current problem of page scale not playing nice with render ...
8 years, 2 months ago (2012-10-03 14:12:44 UTC) #14
Jeff Timanus
On 2012/10/03 14:12:44, danakj wrote: > This should also fix the current problem of page ...
8 years, 2 months ago (2012-10-03 16:14:41 UTC) #15
danakj
added test CCLayerTreeHostCommonTest.verifyContentsScaleForSurfaces PTAL :)
8 years, 2 months ago (2012-10-03 17:46:29 UTC) #16
enne (OOO)
https://codereview.chromium.org/10915313/diff/34001/cc/CCLayerTreeHostCommon.cpp File cc/CCLayerTreeHostCommon.cpp (left): https://codereview.chromium.org/10915313/diff/34001/cc/CCLayerTreeHostCommon.cpp#oldcode536 cc/CCLayerTreeHostCommon.cpp:536: layerDrawTransform.scale(deviceScaleFactor); This block of code is highly intentional. The ...
8 years, 2 months ago (2012-10-03 19:52:38 UTC) #17
danakj
On 2012/10/03 19:52:38, enne wrote: > https://codereview.chromium.org/10915313/diff/34001/cc/CCLayerTreeHostCommon.cpp > File cc/CCLayerTreeHostCommon.cpp (left): > > https://codereview.chromium.org/10915313/diff/34001/cc/CCLayerTreeHostCommon.cpp#oldcode536 > ...
8 years, 2 months ago (2012-10-04 00:03:35 UTC) #18
enne (OOO)
LGTM. The changes to CCLayerTreeHostCommon look really great.
8 years, 2 months ago (2012-10-05 19:05:16 UTC) #19
danakj
ty :)
8 years, 2 months ago (2012-10-05 19:08:34 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/10915313/37001
8 years, 2 months ago (2012-10-05 19:09:18 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/10915313/43003
8 years, 2 months ago (2012-10-05 19:59:48 UTC) #22
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-05 20:44:12 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/10915313/55001
8 years, 2 months ago (2012-10-06 17:10:38 UTC) #24
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-06 17:34:30 UTC) #25
danakj
I'm glad I ran layout bots. There's some rebasing needed but this would have broken ...
8 years, 2 months ago (2012-10-06 19:02:55 UTC) #26
enne (OOO)
Changes lgtm.
8 years, 2 months ago (2012-10-11 22:28:14 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/10915313/70001
8 years, 2 months ago (2012-10-11 22:29:35 UTC) #28
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build. Your ...
8 years, 2 months ago (2012-10-11 22:54:55 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/10915313/80003
8 years, 2 months ago (2012-10-11 23:34:40 UTC) #30
commit-bot: I haz the power
8 years, 2 months ago (2012-10-12 01:41:19 UTC) #31
Change committed as 161472

Powered by Google App Engine
This is Rietveld 408576698