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

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

Issue 2283113002: Add -> operators to CFX_CountRef. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@privatize
Patch Set: Regenerate patch, rebase off of master. Created 4 years, 4 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_allstates.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_colorstate.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_page/cpdf_clippath.cpp
diff --git a/core/fpdfapi/fpdf_page/cpdf_clippath.cpp b/core/fpdfapi/fpdf_page/cpdf_clippath.cpp
index e820260131dce522fdc2e859a81926c65c47986d..2c05df0d193d98e822c1385a597d53bc869d0a3f 100644
--- a/core/fpdfapi/fpdf_page/cpdf_clippath.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_clippath.cpp
@@ -73,7 +73,8 @@ CFX_FloatRect CPDF_ClipPath::GetClipBox() const {
}
void CPDF_ClipPath::AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge) {
- CPDF_ClipPathData* pData = GetPrivateCopy();
+ MakePrivateCopy();
+ CPDF_ClipPathData* pData = GetObject();
if (!pData->m_PathAndTypeList.empty() && bAutoMerge) {
const CPDF_Path& old_path = pData->m_PathAndTypeList.back().first;
if (old_path.IsRect()) {
@@ -89,7 +90,8 @@ void CPDF_ClipPath::AppendPath(CPDF_Path path, uint8_t type, bool bAutoMerge) {
void CPDF_ClipPath::AppendTexts(
std::vector<std::unique_ptr<CPDF_TextObject>>* pTexts) {
- CPDF_ClipPathData* pData = GetPrivateCopy();
+ MakePrivateCopy();
+ CPDF_ClipPathData* pData = GetObject();
if (pData->m_TextList.size() + pTexts->size() <= FPDF_CLIPPATH_MAX_TEXTS) {
for (size_t i = 0; i < pTexts->size(); i++)
pData->m_TextList.push_back(std::move((*pTexts)[i]));
@@ -99,7 +101,8 @@ void CPDF_ClipPath::AppendTexts(
}
void CPDF_ClipPath::Transform(const CFX_Matrix& matrix) {
- CPDF_ClipPathData* pData = GetPrivateCopy();
+ MakePrivateCopy();
+ CPDF_ClipPathData* pData = GetObject();
for (auto& obj : pData->m_PathAndTypeList)
obj.first.Transform(&matrix);
for (auto& text : pData->m_TextList) {
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_allstates.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_colorstate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698