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

Issue 1945283003: Fix the DCHECK failure in render_text_harfbuzz.cc. (Closed)

Created:
4 years, 7 months ago by xdai1
Modified:
4 years, 7 months ago
Reviewers:
msw
CC:
chromium-reviews, derat+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix the DCHECK failure in render_text_harfbuzz.cc. It's reported that DCHECK failed in AddLineSegment(). The reason might be that it's not accurate to use std::numeric_limits<float>::epsilon() as the absolute error margin to compare two floats since last_segment.x_range.end() and segment.x_range.start() might be very large and epsilon() could end up being smaller than the rounding error of std::abs(last_segment.x_range.end() - segment.x_range.start()). Or there's likely floating math rounding errors somewhere that caused this DCHECK error. We change the DCHECK to check the difference between one run and the next is less than 1.0 (i.e., less than one pixel). BUG=609004 Committed: https://crrev.com/e5a5bbfd2365c4c9f1f6cf97a56f0cd15b1c3132 Cr-Commit-Position: refs/heads/master@{#391724}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address msw@'s comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M ui/gfx/render_text_harfbuzz.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 16 (9 generated)
xdai1
msw@, could you help review this CL please? Thanks!
4 years, 7 months ago (2016-05-04 21:58:27 UTC) #5
msw
https://codereview.chromium.org/1945283003/diff/1/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1945283003/diff/1/ui/gfx/render_text_harfbuzz.cc#oldcode409 ui/gfx/render_text_harfbuzz.cc:409: std::numeric_limits<float>::epsilon()); It seems like there's likely floating math rounding ...
4 years, 7 months ago (2016-05-04 22:03:59 UTC) #6
xdai1
Addressed! Please take another look, thanks for your review. https://codereview.chromium.org/1945283003/diff/1/ui/gfx/render_text_harfbuzz.cc File ui/gfx/render_text_harfbuzz.cc (left): https://codereview.chromium.org/1945283003/diff/1/ui/gfx/render_text_harfbuzz.cc#oldcode409 ui/gfx/render_text_harfbuzz.cc:409: ...
4 years, 7 months ago (2016-05-04 22:49:46 UTC) #9
msw
lgtm
4 years, 7 months ago (2016-05-04 22:50:51 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1945283003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1945283003/20001
4 years, 7 months ago (2016-05-04 23:10:50 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-05 01:37:30 UTC) #14
commit-bot: I haz the power
4 years, 7 months ago (2016-05-05 01:38:44 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e5a5bbfd2365c4c9f1f6cf97a56f0cd15b1c3132
Cr-Commit-Position: refs/heads/master@{#391724}

Powered by Google App Engine
This is Rietveld 408576698