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

Side by Side Diff: core/fxge/fx_dib.h

Issue 2534953004: Return unique_ptrs from CFX_DIBitmap::Clone(). (Closed)
Patch Set: win again 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 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 #ifndef CORE_FXGE_FX_DIB_H_ 7 #ifndef CORE_FXGE_FX_DIB_H_
8 #define CORE_FXGE_FX_DIB_H_ 8 #define CORE_FXGE_FX_DIB_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 uint32_t GetPaletteEntry(int index) const; 208 uint32_t GetPaletteEntry(int index) const;
209 209
210 void SetPaletteEntry(int index, uint32_t color); 210 void SetPaletteEntry(int index, uint32_t color);
211 uint32_t GetPaletteArgb(int index) const { return GetPaletteEntry(index); } 211 uint32_t GetPaletteArgb(int index) const { return GetPaletteEntry(index); }
212 void SetPaletteArgb(int index, uint32_t color) { 212 void SetPaletteArgb(int index, uint32_t color) {
213 SetPaletteEntry(index, color); 213 SetPaletteEntry(index, color);
214 } 214 }
215 215
216 void CopyPalette(const uint32_t* pSrcPal); 216 void CopyPalette(const uint32_t* pSrcPal);
217 217
218 CFX_DIBitmap* Clone(const FX_RECT* pClip = nullptr) const; 218 std::unique_ptr<CFX_DIBitmap> Clone(const FX_RECT* pClip = nullptr) const;
219 CFX_DIBitmap* CloneConvert(FXDIB_Format format) const; 219 std::unique_ptr<CFX_DIBitmap> CloneConvert(FXDIB_Format format) const;
220 220
221 CFX_DIBitmap* StretchTo(int dest_width, 221 std::unique_ptr<CFX_DIBitmap> StretchTo(int dest_width,
222 int dest_height, 222 int dest_height,
223 uint32_t flags = 0, 223 uint32_t flags = 0,
224 const FX_RECT* pClip = nullptr) const; 224 const FX_RECT* pClip = nullptr) const;
225 CFX_DIBitmap* TransformTo(const CFX_Matrix* pMatrix, 225 std::unique_ptr<CFX_DIBitmap> TransformTo(
226 int& left, 226 const CFX_Matrix* pMatrix,
227 int& top, 227 int& left,
228 uint32_t flags = 0, 228 int& top,
229 const FX_RECT* pClip = nullptr) const; 229 uint32_t flags = 0,
230 const FX_RECT* pClip = nullptr) const;
230 231
231 CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = nullptr) const; 232 CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = nullptr) const;
232 bool CopyAlphaMask(const CFX_DIBSource* pAlphaMask, 233 bool CopyAlphaMask(const CFX_DIBSource* pAlphaMask,
233 const FX_RECT* pClip = nullptr); 234 const FX_RECT* pClip = nullptr);
234 235
235 CFX_DIBitmap* SwapXY(bool bXFlip, 236 CFX_DIBitmap* SwapXY(bool bXFlip,
236 bool bYFlip, 237 bool bYFlip,
237 const FX_RECT* pClip = nullptr) const; 238 const FX_RECT* pClip = nullptr) const;
238 239
239 CFX_DIBitmap* FlipImage(bool bXFlip, bool bYFlip) const; 240 CFX_DIBitmap* FlipImage(bool bXFlip, bool bYFlip) const;
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 int m_Status; 686 int m_Status;
686 FX_RECT m_ClipBox; 687 FX_RECT m_ClipBox;
687 uint32_t m_Flags; 688 uint32_t m_Flags;
688 int m_AlphaFlag; 689 int m_AlphaFlag;
689 void* m_pIccTransform; 690 void* m_pIccTransform;
690 bool m_bRgbByteOrder; 691 bool m_bRgbByteOrder;
691 int m_BlendType; 692 int m_BlendType;
692 }; 693 };
693 694
694 #endif // CORE_FXGE_FX_DIB_H_ 695 #endif // CORE_FXGE_FX_DIB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698