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

Unified Diff: Source/core/platform/graphics/GraphicsContext.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/GraphicsContext.cpp
diff --git a/Source/core/platform/graphics/GraphicsContext.cpp b/Source/core/platform/graphics/GraphicsContext.cpp
index 72f98442ebca68df2e0a480d48a6516389aef542..d69df3ac280a279f6e15bce3e4709c35124ae895 100644
--- a/Source/core/platform/graphics/GraphicsContext.cpp
+++ b/Source/core/platform/graphics/GraphicsContext.cpp
@@ -380,23 +380,23 @@ bool GraphicsContext::paintingDisabled() const
return m_state.paintingDisabled;
}
-void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
+void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, const FloatRect& textRect, int from, int to)
{
if (paintingDisabled())
return;
- font.drawText(this, run, point, from, to);
+ font.drawText(this, run, point, textRect, from, to);
}
-void GraphicsContext::drawEmphasisMarks(const Font& font, const TextRun& run, const AtomicString& mark, const FloatPoint& point, int from, int to)
+void GraphicsContext::drawEmphasisMarks(const Font& font, const TextRun& run, const AtomicString& mark, const FloatPoint& point, const FloatRect& textRect, int from, int to)
{
if (paintingDisabled())
return;
- font.drawEmphasisMarks(this, run, mark, point, from, to);
+ font.drawEmphasisMarks(this, run, mark, point, textRect, from, to);
}
-void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const FloatPoint& point, Font::CustomFontNotReadyAction customFontNotReadyAction)
+void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const FloatPoint& point, const FloatRect& textRect, Font::CustomFontNotReadyAction customFontNotReadyAction)
{
if (paintingDisabled())
return;
@@ -420,7 +420,7 @@ void GraphicsContext::drawBidiText(const Font& font, const TextRun& run, const F
subrun.setDirection(isRTL ? RTL : LTR);
subrun.setDirectionalOverride(bidiRun->dirOverride(false));
- font.drawText(this, subrun, currPoint, 0, -1, customFontNotReadyAction);
+ font.drawText(this, subrun, currPoint, textRect, 0, -1, customFontNotReadyAction);
bidiRun = bidiRun->next();
// FIXME: Have Font::drawText return the width of what it drew so that we don't have to re-measure here.

Powered by Google App Engine
This is Rietveld 408576698