From 73304eb04abfea086f7dee44e89894192cf49b86 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 2 Aug 2018 23:28:09 +0000 Subject: Fix some nits in SkiaState. Change-Id: Id52bb57efea2a6a46bea645e4f3e54957982a40b Reviewed-on: https://pdfium-review.googlesource.com/39154 Reviewed-by: Cary Clark Commit-Queue: Lei Zhang --- core/fxge/skia/fx_skia_device.cpp | 10 +++++----- 1 file 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 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 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 -- cgit v1.2.3