Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2020)

Unified Diff: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 2305103002: Make CPDF_Path have a CFX_Path rather than inheriting (Closed)
Patch Set: Move to .cpp Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_path.cpp ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index 4712ea07259145476fb69a57bf626422993c4148..84564e96556f94ba006a78dd73ae696c7ab49823 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,
Lei Zhang 2016/09/02 22:10:44 It would be nice if CFX_PathData::m_pPoints was a
sizeof(FX_PATHPOINT) * PathPointCount);
CFX_Matrix matrix = m_pCurStates->m_CTM;
matrix.Concat(m_mtContentToUser);
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_path.cpp ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698