diff options
author | tsepez <tsepez@chromium.org> | 2016-08-29 10:24:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-29 10:24:19 -0700 |
commit | d09a09751f724ecdb1a0bc307447a3d0c212ebff (patch) | |
tree | 917a2986be9769a6bfaf8ac4cc96a8a4006eed82 /core/fpdfapi/fpdf_page/cpdf_clippath.cpp | |
parent | a032f7f79c67ddef4db0f44fca8f0d245bfb8e82 (diff) | |
download | pdfium-d09a09751f724ecdb1a0bc307447a3d0c212ebff.tar.xz |
Replace wrapper methods in CPDF_Path with -> operator.
These just invoked exaclty the same methodes in the underlying
xxxData class, which we can now do with just a ->()
Move some methods to the xxxData class, where they belong.
In doing so, put MakePrivateCopy() calls at each callsite
for those methods that made a copy.
Review-Url: https://codereview.chromium.org/2286983002
Diffstat (limited to 'core/fpdfapi/fpdf_page/cpdf_clippath.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_clippath.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_clippath.cpp b/core/fpdfapi/fpdf_page/cpdf_clippath.cpp index 2c05df0d19..51f3086c12 100644 --- a/core/fpdfapi/fpdf_page/cpdf_clippath.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_clippath.cpp @@ -38,9 +38,9 @@ CFX_FloatRect CPDF_ClipPath::GetClipBox() const { FX_BOOL bStarted = FALSE; int count = GetPathCount(); if (count) { - rect = GetPath(0).GetBoundingBox(); + rect = GetPath(0)->GetBoundingBox(); for (int i = 1; i < count; i++) { - CFX_FloatRect path_rect = GetPath(i).GetBoundingBox(); + CFX_FloatRect path_rect = GetPath(i)->GetBoundingBox(); rect.Intersect(path_rect); } bStarted = TRUE; @@ -77,10 +77,10 @@ void CPDF_ClipPath::AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge) { CPDF_ClipPathData* pData = GetObject(); if (!pData->m_PathAndTypeList.empty() && bAutoMerge) { const CPDF_Path& old_path = pData->m_PathAndTypeList.back().first; - if (old_path.IsRect()) { - CFX_FloatRect old_rect(old_path.GetPointX(0), old_path.GetPointY(0), - old_path.GetPointX(2), old_path.GetPointY(2)); - CFX_FloatRect new_rect = path.GetBoundingBox(); + if (old_path->IsRect()) { + CFX_FloatRect old_rect(old_path->GetPointX(0), old_path->GetPointY(0), + old_path->GetPointX(2), old_path->GetPointY(2)); + CFX_FloatRect new_rect = path->GetBoundingBox(); if (old_rect.Contains(new_rect)) pData->m_PathAndTypeList.pop_back(); } |