| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "core/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
| 8 | 8 |
| 9 #include "core/fdrm/crypto/include/fx_crypt.h" | 9 #include "core/fdrm/crypto/include/fx_crypt.h" |
| 10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" | 10 #include "core/fpdfapi/fpdf_font/cpdf_type1font.h" |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 csData->RemoveRef(); | 309 csData->RemoveRef(); |
| 310 if (csData->use_count() == 0) { | 310 if (csData->use_count() == 0) { |
| 311 csData->get()->ReleaseCS(); | 311 csData->get()->ReleaseCS(); |
| 312 csData->reset(nullptr); | 312 csData->reset(nullptr); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 } | 315 } |
| 316 | 316 |
| 317 CPDF_Pattern* CPDF_DocPageData::GetPattern(CPDF_Object* pPatternObj, | 317 CPDF_Pattern* CPDF_DocPageData::GetPattern(CPDF_Object* pPatternObj, |
| 318 FX_BOOL bShading, | 318 FX_BOOL bShading, |
| 319 const CFX_Matrix* matrix) { | 319 const CFX_Matrix& matrix) { |
| 320 if (!pPatternObj) | 320 if (!pPatternObj) |
| 321 return nullptr; | 321 return nullptr; |
| 322 | 322 |
| 323 CPDF_CountedPattern* ptData = nullptr; | 323 CPDF_CountedPattern* ptData = nullptr; |
| 324 auto it = m_PatternMap.find(pPatternObj); | 324 auto it = m_PatternMap.find(pPatternObj); |
| 325 if (it != m_PatternMap.end()) { | 325 if (it != m_PatternMap.end()) { |
| 326 ptData = it->second; | 326 ptData = it->second; |
| 327 if (ptData->get()) { | 327 if (ptData->get()) { |
| 328 return ptData->AddRef(); | 328 return ptData->AddRef(); |
| 329 } | 329 } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 } | 510 } |
| 511 | 511 |
| 512 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( | 512 CPDF_CountedPattern* CPDF_DocPageData::FindPatternPtr( |
| 513 CPDF_Object* pPatternObj) const { | 513 CPDF_Object* pPatternObj) const { |
| 514 if (!pPatternObj) | 514 if (!pPatternObj) |
| 515 return nullptr; | 515 return nullptr; |
| 516 | 516 |
| 517 auto it = m_PatternMap.find(pPatternObj); | 517 auto it = m_PatternMap.find(pPatternObj); |
| 518 return it != m_PatternMap.end() ? it->second : nullptr; | 518 return it != m_PatternMap.end() ? it->second : nullptr; |
| 519 } | 519 } |
| OLD | NEW |