diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-02 23:28:09 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-02 23:28:09 +0000 |
commit | 73304eb04abfea086f7dee44e89894192cf49b86 (patch) | |
tree | 082c6e1dbda5c0b90ad8a4e7b4a8cbf28851526e /core/fxge/skia | |
parent | 7c43678627e7797aefd3f74e0446f4dd0fea67cf (diff) | |
download | pdfium-73304eb04abfea086f7dee44e89894192cf49b86.tar.xz |
Fix some nits in SkiaState.
Change-Id: Id52bb57efea2a6a46bea645e4f3e54957982a40b
Reviewed-on: https://pdfium-review.googlesource.com/39154
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/skia')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index e65411414f..4fa5a08d09 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -843,7 +843,7 @@ class SkiaState { if (Accumulator::kPath == m_type || drawIndex != m_commandIndex || (Accumulator::kText == m_type && (FontChanged(pFont, pMatrix, font_size, scaleX, color) || - hasRSX == !m_rsxform.count()))) { + hasRSX == m_rsxform.isEmpty()))) { Flush(); } if (Accumulator::kText != m_type) { @@ -931,15 +931,15 @@ class SkiaState { SkTDArray<SkUnichar> text; text.setCount(m_glyphs.count()); skPaint.glyphsToUnichars(m_glyphs.begin(), m_glyphs.count(), text.begin()); - for (size_t i = 0; i < m_glyphs.count(); ++i) + for (int i = 0; i < m_glyphs.count(); ++i) printf("%lc", m_glyphs[i]); printf("\n"); #endif if (m_rsxform.count()) { - skCanvas->drawTextRSXform(m_glyphs.begin(), m_glyphs.count() * 2, + skCanvas->drawTextRSXform(m_glyphs.begin(), m_glyphs.bytes(), m_rsxform.begin(), nullptr, skPaint); } else { - skCanvas->drawPosText(m_glyphs.begin(), m_glyphs.count() * 2, + skCanvas->drawPosText(m_glyphs.begin(), m_glyphs.bytes(), m_positions.begin(), skPaint); } skCanvas->restore(); @@ -1610,7 +1610,7 @@ bool CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, SkTDArray<SkUnichar> text; text.setCount(glyphs.count()); paint.glyphsToUnichars(glyphs.begin(), glyphs.count(), text.begin()); - for (size_t i = 0; i < glyphs.count(); ++i) + for (int i = 0; i < glyphs.count(); ++i) printf("%lc", text[i]); printf("\n"); #endif |