mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix logspam and incorrect cluster offset
An incorrect cluster offset calculation was causing a lot of log messages to appear. Separately, a confusion between #if and #ifdef was causing unintended logging of line breaks. This patch fixes both. Bug: 22178333 Change-Id: I2b3673ed66c784f5082fd127a8dc10bd3df6ed79
This commit is contained in:
parent
5704594913
commit
8726aff8cf
@ -757,7 +757,7 @@ void Layout::doLayoutRun(const uint16_t* buf, size_t start, size_t count, size_t
|
||||
if (ctx->paint.hyphenEdit.hasHyphen() && srunend > srunstart) {
|
||||
// TODO: check whether this is really the desired semantics. It could have the
|
||||
// effect of assigning the hyphen width to a nonspacing mark
|
||||
unsigned int lastCluster = srunend - 1;
|
||||
unsigned int lastCluster = start + srunend - 1;
|
||||
|
||||
hb_codepoint_t hyphenChar = 0x2010; // HYPHEN
|
||||
hb_codepoint_t glyph;
|
||||
|
||||
@ -383,7 +383,7 @@ void LineBreaker::computeBreaksOptimal(bool isRectangle) {
|
||||
mCandidates[i].score = best + mCandidates[i].penalty + mLinePenalty;
|
||||
mCandidates[i].prev = bestPrev;
|
||||
mCandidates[i].lineNumber = mCandidates[bestPrev].lineNumber + 1;
|
||||
#ifdef VERBOSE_DEBUG
|
||||
#if VERBOSE_DEBUG
|
||||
ALOGD("break %d: score=%g, prev=%d", i, mCandidates[i].score, mCandidates[i].prev);
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user