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

Unified Diff: third_party/WebKit/Source/platform/fonts/Font.cpp

Issue 2679213002: Remove cachedTextBlob lookup in Font::getTextIntercepts (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/Font.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/Font.cpp b/third_party/WebKit/Source/platform/fonts/Font.cpp
index fa6fdf6a0c7e2c5c5d3b7502871b97bc53d93b03..0650ea27166c45b9f543209f9b97e08c2c2904c2 100644
--- a/third_party/WebKit/Source/platform/fonts/Font.cpp
+++ b/third_party/WebKit/Source/platform/fonts/Font.cpp
@@ -437,18 +437,7 @@ void Font::getTextIntercepts(const TextRunPaintInfo& runInfo,
if (shouldSkipDrawing())
return;
- 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;
- }
+ DCHECK(!runInfo.cachedTextBlob);
GlyphBuffer glyphBuffer;
// Compute skip-ink exceptions in the GlyphBuffer.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698