Force glyph overflow calculation
Currently we ignore horizontal glyph overflow in most cases, causing
overhang part of glyphs not included into overflow rect of line boxes.
This causes incorrect visual overflow of layout objects, and incorrect
cull rect.
Now always calculate glyph overflow.
BUG=496317
TEST=fast/text/glyph-overflow.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196730
This CL works on Linux for the 'f' issue (https://code.google.com/p/chromium/issues/detail?id=496317#c5), but degrades performance of line ...
4 years, 11 months ago
(2015-06-06 00:50:17 UTC)
#2
This CL works on Linux for the 'f' issue
(https://code.google.com/p/chromium/issues/detail?id=496317#c5), but degrades
performance of line box layout because it skips the optimized text measurement
issue.
Performance measurement showed that the non-optimized path is 10~30x slower than
the optimized path.
Trying to cache GlyphOverflow along with WordMeasurements.
Xianzhu
Patchset #3 (id:40001) has been deleted
4 years, 11 months ago
(2015-06-06 05:23:50 UTC)
#3
Patchset #3 (id:40001) has been deleted
Xianzhu
Patchset #2 (id:20001) has been deleted
4 years, 11 months ago
(2015-06-06 05:23:54 UTC)
#4
I think this is fine. I'm working on reducing the cost of the overflow calculation ...
4 years, 11 months ago
(2015-06-06 05:42:47 UTC)
#6
I think this is fine. I'm working on reducing the cost of the overflow
calculation and to do much better caching between subsequent calls which should
mitigate the potential performance impact of this.
Xianzhu
On 2015/06/06 05:42:47, eae wrote: > I think this is fine. I'm working on reducing ...
4 years, 10 months ago
(2015-06-08 18:00:35 UTC)
#7
On 2015/06/06 05:42:47, eae wrote:
> I think this is fine. I'm working on reducing the cost of the overflow
> calculation and to do much better caching between subsequent calls which
should
> mitigate the potential performance impact of this.
Great!
Patch Set 7 is now ready for review. Ptal.
Please see the try bot results of Patch Set 6 for layout test expectation
changes.
LGTM w/nit. Feel free to commit once addressed. https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/Font.cpp File Source/platform/fonts/Font.cpp (right): https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/Font.cpp#newcode222 Source/platform/fonts/Font.cpp:222: glyphOverflow->right ...
4 years, 10 months ago
(2015-06-08 18:58:55 UTC)
#10
LGTM w/nit. Feel free to commit once addressed.
https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/...
File Source/platform/fonts/Font.cpp (right):
https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/...
Source/platform/fonts/Font.cpp:222: glyphOverflow->right =
ceilf(glyphBounds.right());
On 2015/06/08 18:07:21, Xianzhu wrote:
> This change (along with the changes in floatWidthForCompexText and
> floatWidthForSimpleText) is to avoid wrong 1px overflow because of the error
> from calculation from ceiled bounds and rounded ascent/descent.
Could you add a comment to that effect, explaining how the bounds are rounded?
Xianzhu
The CQ bit was checked by wangxianzhu@chromium.org
4 years, 10 months ago
(2015-06-08 23:55:42 UTC)
#11
4 years, 10 months ago
(2015-06-08 23:55:52 UTC)
#13
https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/...
File Source/platform/fonts/Font.cpp (right):
https://codereview.chromium.org/1153173011/diff/160001/Source/platform/fonts/...
Source/platform/fonts/Font.cpp:222: glyphOverflow->right =
ceilf(glyphBounds.right());
On 2015/06/08 18:58:55, eae wrote:
> On 2015/06/08 18:07:21, Xianzhu wrote:
> > This change (along with the changes in floatWidthForCompexText and
> > floatWidthForSimpleText) is to avoid wrong 1px overflow because of the error
> > from calculation from ceiled bounds and rounded ascent/descent.
>
> Could you add a comment to that effect, explaining how the bounds are rounded?
Done. (added in Font.h in GlyphOverflow).
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1153173011/200001
4 years, 10 months ago
(2015-06-08 23:56:05 UTC)
#14
Issue 1153173011: Force glyph overflow calculation
(Closed)
Created 4 years, 11 months ago by Xianzhu
Modified 4 years, 10 months ago
Reviewers: chrishtr, eae
Base URL: svn://svn.chromium.org/blink/trunk
Comments: 4