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

Side by Side Diff: core/fpdfapi/page/cpdf_image.h

Issue 2520133002: Remove some WrapUnique() calls by returing unique_ptrs (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
« no previous file with comments | « core/fpdfapi/page/cpdf_docpagedata.cpp ('k') | core/fpdfapi/page/cpdf_image.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ 7 #ifndef CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_
8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ 8 #define CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool Continue(IFX_Pause* pPause); 63 bool Continue(IFX_Pause* pPause);
64 CFX_DIBSource* DetachBitmap(); 64 CFX_DIBSource* DetachBitmap();
65 CFX_DIBSource* DetachMask(); 65 CFX_DIBSource* DetachMask();
66 66
67 CFX_DIBSource* m_pDIBSource = nullptr; 67 CFX_DIBSource* m_pDIBSource = nullptr;
68 CFX_DIBSource* m_pMask = nullptr; 68 CFX_DIBSource* m_pMask = nullptr;
69 uint32_t m_MatteColor = 0; 69 uint32_t m_MatteColor = 0;
70 70
71 private: 71 private:
72 void FinishInitialization(); 72 void FinishInitialization();
73 CPDF_Dictionary* InitJPEG(uint8_t* pData, uint32_t size); 73 std::unique_ptr<CPDF_Dictionary> InitJPEG(uint8_t* pData, uint32_t size);
74 74
75 int32_t m_Height = 0; 75 int32_t m_Height = 0;
76 int32_t m_Width = 0; 76 int32_t m_Width = 0;
77 bool m_bIsInline = false; 77 bool m_bIsInline = false;
78 bool m_bIsMask = false; 78 bool m_bIsMask = false;
79 bool m_bInterpolate = false; 79 bool m_bInterpolate = false;
80 CPDF_Document* const m_pDocument; 80 CPDF_Document* const m_pDocument;
81 CPDF_Stream* m_pStream = nullptr; 81 CPDF_Stream* m_pStream = nullptr;
82 CPDF_Dictionary* m_pDict = nullptr; 82 CPDF_Dictionary* m_pDict = nullptr;
83 std::unique_ptr<CPDF_Stream> m_pOwnedStream; 83 std::unique_ptr<CPDF_Stream> m_pOwnedStream;
84 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict; 84 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict;
85 CPDF_Dictionary* m_pOC = nullptr; 85 CPDF_Dictionary* m_pOC = nullptr;
86 }; 86 };
87 87
88 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ 88 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/page/cpdf_docpagedata.cpp ('k') | core/fpdfapi/page/cpdf_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698