diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-02-13 15:43:56 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-02-13 21:12:43 +0000 |
commit | 9787a7441a905e582b10d9ffc425098b3233d36c (patch) | |
tree | 130b8621f14ec7b85cfb6275276c3d71de526e69 /core/fpdfapi/page/cpdf_streamcontentparser.cpp | |
parent | 9e41d0461d175410f6ea7573e729dc1ae14e846d (diff) | |
download | pdfium-9787a7441a905e582b10d9ffc425098b3233d36c.tar.xz |
Cleanup CPDF_MeshStream
This CL converts the MeshVertex to a point and the TransformPoint to the
CFX_PointF override.
Change-Id: I3faa5c14cedcf5af6aafca1c566acbc68577cca7
Reviewed-on: https://pdfium-review.googlesource.com/2610
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 21b13772c5..af5b88fead 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; } } |