From 940f559b985d4a742c21b21cb077a232e44dd289 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Feb 2017 11:55:21 -0500 Subject: Reland Cleanup CPDF_MeshStream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL fixes up the bits of the CPDF_MeshStream CL that depended on the Origin CL and integrates the fixes for the Skia bots. Change-Id: I470e49c35b809f00fecbaeb303de15c0db3fe590 Reviewed-on: https://pdfium-review.googlesource.com/2698 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- core/fpdfapi/page/cpdf_streamcontentparser.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp') diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 61efb48529..0af43d08b2 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -99,7 +99,7 @@ CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, while (!stream.BitStream()->IsEOF()) { uint32_t flag = 0; if (type != kLatticeFormGouraudTriangleMeshShading) - flag = stream.GetFlag(); + flag = stream.ReadFlag(); if (!bGouraud && flag) { point_count -= 4; @@ -107,13 +107,11 @@ CFX_FloatRect GetShadingBBox(CPDF_ShadingPattern* pShading, } for (int i = 0; i < point_count; i++) { - FX_FLOAT x; - FX_FLOAT y; - stream.GetCoords(x, y); + CFX_PointF origin = stream.ReadCoords(); if (bStarted) { - rect.UpdateRect(x, y); + rect.UpdateRect(origin.x, origin.y); } else { - rect.InitRect(x, y); + rect.InitRect(origin.x, origin.y); bStarted = true; } } -- cgit v1.2.3