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

Unified Diff: Source/core/platform/graphics/Font.cpp

Issue 14160005: Track the region where text is painted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase with TOT Created 7 years, 8 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: Source/core/platform/graphics/Font.cpp
diff --git a/Source/core/platform/graphics/Font.cpp b/Source/core/platform/graphics/Font.cpp
index 235be5a0456f21e18e53894f7b81edfab73b9786..40607b94b7a978b4775325ac77c5495b08a4adeb 100644
--- a/Source/core/platform/graphics/Font.cpp
+++ b/Source/core/platform/graphics/Font.cpp
@@ -156,7 +156,7 @@ void Font::update(PassRefPtr<FontSelector> fontSelector) const
m_typesettingFeatures = computeTypesettingFeatures();
}
-void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
+void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoint& point, const FloatRect& textRect, int from, int to, CustomFontNotReadyAction customFontNotReadyAction) const
{
// Don't draw anything while we are using custom fonts that are in the process of loading,
// except if the 'force' argument is set to true (in which case it will use a fallback
@@ -172,12 +172,12 @@ void Font::drawText(GraphicsContext* context, const TextRun& run, const FloatPoi
codePathToUse = Complex;
if (codePathToUse != Complex)
- return drawSimpleText(context, run, point, from, to);
+ return drawSimpleText(context, run, point, textRect, from, to);
- return drawComplexText(context, run, point, from, to);
+ return drawComplexText(context, run, point, textRect, from, to);
}
-void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to) const
+void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const AtomicString& mark, const FloatPoint& point, const FloatRect& textRect, int from, int to) const
{
if (loadingCustomFonts())
return;
@@ -191,9 +191,9 @@ void Font::drawEmphasisMarks(GraphicsContext* context, const TextRun& run, const
codePathToUse = Complex;
if (codePathToUse != Complex)
- drawEmphasisMarksForSimpleText(context, run, mark, point, from, to);
+ drawEmphasisMarksForSimpleText(context, run, mark, point, textRect, from, to);
else
- drawEmphasisMarksForComplexText(context, run, mark, point, from, to);
+ drawEmphasisMarksForComplexText(context, run, mark, point, textRect, from, to);
}
float Font::width(const TextRun& run, HashSet<const SimpleFontData*>* fallbackFonts, GlyphOverflow* glyphOverflow) const

Powered by Google App Engine
This is Rietveld 408576698