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

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

Issue 2520133002: Remove some WrapUnique() calls by returing unique_ptrs (Closed)
Patch Set: Old android toolchain 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
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 bool Continue(IFX_Pause* pPause); 68 bool Continue(IFX_Pause* pPause);
69 CFX_DIBSource* DetachBitmap(); 69 CFX_DIBSource* DetachBitmap();
70 CFX_DIBSource* DetachMask(); 70 CFX_DIBSource* DetachMask();
71 71
72 CFX_DIBSource* m_pDIBSource = nullptr; 72 CFX_DIBSource* m_pDIBSource = nullptr;
73 CFX_DIBSource* m_pMask = nullptr; 73 CFX_DIBSource* m_pMask = nullptr;
74 uint32_t m_MatteColor = 0; 74 uint32_t m_MatteColor = 0;
75 75
76 private: 76 private:
77 void FinishInitialization(); 77 void FinishInitialization();
78 CPDF_Dictionary* InitJPEG(uint8_t* pData, uint32_t size); 78 std::unique_ptr<CPDF_Dictionary> InitJPEG(uint8_t* pData, uint32_t size);
79 79
80 int32_t m_Height = 0; 80 int32_t m_Height = 0;
81 int32_t m_Width = 0; 81 int32_t m_Width = 0;
82 bool m_bIsInline = false; 82 bool m_bIsInline = false;
83 bool m_bIsMask = false; 83 bool m_bIsMask = false;
84 bool m_bInterpolate = false; 84 bool m_bInterpolate = false;
85 CPDF_Document* const m_pDocument; 85 CPDF_Document* const m_pDocument;
86 CPDF_Stream* m_pStream = nullptr; 86 CPDF_Stream* m_pStream = nullptr;
87 CPDF_Dictionary* m_pDict = nullptr; 87 CPDF_Dictionary* m_pDict = nullptr;
88 std::unique_ptr<CPDF_Stream> m_pOwnedStream; 88 std::unique_ptr<CPDF_Stream> m_pOwnedStream;
89 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict; 89 std::unique_ptr<CPDF_Dictionary> m_pOwnedDict;
90 CPDF_Dictionary* m_pOC = nullptr; 90 CPDF_Dictionary* m_pOC = nullptr;
91 }; 91 };
92 92
93 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_ 93 #endif // CORE_FPDFAPI_PAGE_CPDF_IMAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698