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 <caryclark@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 93c3a1d..e654114 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -857,12 +857,15 @@
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())