From 7c43678627e7797aefd3f74e0446f4dd0fea67cf Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 2 Aug 2018 23:21:38 +0000 Subject: Skia Path: Fix text/xform size mismatch when calling drawTextRSXform(). BUG=chromium:751423 Change-Id: I2fcc46b80e89cb651e255bd1fd2d6883a05cf9c7 Reviewed-on: https://pdfium-review.googlesource.com/39153 Reviewed-by: Cary Clark Commit-Queue: Lei Zhang --- core/fxge/skia/fx_skia_device.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 93c3a1d91f..e65411414f 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -857,12 +857,15 @@ class SkiaState { m_drawIndex = m_commandIndex; m_type = Accumulator::kText; } + if (!hasRSX && !m_rsxform.isEmpty()) + FlushText(); + int count = m_positions.count(); m_positions.setCount(nChars + count); m_glyphs.setCount(nChars + count); - if (hasRSX) { + if (hasRSX) m_rsxform.setCount(nChars + count); - } + SkScalar flip = m_fontSize < 0 ? -1 : 1; SkScalar vFlip = flip; if (pFont->IsVertical()) -- cgit v1.2.3