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

Issue 12541006: Use LCD text if the transform IsAlmostIdentityAndIntegerTranslation (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

Use LCD text if the transform IsAlmostIdentityAndIntegerTranslation Some components in transforms has tiny errors which come from mixed float and double calculations of scales and transforms. This almost always prevents LCD text from being used because the transform almost always doesn't meet the condition IsIdentityAndIntegerTranslation(). Add gfx::Transform::IsAlmostIdentityAndIntegerTranslation() and check it for LCD text.

Patch Set 1 : #

Total comments: 8

Patch Set 2 : How about this? (not finished yet) #

Total comments: 2

Patch Set 3 : Transform::IsAlmostXXX methods #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -1 line) Patch
M cc/layer_tree_host_common.cc View 1 1 chunk +1 line, -1 line 2 comments Download
M cc/layer_tree_host_common_unittest.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download
M ui/gfx/transform.h View 1 2 1 chunk +8 lines, -0 lines 0 comments Download
M ui/gfx/transform.cc View 1 2 2 chunks +31 lines, -0 lines 2 comments Download

Messages

Total messages: 25 (0 generated)
Xianzhu
7 years, 9 months ago (2013-03-06 18:26:41 UTC) #1
Xianzhu
7 years, 9 months ago (2013-03-07 02:42:29 UTC) #2
enne (OOO)
I'd really like shawnsingh to chime in here about this rounding since he had expressed ...
7 years, 9 months ago (2013-03-07 19:05:17 UTC) #3
enne (OOO)
https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc#newcode748 cc/layer_tree_host_common.cc:748: roundAlmostIntegerScalesAndTranslationComponents(&layerDrawProperties.target_space_transform); Is it ok to round the draw transform ...
7 years, 9 months ago (2013-03-07 19:05:34 UTC) #4
Xianzhu
https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc#newcode748 cc/layer_tree_host_common.cc:748: roundAlmostIntegerScalesAndTranslationComponents(&layerDrawProperties.target_space_transform); On 2013/03/07 19:05:34, enne wrote: > Is it ...
7 years, 9 months ago (2013-03-07 19:38:17 UTC) #5
shawnsingh
I'm still uneasy about rounding in calcDrawProperties, but I also can't come up with any ...
7 years, 9 months ago (2013-03-07 20:13:36 UTC) #6
enne (OOO)
https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc#newcode796 cc/layer_tree_host_common.cc:796: roundAlmostIntegerScalesAndTranslationComponents(&layerDrawProperties.target_space_transform); On 2013/03/07 19:38:17, Xianzhu wrote: > On 2013/03/07 ...
7 years, 9 months ago (2013-03-07 20:19:36 UTC) #7
shawnsingh
combinedTransform is also the value that propagates further down the tree, so rounding it would ...
7 years, 9 months ago (2013-03-07 20:28:39 UTC) #8
Xianzhu
On 2013/03/07 20:19:36, enne wrote: > https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc > File cc/layer_tree_host_common.cc (right): > > https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc#newcode796 > ...
7 years, 9 months ago (2013-03-07 21:11:21 UTC) #9
Ian Vollick
https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/2001/cc/layer_tree_host_common.cc#newcode564 cc/layer_tree_host_common.cc:564: if (transform->IsScaleOrTranslation() && !transform->IsIdentityOrTranslation()) { Unless I'm reading this ...
7 years, 9 months ago (2013-03-07 21:18:36 UTC) #10
Xianzhu
Actually we can't round combinedTransform or surface draw transform because they are not normally "almost ...
7 years, 9 months ago (2013-03-07 21:26:30 UTC) #11
Xianzhu
How about Patch Set 2 (for your preview, not finished yet)?
7 years, 9 months ago (2013-03-07 21:37:18 UTC) #12
enne (OOO)
https://codereview.chromium.org/12541006/diff/16001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/16001/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: layerDrawProperties.target_space_transform.IsAlmostIdentityOrIntegerTranslation(); I think it's fine to do the check ...
7 years, 9 months ago (2013-03-07 21:52:15 UTC) #13
Xianzhu
https://codereview.chromium.org/12541006/diff/16001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/16001/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: layerDrawProperties.target_space_transform.IsAlmostIdentityOrIntegerTranslation(); On 2013/03/07 21:52:15, enne wrote: > I think ...
7 years, 9 months ago (2013-03-07 21:55:35 UTC) #14
Xianzhu
I also want to confirm, could errors < 0.00001 (might be even much smaller) really ...
7 years, 9 months ago (2013-03-07 22:09:29 UTC) #15
enne (OOO)
On 2013/03/07 22:09:29, Xianzhu wrote: > I also want to confirm, could errors < 0.00001 ...
7 years, 9 months ago (2013-03-07 22:14:28 UTC) #16
Xianzhu
On 2013/03/07 22:14:28, enne wrote: > On 2013/03/07 22:09:29, Xianzhu wrote: > > I also ...
7 years, 9 months ago (2013-03-07 22:39:23 UTC) #17
Xianzhu
Haven't find a testing environment directly supporting LCD text. Forced LCD rendering on chromium-linux but ...
7 years, 9 months ago (2013-03-08 02:22:42 UTC) #18
jamesr
On 2013/03/08 02:22:42, Xianzhu wrote: > Haven't find a testing environment directly supporting LCD text. ...
7 years, 9 months ago (2013-03-08 02:25:26 UTC) #19
Xianzhu
On 2013/03/08 02:25:26, jamesr wrote: > On 2013/03/08 02:22:42, Xianzhu wrote: > > Haven't find ...
7 years, 9 months ago (2013-03-08 17:19:47 UTC) #20
Xianzhu
7 years, 9 months ago (2013-03-08 17:20:31 UTC) #21
Xianzhu
Uploaded a new patch and changed the title. Now it doesn't round the transform but ...
7 years, 9 months ago (2013-03-08 17:32:03 UTC) #22
alokp
https://codereview.chromium.org/12541006/diff/29001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/29001/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: layerDrawProperties.target_space_transform.IsAlmostIdentityOrIntegerTranslation(); If you make a decision based on rounded ...
7 years, 9 months ago (2013-03-08 19:40:06 UTC) #23
Xianzhu
https://codereview.chromium.org/12541006/diff/29001/cc/layer_tree_host_common.cc File cc/layer_tree_host_common.cc (right): https://codereview.chromium.org/12541006/diff/29001/cc/layer_tree_host_common.cc#newcode734 cc/layer_tree_host_common.cc:734: layerDrawProperties.target_space_transform.IsAlmostIdentityOrIntegerTranslation(); On 2013/03/08 19:40:06, Alok Priyadarshi wrote: > If ...
7 years, 9 months ago (2013-03-08 23:36:55 UTC) #24
Xianzhu
7 years, 9 months ago (2013-03-11 15:59:08 UTC) #25
I'm closing this issue. Will pickup if users complain about the incorrect LCD
text settings and/or incorrect gamma correct caused by it.

Powered by Google App Engine
This is Rietveld 408576698