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

Issue 1015533016: Move allow_character_break property to RenderText. (Closed)

Created:
5 years, 9 months ago by Jun Mukai
Modified:
5 years, 9 months ago
Reviewers:
msw, sky
CC:
chromium-reviews, tfarina, derat+watch_chromium.org, ckocagil
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move allow_character_break property to RenderText. gfx::ElideRectangleText creates lots of RenderText object which causes the performance regression. This CL avoids invoking the method by moving allow_character_break property to RenderText. BUG=470506 R=msw@chromium.org, sky@chromium.org TEST=the new test case covers Committed: https://crrev.com/a19339399b745657a9d9e7f288cfc797f90403f5 Cr-Commit-Position: refs/heads/master@{#322681}

Patch Set 1 #

Total comments: 10

Patch Set 2 : WordWrapBehavior #

Patch Set 3 : fix default word wrap behavior #

Patch Set 4 : remove todo #

Patch Set 5 : rebase #

Patch Set 6 : test fix #

Total comments: 22

Patch Set 7 : comments addressed #

Total comments: 2

Patch Set 8 : fix #

Total comments: 2

Patch Set 9 : comments addressed #

Patch Set 10 : line width for truncated words #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -52 lines) Patch
M ui/gfx/render_text.h View 1 2 3 4 5 6 3 chunks +10 lines, -2 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -0 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 5 6 7 8 9 9 chunks +41 lines, -13 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +42 lines, -0 lines 0 comments Download
M ui/gfx/text_constants.h View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/text_elider.h View 1 1 chunk +0 lines, -20 lines 0 comments Download
M ui/views/controls/label.h View 1 2 chunks +1 line, -1 line 0 comments Download
M ui/views/controls/label.cc View 1 2 3 4 5 6 7 chunks +15 lines, -16 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
Jun Mukai
5 years, 9 months ago (2015-03-25 17:54:14 UTC) #1
msw
I'm not entirely sure, but I think this is wrong. https://codereview.chromium.org/1015533016/diff/1/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/1015533016/diff/1/ui/gfx/render_text.cc#newcode539 ...
5 years, 9 months ago (2015-03-25 20:54:15 UTC) #2
Jun Mukai
https://codereview.chromium.org/1015533016/diff/1/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/1015533016/diff/1/ui/gfx/render_text.cc#newcode539 ui/gfx/render_text.cc:539: cached_bounds_and_offset_valid_ = false; On 2015/03/25 20:54:15, msw wrote: > ...
5 years, 9 months ago (2015-03-26 01:35:08 UTC) #3
msw
https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text.h#newcode770 ui/gfx/render_text.h:770: // |multiline_| is set. nit: mention the default behavior ...
5 years, 9 months ago (2015-03-26 19:36:30 UTC) #4
Jun Mukai
https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text.h#newcode770 ui/gfx/render_text.h:770: // |multiline_| is set. On 2015/03/26 19:36:29, msw wrote: ...
5 years, 9 months ago (2015-03-26 22:47:39 UTC) #5
msw
I think you can simplify the end_char code, please take another look, ping me if ...
5 years, 9 months ago (2015-03-26 23:05:55 UTC) #6
Jun Mukai
https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1015533016/diff/100001/ui/gfx/render_text_harfbuzz.cc#newcode364 ui/gfx/render_text_harfbuzz.cc:364: *end_char = i; On 2015/03/26 23:05:54, msw wrote: > ...
5 years, 9 months ago (2015-03-27 00:31:58 UTC) #7
msw
lgtm with an optional nit, nice work. https://codereview.chromium.org/1015533016/diff/140001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1015533016/diff/140001/ui/gfx/render_text_harfbuzz.cc#newcode379 ui/gfx/render_text_harfbuzz.cc:379: *end_char = ...
5 years, 9 months ago (2015-03-27 01:45:27 UTC) #8
Jun Mukai
https://codereview.chromium.org/1015533016/diff/140001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/1015533016/diff/140001/ui/gfx/render_text_harfbuzz.cc#newcode379 ui/gfx/render_text_harfbuzz.cc:379: *end_char = *next_char; On 2015/03/27 01:45:27, msw wrote: > ...
5 years, 9 months ago (2015-03-27 16:36:12 UTC) #9
Jun Mukai
sky, please review ui/views
5 years, 9 months ago (2015-03-27 16:36:40 UTC) #11
sky
LGTM
5 years, 9 months ago (2015-03-27 20:35:30 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015533016/160001
5 years, 9 months ago (2015-03-27 20:45:06 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/48271)
5 years, 9 months ago (2015-03-27 22:20:47 UTC) #17
Jun Mukai
the test failed because the width for truncated lines is longer, it reports untruncated width. ...
5 years, 9 months ago (2015-03-27 22:55:21 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015533016/180001
5 years, 9 months ago (2015-03-27 22:56:03 UTC) #21
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 9 months ago (2015-03-28 00:07:18 UTC) #22
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/a19339399b745657a9d9e7f288cfc797f90403f5 Cr-Commit-Position: refs/heads/master@{#322681}
5 years, 9 months ago (2015-03-28 00:08:08 UTC) #23
sullivan
5 years, 6 months ago (2015-06-24 21:24:42 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #10 id:180001) has been created in
https://codereview.chromium.org/1205153002/ by sullivan@chromium.org.

The reason for reverting is: Regresses memory on Linux by 6MB.

BUG=471608.

Powered by Google App Engine
This is Rietveld 408576698