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 #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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "core/fxcrt/cfx_count_ref.h" | 13 #include "core/fxcrt/cfx_shared_copy_on_write.h" |
14 #include "core/fxcrt/fx_basic.h" | 14 #include "core/fxcrt/fx_basic.h" |
15 #include "core/fxcrt/fx_coordinates.h" | 15 #include "core/fxcrt/fx_coordinates.h" |
16 | 16 |
17 enum FXDIB_Format { | 17 enum FXDIB_Format { |
18 FXDIB_Invalid = 0, | 18 FXDIB_Invalid = 0, |
19 FXDIB_1bppMask = 0x101, | 19 FXDIB_1bppMask = 0x101, |
20 FXDIB_1bppRgb = 0x001, | 20 FXDIB_1bppRgb = 0x001, |
21 FXDIB_1bppCmyk = 0x401, | 21 FXDIB_1bppCmyk = 0x401, |
22 FXDIB_8bppMask = 0x108, | 22 FXDIB_8bppMask = 0x108, |
23 FXDIB_8bppRgb = 0x008, | 23 FXDIB_8bppRgb = 0x008, |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 public: | 382 public: |
383 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); | 383 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); |
384 ~CFX_DIBExtractor(); | 384 ~CFX_DIBExtractor(); |
385 | 385 |
386 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } | 386 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } |
387 | 387 |
388 private: | 388 private: |
389 std::unique_ptr<CFX_DIBitmap> m_pBitmap; | 389 std::unique_ptr<CFX_DIBitmap> m_pBitmap; |
390 }; | 390 }; |
391 | 391 |
392 typedef CFX_CountRef<CFX_DIBitmap> CFX_DIBitmapRef; | 392 typedef CFX_SharedCopyOnWrite<CFX_DIBitmap> CFX_DIBitmapRef; |
393 | 393 |
394 class CFX_FilteredDIB : public CFX_DIBSource { | 394 class CFX_FilteredDIB : public CFX_DIBSource { |
395 public: | 395 public: |
396 CFX_FilteredDIB(); | 396 CFX_FilteredDIB(); |
397 ~CFX_FilteredDIB() override; | 397 ~CFX_FilteredDIB() override; |
398 | 398 |
399 void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE); | 399 void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE); |
400 | 400 |
401 virtual FXDIB_Format GetDestFormat() = 0; | 401 virtual FXDIB_Format GetDestFormat() = 0; |
402 | 402 |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 int m_Status; | 671 int m_Status; |
672 FX_RECT m_ClipBox; | 672 FX_RECT m_ClipBox; |
673 uint32_t m_Flags; | 673 uint32_t m_Flags; |
674 int m_AlphaFlag; | 674 int m_AlphaFlag; |
675 void* m_pIccTransform; | 675 void* m_pIccTransform; |
676 FX_BOOL m_bRgbByteOrder; | 676 FX_BOOL m_bRgbByteOrder; |
677 int m_BlendType; | 677 int m_BlendType; |
678 }; | 678 }; |
679 | 679 |
680 #endif // CORE_FXGE_FX_DIB_H_ | 680 #endif // CORE_FXGE_FX_DIB_H_ |
OLD | NEW |