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

Unified Diff: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp

Issue 2416603002: Add ability to compute text intercepts to Font (Closed)
Patch Set: Rebased Created 4 years, 2 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
Index: third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
index f31eb620232f55e50a8a1e0d4cf404643bd09e52..79f123d50c8f0b752e7b58d7d91aeb2bd26597eb 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
@@ -710,6 +710,18 @@ void GraphicsContext::drawRect(const IntRect& rect) {
}
}
+int GraphicsContext::getTextIntercepts(const blink::Font& font,
+ const blink::TextRunPaintInfo& runInfo,
+ const SkScalar* bounds,
+ SkScalar* intervals) {
+ if (contextDisabled())
+ return 0;
+
+ return font.getTextIntercepts(m_canvas, runInfo, m_deviceScaleFactor,
+ immutableState()->fillPaint(), bounds,
+ intervals);
+}
+
void GraphicsContext::drawText(const Font& font,
const TextRunPaintInfo& runInfo,
const FloatPoint& point,

Powered by Google App Engine
This is Rietveld 408576698