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

Unified Diff: fpdfsdk/fxedit/fxet_edit.cpp

Issue 2294553002: Revert "Use ->() in CPDF_ColorState" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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_render/fpdf_render_text.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 97debe176432cc94e4f82c44a1fe7b389bcd032f..c744958e5e0264251bb4f62765cfcabba634e73f 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -145,8 +145,7 @@ void AddRectToPageObjects(CPDF_PageObjectHolder* pObjectHolder,
rgb[0] = FXARGB_R(crFill) / 255.0f;
rgb[1] = FXARGB_G(crFill) / 255.0f;
rgb[2] = FXARGB_B(crFill) / 255.0f;
- pPathObj->m_ColorState.MakePrivateCopy();
- pPathObj->m_ColorState->SetFillColor(
+ pPathObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
pPathObj->m_FillType = FXFILL_ALTERNATE;
@@ -178,11 +177,9 @@ CPDF_TextObject* AddTextObjToPageObjects(CPDF_PageObjectHolder* pObjectHolder,
rgb[0] = FXARGB_R(crText) / 255.0f;
rgb[1] = FXARGB_G(crText) / 255.0f;
rgb[2] = FXARGB_B(crText) / 255.0f;
-
- pTxtObj->m_ColorState.MakePrivateCopy();
- pTxtObj->m_ColorState->SetFillColor(
+ pTxtObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
- pTxtObj->m_ColorState->SetStrokeColor(
+ pTxtObj->m_ColorState.SetStrokeColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
pTxtObj->SetPosition(point.x, point.y);
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698