diff options
author | tsepez <tsepez@chromium.org> | 2016-09-02 15:45:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-02 15:45:22 -0700 |
commit | fc1d16f76f173b8437edc93dde8f9f82abb51298 (patch) | |
tree | ec4e9fedf08524443a6ff13d45b4e66159f8990b /core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | |
parent | bbee445c5a77dfbaea9041308f001c756e49c5fd (diff) | |
download | pdfium-fc1d16f76f173b8437edc93dde8f9f82abb51298.tar.xz |
Make CPDF_Path have a CFX_Path rather than inheriting
Review-Url: https://codereview.chromium.org/2305103002
Diffstat (limited to 'core/fpdfapi/fpdf_page/fpdf_page_parser.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp index cf77de15a4..83e66eae61 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp @@ -1459,7 +1459,7 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke) { if (PathPointCount <= 1) { if (PathPointCount && PathClipType) { CPDF_Path path; - path.Emplace()->AppendRect(0, 0, 0, 0); + path.AppendRect(0, 0, 0, 0); m_pCurStates->m_ClipPath.AppendPath(path, FXFILL_WINDING, TRUE); } return; @@ -1469,9 +1469,8 @@ void CPDF_StreamContentParser::AddPathObject(int FillType, FX_BOOL bStroke) { PathPointCount--; } CPDF_Path Path; - CFX_PathData* pPathData = Path.Emplace(); - pPathData->SetPointCount(PathPointCount); - FXSYS_memcpy(pPathData->GetPoints(), m_pPathPoints, + Path.SetPointCount(PathPointCount); + FXSYS_memcpy(Path.GetMutablePoints(), m_pPathPoints, sizeof(FX_PATHPOINT) * PathPointCount); CFX_Matrix matrix = m_pCurStates->m_CTM; matrix.Concat(m_mtContentToUser); |