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

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

Issue 2281683002: Rework CFX_CountRef in terms of CFX_RetainPtr (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add test that GetModify() may construct a duplicate Created 4 years, 3 months 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/fxcrt/include/fx_basic.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_INCLUDE_FX_DIB_H_ 7 #ifndef CORE_FXGE_INCLUDE_FX_DIB_H_
8 #define CORE_FXGE_INCLUDE_FX_DIB_H_ 8 #define CORE_FXGE_INCLUDE_FX_DIB_H_
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "core/fxcrt/include/cfx_count_ref.h"
13 #include "core/fxcrt/include/fx_basic.h" 14 #include "core/fxcrt/include/fx_basic.h"
14 #include "core/fxcrt/include/fx_coordinates.h" 15 #include "core/fxcrt/include/fx_coordinates.h"
15 16
16 enum FXDIB_Format { 17 enum FXDIB_Format {
17 FXDIB_Invalid = 0, 18 FXDIB_Invalid = 0,
18 FXDIB_1bppMask = 0x101, 19 FXDIB_1bppMask = 0x101,
19 FXDIB_1bppRgb = 0x001, 20 FXDIB_1bppRgb = 0x001,
20 FXDIB_1bppCmyk = 0x401, 21 FXDIB_1bppCmyk = 0x401,
21 FXDIB_8bppMask = 0x108, 22 FXDIB_8bppMask = 0x108,
22 FXDIB_8bppRgb = 0x008, 23 FXDIB_8bppRgb = 0x008,
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc); 383 explicit CFX_DIBExtractor(const CFX_DIBSource* pSrc);
383 ~CFX_DIBExtractor(); 384 ~CFX_DIBExtractor();
384 385
385 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); } 386 CFX_DIBitmap* GetBitmap() { return m_pBitmap.get(); }
386 387
387 private: 388 private:
388 std::unique_ptr<CFX_DIBitmap> m_pBitmap; 389 std::unique_ptr<CFX_DIBitmap> m_pBitmap;
389 }; 390 };
390 391
391 typedef CFX_CountRef<CFX_DIBitmap> CFX_DIBitmapRef; 392 typedef CFX_CountRef<CFX_DIBitmap> CFX_DIBitmapRef;
393
392 class CFX_FilteredDIB : public CFX_DIBSource { 394 class CFX_FilteredDIB : public CFX_DIBSource {
393 public: 395 public:
394 CFX_FilteredDIB(); 396 CFX_FilteredDIB();
395 ~CFX_FilteredDIB() override; 397 ~CFX_FilteredDIB() override;
396 398
397 void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE); 399 void LoadSrc(const CFX_DIBSource* pSrc, FX_BOOL bAutoDropSrc = FALSE);
398 400
399 virtual FXDIB_Format GetDestFormat() = 0; 401 virtual FXDIB_Format GetDestFormat() = 0;
400 402
401 virtual uint32_t* GetDestPalette() = 0; 403 virtual uint32_t* GetDestPalette() = 0;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 int m_Status; 671 int m_Status;
670 FX_RECT m_ClipBox; 672 FX_RECT m_ClipBox;
671 uint32_t m_Flags; 673 uint32_t m_Flags;
672 int m_AlphaFlag; 674 int m_AlphaFlag;
673 void* m_pIccTransform; 675 void* m_pIccTransform;
674 FX_BOOL m_bRgbByteOrder; 676 FX_BOOL m_bRgbByteOrder;
675 int m_BlendType; 677 int m_BlendType;
676 }; 678 };
677 679
678 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_ 680 #endif // CORE_FXGE_INCLUDE_FX_DIB_H_
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_basic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698