Chromium Code Reviews| Index: core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
| diff --git a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
| index 059679a8cda1f3d7284c6278e73b074697a2b9b7..f9eae859758a41f73469a6afa638b3cb44e3badb 100644 |
| --- a/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
| +++ b/core/fpdfapi/fpdf_page/fpdf_page_doc.cpp |
| @@ -439,6 +439,18 @@ void CPDF_DocPageData::ReleaseImage(const CPDF_Object* pImageStream) { |
| m_ImageMap.erase(it); |
| } |
| +bool CPDF_DocPageData::HasImage(const CPDF_Object* pImageStream) const { |
|
Wei Li
2016/08/04 18:00:39
Why adding an extra function which does the same a
Lei Zhang
2016/08/04 21:58:25
CPDF_ImageObject needs to know if CPDF_ImageObject
Wei Li
2016/08/04 23:36:39
I think you may keep the change of patch 1 and let
|
| + if (!pImageStream) |
| + return false; |
| + |
| + uint32_t dwObjNum = pImageStream->GetObjNum(); |
| + if (!dwObjNum) |
| + return false; |
| + |
| + auto it = m_ImageMap.find(dwObjNum); |
| + return it != m_ImageMap.end() && it->second; |
| +} |
| + |
| CPDF_IccProfile* CPDF_DocPageData::GetIccProfile( |
| CPDF_Stream* pIccProfileStream) { |
| if (!pIccProfileStream) |