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

Unified Diff: core/include/fpdfapi/fpdf_resource.h

Issue 522483003: Add m_pDocument in CPDF_Color and check if page date has been forced clear (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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 | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_resource.h
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 4ce4ddc8bb519f2152384c7f9cc93485261a0f74..e00b36b927d04e49e86488cf6ddd61c97dd127df 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -684,6 +684,7 @@ public:
{
m_pBuffer = NULL;
Tom Sepez 2014/09/02 17:15:49 Nit: can we clear these in the same order as which
Bo Xu 2014/09/02 19:05:34 Done.
m_pCS = NULL;
+ m_pDocument = NULL;
}
CPDF_Color(int family);
@@ -721,6 +722,9 @@ public:
CPDF_ColorSpace* m_pCS;
FX_FLOAT* m_pBuffer;
+
Tom Sepez 2014/09/02 17:15:49 nit: can this be protected/private?
Bo Xu 2014/09/02 19:05:34 Done.
+ CPDF_Document* m_pDocument;
Tom Sepez 2014/09/02 17:15:49 Are we sure that the document will still be valid
Tom Sepez 2014/09/02 17:17:12 In other words, Are we sure that the document will
Bo Xu 2014/09/02 19:05:34 Yes, the destrutor of color is in the destructor o
+
protected:
void ReleaseBuffer();
void ReleaseColorSpace();
@@ -732,7 +736,6 @@ class CPDF_Pattern : public CFX_Object
public:
virtual ~CPDF_Pattern();
- void SaveColor(CPDF_Color* pColor) {m_pColor = pColor;}
CPDF_Object* m_pPatternObj;
@@ -742,7 +745,6 @@ public:
CFX_AffineMatrix m_ParentMatrix;
CPDF_Document* m_pDocument;
- CPDF_Color* m_pColor;
protected:
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698