diff options
author | Nicolas Pena <npm@chromium.org> | 2018-05-31 18:30:32 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-31 18:30:32 +0000 |
commit | 08eaf467ed0bed35ecccf370df32b7d51f3bc5fa (patch) | |
tree | 5a56502bf869f2bc2155c119f01d4c840e69c9d2 /core/fpdfapi/render/cpdf_type3cache.cpp | |
parent | dd5459ce862dfe709b88f698a28e72b31be6fb7c (diff) | |
download | pdfium-08eaf467ed0bed35ecccf370df32b7d51f3bc5fa.tar.xz |
Clean up some nits in CPDF_Type3Glyph
Change-Id: Ia466bb0119d914794b0d7ed9385547a7be245858
Reviewed-on: https://pdfium-review.googlesource.com/33312
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_type3cache.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_type3cache.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/fpdfapi/render/cpdf_type3cache.cpp b/core/fpdfapi/render/cpdf_type3cache.cpp index f85e5bbd9f..7d7ede5700 100644 --- a/core/fpdfapi/render/cpdf_type3cache.cpp +++ b/core/fpdfapi/render/cpdf_type3cache.cpp @@ -135,12 +135,9 @@ std::unique_ptr<CFX_GlyphBitmap> CPDF_Type3Cache::RenderGlyph( float top_y = image_matrix.d + image_matrix.f; float bottom_y = image_matrix.f; bool bFlipped = top_y > bottom_y; - if (bFlipped) { - float temp = top_y; - top_y = bottom_y; - bottom_y = temp; - } - pSize->AdjustBlue(top_y, bottom_y, top_line, bottom_line); + if (bFlipped) + std::swap(top_y, bottom_y); + std::tie(top_line, bottom_line) = pSize->AdjustBlue(top_y, bottom_y); pResBitmap = pBitmap->StretchTo( static_cast<int>(image_matrix.a), static_cast<int>(bFlipped ? top_line - bottom_line |