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

Issue 12407002: Align physical pixels of scrolled layers (Closed)

Created:
7 years, 9 months ago by Xianzhu
Modified:
7 years, 9 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Align physical pixels of scrolled layers Non-integral position of scrolled layers causes blurry content. If a layer has simple transform and the translations in the transform are merely caused by scroll offsets, round the translations to align the pixels. BUG=174699 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186377

Patch Set 1 #

Total comments: 11

Patch Set 2 : Align scrollable layer #

Total comments: 9

Patch Set 3 : Separate LCDText out #

Total comments: 2

Patch Set 4 : naming #

Patch Set 5 : Fix win break (MSVC doesn't have round()) #

Patch Set 6 : Fix win warnings #

Patch Set 7 : Fix win break again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -0 lines) Patch
M cc/layer_tree_host_common.cc View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 1 chunk +52 lines, -0 lines 0 comments Download
M cc/math_util.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
Xianzhu
7 years, 9 months ago (2013-03-05 03:10:44 UTC) #1
jamesr
Won't snapping make animations look less smooth? Should we only do this when quiescent?
7 years, 9 months ago (2013-03-05 03:12:56 UTC) #2
aelias_OOO_until_Jul13
The Android fling animator gives us individual scrolls in ints (physical pixels) to begin with, ...
7 years, 9 months ago (2013-03-05 03:16:48 UTC) #3
Xianzhu
I agree with jamesr, in case in the future Android will pass float scroll offsets. ...
7 years, 9 months ago (2013-03-05 03:30:39 UTC) #4
shawnsingh
https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: roundNearIntegerScales(&layerDrawProperties.target_space_transform); (1) It might be a problem that this ...
7 years, 9 months ago (2013-03-05 05:29:44 UTC) #5
Sami
https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc#newcode551 cc/layer_tree_host_common.cc:551: if (std::abs(scaleX - roundedScaleX) < kErrorThreshold) I'm wondering if ...
7 years, 9 months ago (2013-03-05 11:28:34 UTC) #6
Xianzhu
https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc#newcode551 cc/layer_tree_host_common.cc:551: if (std::abs(scaleX - roundedScaleX) < kErrorThreshold) On 2013/03/05 11:28:34, ...
7 years, 9 months ago (2013-03-05 17:26:08 UTC) #7
Xianzhu
PTAL https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/1/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: roundNearIntegerScales(&layerDrawProperties.target_space_transform); On 2013/03/05 17:26:08, Xianzhu wrote: > On ...
7 years, 9 months ago (2013-03-05 23:03:13 UTC) #8
enne (OOO)
I like that this latest patch only applies to scrollable layers. It might make sense ...
7 years, 9 months ago (2013-03-05 23:46:28 UTC) #9
Xianzhu
https://codereview.chromium.org/12407002/diff/8001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/8001/cc/layer_tree_host_common.cc#newcode543 cc/layer_tree_host_common.cc:543: // Small calculation errors may result almost-integer scales like ...
7 years, 9 months ago (2013-03-06 00:26:13 UTC) #10
enne (OOO)
Ah, I understand now. It seems like there's two changes of behavior here. There's "round ...
7 years, 9 months ago (2013-03-06 00:40:17 UTC) #11
Xianzhu
PTAL. Now the CL is very simple :)
7 years, 9 months ago (2013-03-06 01:47:23 UTC) #12
danakj
https://codereview.chromium.org/12407002/diff/16001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/16001/cc/layer_tree_host_common.cc#newcode543 cc/layer_tree_host_common.cc:543: static void roundTranslates(gfx::Transform* transform) nit: roundTranslationComponents()
7 years, 9 months ago (2013-03-06 01:49:28 UTC) #13
Xianzhu
https://codereview.chromium.org/12407002/diff/16001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12407002/diff/16001/cc/layer_tree_host_common.cc#newcode543 cc/layer_tree_host_common.cc:543: static void roundTranslates(gfx::Transform* transform) On 2013/03/06 01:49:28, danakj wrote: ...
7 years, 9 months ago (2013-03-06 02:11:00 UTC) #14
enne (OOO)
lgtm
7 years, 9 months ago (2013-03-06 02:25:40 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12407002/9004
7 years, 9 months ago (2013-03-06 02:29:16 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12407002/28001
7 years, 9 months ago (2013-03-06 03:11:27 UTC) #17
commit-bot: I haz the power
Failed to trigger a try job on win HTTP Error 400: Bad Request
7 years, 9 months ago (2013-03-06 03:23:14 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12407002/35002
7 years, 9 months ago (2013-03-06 03:23:19 UTC) #19
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 9 months ago (2013-03-06 04:07:51 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/12407002/46001
7 years, 9 months ago (2013-03-06 05:10:13 UTC) #21
commit-bot: I haz the power
7 years, 9 months ago (2013-03-06 09:01:24 UTC) #22
Message was sent while issue was closed.
Change committed as 186377

Powered by Google App Engine
This is Rietveld 408576698