summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-25 11:17:16 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-25 11:17:16 -0800
commitea1ae9915d1702ab62af520b1487f70a553fc6ae (patch)
tree2fb77cd9537fa4e5a9b02895343d5abe20b51356 /core/src/fpdfapi
parentf014768833406e68234eeb4f8ba94cabf766dff3 (diff)
downloadpdfium-ea1ae9915d1702ab62af520b1487f70a553fc6ae.tar.xz
Make CFX_PSVTemplate simpler.
Add default ctor so we don't have to zero these out. Also, make CFX_VTemplate simpler. Also, remove the Set() method in favor of assignment. Also, remove CFX_FloatPoint define. Also, remove unused (and wrong) CFX_VTemplate methods. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1733523003 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 4ad6f81d5e..cc9a998e57 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -768,11 +768,7 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
for (int i = 1; i < 13; i++) {
pPoints[i].m_Flag = FXPT_BEZIERTO;
}
- CFX_FloatPoint coords[16];
- for (int i = 0; i < 16; i++) {
- coords[i].Set(0.0f, 0.0f);
- }
-
+ CFX_PointF coords[16];
int point_count = bTensor ? 16 : 12;
while (!stream.m_BitStream.IsEOF()) {
FX_DWORD flag = stream.GetFlag();
@@ -780,11 +776,11 @@ static void DrawCoonPatchMeshes(FX_BOOL bTensor,
if (flag) {
iStartPoint = 4;
iStartColor = 2;
- CFX_FloatPoint tempCoords[4];
+ CFX_PointF tempCoords[4];
for (i = 0; i < 4; i++) {
tempCoords[i] = coords[(flag * 3 + i) % 12];
}
- FXSYS_memcpy(coords, tempCoords, sizeof(CFX_FloatPoint) * 4);
+ FXSYS_memcpy(coords, tempCoords, sizeof(tempCoords));
Coon_Color tempColors[2];
tempColors[0] = patch.patch_colors[flag];
tempColors[1] = patch.patch_colors[(flag + 1) % 4];