https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/paint/TextPainter.cpp?l=260
TextPainter always creates a new TextRunPaintInfo with an empty cachedTextBlob so getTextIntercepts in Font.cpp does not need the following block:
if (runInfo.cachedTextBlob && runInfo.cachedTextBlob->get()) {
SkScalar boundsArray[2] = {std::get<0>(bounds), std::get<1>(bounds)};
int numIntervals = paint.getTextBlobIntercepts(
runInfo.cachedTextBlob->get(), boundsArray, nullptr);
if (!numIntervals)
return;
DCHECK_EQ(numIntervals % 2, 0);
intercepts.resize(numIntervals / 2);
paint.getTextBlobIntercepts(runInfo.cachedTextBlob->get(), boundsArray,
reinterpret_cast<SkScalar*>(intercepts.data()));
return;
}
Comment 1 by bugdroid1@chromium.org
, Feb 8 2017