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

Unified Diff: Source/core/platform/graphics/skia/FontSkia.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/skia/FontSkia.cpp
diff --git a/Source/core/platform/graphics/skia/FontSkia.cpp b/Source/core/platform/graphics/skia/FontSkia.cpp
index 655a74bb8637af5155475f0b7629f3b4881f5d4b..d2bda22940f6aea1473be1b9942dc165ae652ccc 100644
--- a/Source/core/platform/graphics/skia/FontSkia.cpp
+++ b/Source/core/platform/graphics/skia/FontSkia.cpp
@@ -89,7 +89,7 @@ static void setupPaint(SkPaint* paint, const SimpleFontData* fontData, const Fon
// This issue is tracked in https://bugs.webkit.org/show_bug.cgi?id=62989
void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
const GlyphBuffer& glyphBuffer, int from, int numGlyphs,
- const FloatPoint& point) const {
+ const FloatPoint& point, const FloatRect& textRect) const {
COMPILE_ASSERT(sizeof(GlyphBufferGlyph) == sizeof(uint16_t), GlyphBufferGlyphSize_equals_uint16_t);
bool shouldSmoothFonts = true;
@@ -154,7 +154,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
gc->platformContext()->adjustTextRenderMode(&paint);
paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
- platformContext->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
+ platformContext->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, paint);
}
if ((textMode & TextModeStroke)
@@ -173,7 +173,7 @@ void Font::drawGlyphs(GraphicsContext* gc, const SimpleFontData* font,
paint.setLooper(0);
}
- platformContext->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, paint);
+ platformContext->drawPosText(glyphs, numGlyphs * sizeof(uint16_t), pos, textRect, paint);
}
if (font->platformData().orientation() == Vertical)
platformContext->restore();

Powered by Google App Engine
This is Rietveld 408576698