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

Issue 916203002: Reduce the number of text reshaping in RenderText (Closed)

Created:
5 years, 10 months ago by oshima
Modified:
5 years, 10 months ago
Reviewers:
msw, Jun Mukai, ckocagil
CC:
chromium-reviews, Alexei Svitkine (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce the number of text reshaping in RenderText Short Design Doc: http://goo.gl/w6Q9k8 1) Compute ElidedText on demand 2) Separate elided text and non elided text. Create elided text and runs only when necessary. 3) Use known width in RenderText::Elide 4) Don't reshape to get GetGraphemeIterator. This CL also adds a few trace event so that we can identify the UI jank caused by text rendering performance. BUG=451459 R=msw@chromium.org Committed: https://crrev.com/0a243a4040f27b7be0f4c5bb92da4e2893f03b1c Cr-Commit-Position: refs/heads/master@{#316375}

Patch Set 1 : #

Patch Set 2 : #

Total comments: 29

Patch Set 3 : #

Patch Set 4 : #

Total comments: 140

Patch Set 5 : #

Total comments: 10

Patch Set 6 : #

Total comments: 7

Patch Set 7 : #

Total comments: 2

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+698 lines, -389 lines) Patch
M chrome/browser/ui/views/omnibox/omnibox_result_view.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/canvas_skia.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/render_text.h View 1 2 3 4 5 6 7 14 chunks +59 lines, -34 lines 0 comments Download
M ui/gfx/render_text.cc View 1 2 3 4 5 25 chunks +113 lines, -81 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.h View 1 2 3 4 5 6 7 chunks +109 lines, -33 lines 0 comments Download
M ui/gfx/render_text_harfbuzz.cc View 1 2 3 4 5 6 24 chunks +275 lines, -142 lines 0 comments Download
M ui/gfx/render_text_mac.h View 1 2 3 4 2 chunks +8 lines, -6 lines 0 comments Download
M ui/gfx/render_text_mac.cc View 1 2 3 4 5 7 chunks +26 lines, -8 lines 0 comments Download
M ui/gfx/render_text_unittest.cc View 1 2 3 4 5 19 chunks +104 lines, -81 lines 0 comments Download
M ui/gfx/text_elider.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/textfield/textfield.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 41 (22 generated)
oshima
https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (right): https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text_harfbuzz.cc#newcode1417 ui/gfx/render_text_harfbuzz.cc:1417: "431326 RenderTextHarfBuzz::EnsureLayout1")); This is not a typo. I usede ...
5 years, 10 months ago (2015-02-12 00:18:54 UTC) #10
Jun Mukai
+ckocagil https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc#newcode1270 ui/gfx/render_text.cc:1270: TRACE_EVENT0("ui", "RenderText::Elide"); Is this intentionally added? https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.h File ...
5 years, 10 months ago (2015-02-12 21:56:46 UTC) #12
oshima
https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc#newcode1270 ui/gfx/render_text.cc:1270: TRACE_EVENT0("ui", "RenderText::Elide"); On 2015/02/12 21:56:46, Jun Mukai wrote: > ...
5 years, 10 months ago (2015-02-12 22:09:17 UTC) #13
msw
Initial comments just for render_text.[h|cc] https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc#newcode1263 ui/gfx/render_text.cc:1263: float visual_width, nit: match ...
5 years, 10 months ago (2015-02-12 22:45:06 UTC) #14
oshima
https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/160001/ui/gfx/render_text.cc#newcode1263 ui/gfx/render_text.cc:1263: float visual_width, On 2015/02/12 22:45:06, msw wrote: > nit: ...
5 years, 10 months ago (2015-02-13 00:29:43 UTC) #17
msw
Despite the comment deluge, this CL looks pretty good. You can defer some renaming if ...
5 years, 10 months ago (2015-02-13 05:53:37 UTC) #18
oshima
PTAL. I'll split functions in a separate CL as this is already big. https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc File ...
5 years, 10 months ago (2015-02-13 21:03:12 UTC) #21
msw
Replying to existing comments... I'll look at the latest patch set now. https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc File ui/gfx/render_text.cc ...
5 years, 10 months ago (2015-02-13 21:49:23 UTC) #22
msw
https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc#newcode1253 ui/gfx/render_text.cc:1253: // Replace the newline character with a newline symbol ...
5 years, 10 months ago (2015-02-13 22:19:05 UTC) #23
oshima
https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc File ui/gfx/render_text.cc (right): https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.cc#newcode1253 ui/gfx/render_text.cc:1253: // Replace the newline character with a newline symbol ...
5 years, 10 months ago (2015-02-13 23:24:12 UTC) #25
msw
lgtm with minor remaining comments. https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): https://codereview.chromium.org/916203002/diff/230001/ui/gfx/render_text.h#newcode715 ui/gfx/render_text.h:715: base::string16 display_text_; On 2015/02/13 ...
5 years, 10 months ago (2015-02-14 00:11:26 UTC) #26
oshima
https://codereview.chromium.org/916203002/diff/330001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): https://codereview.chromium.org/916203002/diff/330001/ui/gfx/render_text.h#newcode450 ui/gfx/render_text.h:450: const base::string16& layout_text() const { return layout_text_; } On ...
5 years, 10 months ago (2015-02-14 00:40:51 UTC) #30
msw
still lgtm with one nit https://codereview.chromium.org/916203002/diff/330001/ui/gfx/render_text_harfbuzz.h File ui/gfx/render_text_harfbuzz.h (right): https://codereview.chromium.org/916203002/diff/330001/ui/gfx/render_text_harfbuzz.h#newcode113 ui/gfx/render_text_harfbuzz.h:113: // This is not ...
5 years, 10 months ago (2015-02-14 02:02:15 UTC) #31
oshima
thanks a lot for thorough review for such big CL! https://codereview.chromium.org/916203002/diff/380001/ui/gfx/render_text.h File ui/gfx/render_text.h (right): https://codereview.chromium.org/916203002/diff/380001/ui/gfx/render_text.h#newcode450 ...
5 years, 10 months ago (2015-02-14 02:04:20 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/916203002/400001
5 years, 10 months ago (2015-02-14 02:05:20 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/25279)
5 years, 10 months ago (2015-02-14 03:09:20 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/916203002/400001
5 years, 10 months ago (2015-02-14 04:17:19 UTC) #39
commit-bot: I haz the power
Committed patchset #8 (id:400001)
5 years, 10 months ago (2015-02-14 04:46:39 UTC) #40
commit-bot: I haz the power
5 years, 10 months ago (2015-02-14 04:47:25 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/0a243a4040f27b7be0f4c5bb92da4e2893f03b1c
Cr-Commit-Position: refs/heads/master@{#316375}

Powered by Google App Engine
This is Rietveld 408576698