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

Unified Diff: Source/core/paint/TextPainter.cpp

Issue 799123003: text-combine should scale rather than fall back to none when wide (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: All comments fixed Created 5 years, 11 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/paint/TextPainter.cpp
diff --git a/Source/core/paint/TextPainter.cpp b/Source/core/paint/TextPainter.cpp
index 405b374e57a7d4ca8b75e5c41678cb8e76722488..c489e61b13872ae54d72d029a9952c31ac373aa6 100644
--- a/Source/core/paint/TextPainter.cpp
+++ b/Source/core/paint/TextPainter.cpp
@@ -55,7 +55,14 @@ void TextPainter::paint(int startOffset, int endOffset, int length, const Style&
{
GraphicsContextStateSaver stateSaver(*m_graphicsContext, false);
updateGraphicsContext(textStyle, stateSaver);
- paintInternal<PaintText>(startOffset, endOffset, length, cachedTextBlob);
+ if (m_combinedText && m_combinedText->isTransformNeeded()) {
+ m_graphicsContext->save();
+ m_combinedText->transform(*m_graphicsContext, m_textBounds);
+ paintInternal<PaintText>(startOffset, endOffset, length, cachedTextBlob);
+ m_graphicsContext->restore();
+ } else {
+ paintInternal<PaintText>(startOffset, endOffset, length, cachedTextBlob);
+ }
if (!m_emphasisMark.isEmpty()) {
if (textStyle.emphasisMarkColor != textStyle.fillColor)

Powered by Google App Engine
This is Rietveld 408576698