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

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

Issue 2149903002: Use smart pointers for various Jbig2 decoding contexts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address more comments Created 4 years, 5 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
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_GE_WIN32_H_ 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_WIN32_H_
8 #define CORE_FXGE_INCLUDE_FX_GE_WIN32_H_ 8 #define CORE_FXGE_INCLUDE_FX_GE_WIN32_H_
9 9
10 #ifdef _WIN32 10 #ifdef _WIN32
(...skipping 16 matching lines...) Expand all
27 } WINDIB_Open_Args_; 27 } WINDIB_Open_Args_;
28 28
29 class CFX_WindowsDIB : public CFX_DIBitmap { 29 class CFX_WindowsDIB : public CFX_DIBitmap {
30 public: 30 public:
31 CFX_WindowsDIB(HDC hDC, int width, int height); 31 CFX_WindowsDIB(HDC hDC, int width, int height);
32 ~CFX_WindowsDIB() override; 32 ~CFX_WindowsDIB() override;
33 33
34 static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap); 34 static CFX_ByteString GetBitmapInfo(const CFX_DIBitmap* pBitmap);
35 static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData); 35 static CFX_DIBitmap* LoadFromBuf(BITMAPINFO* pbmi, void* pData);
36 static HBITMAP GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC); 36 static HBITMAP GetDDBitmap(const CFX_DIBitmap* pBitmap, HDC hDC);
37 static CFX_DIBitmap* LoadFromDDB(HDC hDC,
38 HBITMAP hBitmap,
39 uint32_t* pPalette = nullptr,
40 uint32_t size = 256);
41 static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename); 37 static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename);
42 static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename); 38 static CFX_DIBitmap* LoadFromFile(const FX_CHAR* filename);
43 static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args); 39 static CFX_DIBitmap* LoadDIBitmap(WINDIB_Open_Args_ args);
44 40
45 HDC GetDC() const { return m_hMemDC; } 41 HDC GetDC() const { return m_hMemDC; }
46 HBITMAP GetWindowsBitmap() const { return m_hBitmap; } 42 HBITMAP GetWindowsBitmap() const { return m_hBitmap; }
47 43
48 void LoadFromDevice(HDC hDC, int left, int top); 44 void LoadFromDevice(HDC hDC, int left, int top);
49 void SetToDevice(HDC hDC, int left, int top); 45 void SetToDevice(HDC hDC, int left, int top);
50 46
(...skipping 23 matching lines...) Expand all
74 protected: 70 protected:
75 HBITMAP m_hBitmap; 71 HBITMAP m_hBitmap;
76 72
77 HBITMAP m_hOldBitmap; 73 HBITMAP m_hOldBitmap;
78 74
79 HDC m_hDC; 75 HDC m_hDC;
80 }; 76 };
81 #endif 77 #endif
82 78
83 #endif // CORE_FXGE_INCLUDE_FX_GE_WIN32_H_ 79 #endif // CORE_FXGE_INCLUDE_FX_GE_WIN32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698