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

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

Issue 2294133002: Make CPDF_ColorState have a CFX_ColorStateData rather than inheriting (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nits. 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_graphicstates.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('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 70e1d1aea60fdc8206fd1aba5ee7280cdf30c5e8..5272a4464b634befbc6442c029f9d38a66a78539 100644
--- a/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -686,21 +686,19 @@ void CPDF_StreamContentParser::Handle_ConcatMatrix() {
}
void CPDF_StreamContentParser::Handle_SetColorSpace_Fill() {
- CFX_ByteString csname = GetString(0);
- CPDF_ColorSpace* pCS = FindColorSpace(csname);
- if (!pCS) {
+ CPDF_ColorSpace* pCS = FindColorSpace(GetString(0));
+ if (!pCS)
return;
- }
- m_pCurStates->m_ColorState.GetPrivateCopy()->m_FillColor.SetColorSpace(pCS);
+
+ m_pCurStates->m_ColorState.GetMutableFillColor()->SetColorSpace(pCS);
}
void CPDF_StreamContentParser::Handle_SetColorSpace_Stroke() {
- CFX_ByteString csname = GetString(0);
- CPDF_ColorSpace* pCS = FindColorSpace(csname);
- if (!pCS) {
+ CPDF_ColorSpace* pCS = FindColorSpace(GetString(0));
+ if (!pCS)
return;
- }
- m_pCurStates->m_ColorState.GetPrivateCopy()->m_StrokeColor.SetColorSpace(pCS);
+
+ m_pCurStates->m_ColorState.GetMutableStrokeColor()->SetColorSpace(pCS);
}
void CPDF_StreamContentParser::Handle_SetDash() {
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_graphicstates.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698