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

Side by Side Diff: core/fxge/win32/fx_win32_print.cpp

Issue 2078783002: Move ifx_renderdevicedriver to a separate file to share (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase to master Created 4 years, 6 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/fxge/win32/fx_win32_device.cpp ('k') | core/fxge/win32/win32_int.h » ('j') | 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 #include "core/fxge/include/fx_ge.h" 7 #include "core/fxge/include/fx_ge.h"
8 8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
10 10
11 #include <windows.h> 11 #include <windows.h>
12 12
13 #include "core/fxge/dib/dib_int.h" 13 #include "core/fxge/dib/dib_int.h"
14 #include "core/fxge/ge/fx_text_int.h" 14 #include "core/fxge/ge/fx_text_int.h"
15 #include "core/fxge/include/fx_freetype.h" 15 #include "core/fxge/include/fx_freetype.h"
16 #include "core/fxge/include/fx_ge_win32.h" 16 #include "core/fxge/include/fx_ge_win32.h"
17 #include "core/fxge/win32/win32_int.h" 17 #include "core/fxge/win32/win32_int.h"
18 18
19 CGdiPrinterDriver::CGdiPrinterDriver(HDC hDC) 19 CGdiPrinterDriver::CGdiPrinterDriver(HDC hDC)
20 : CGdiDeviceDriver(hDC, FXDC_PRINTER), 20 : CGdiDeviceDriver(hDC, FXDC_PRINTER),
21 m_HorzSize(::GetDeviceCaps(m_hDC, HORZSIZE)), 21 m_HorzSize(::GetDeviceCaps(m_hDC, HORZSIZE)),
22 m_VertSize(::GetDeviceCaps(m_hDC, VERTSIZE)) {} 22 m_VertSize(::GetDeviceCaps(m_hDC, VERTSIZE)) {}
23 23
24 CGdiPrinterDriver::~CGdiPrinterDriver() {} 24 CGdiPrinterDriver::~CGdiPrinterDriver() {}
25 25
26 int CGdiPrinterDriver::GetDeviceCaps(int caps_id) { 26 int CGdiPrinterDriver::GetDeviceCaps(int caps_id) const {
27 if (caps_id == FXDC_HORZ_SIZE) 27 if (caps_id == FXDC_HORZ_SIZE)
28 return m_HorzSize; 28 return m_HorzSize;
29 if (caps_id == FXDC_VERT_SIZE) 29 if (caps_id == FXDC_VERT_SIZE)
30 return m_VertSize; 30 return m_VertSize;
31 return CGdiDeviceDriver::GetDeviceCaps(caps_id); 31 return CGdiDeviceDriver::GetDeviceCaps(caps_id);
32 } 32 }
33 33
34 FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource, 34 FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource,
35 uint32_t color, 35 uint32_t color,
36 const FX_RECT* pSrcRect, 36 const FX_RECT* pSrcRect,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return FALSE; 153 return FALSE;
154 154
155 return StretchDIBits(pTransformed.get(), color, full_rect.left, 155 return StretchDIBits(pTransformed.get(), color, full_rect.left,
156 full_rect.top, full_rect.Width(), full_rect.Height(), 156 full_rect.top, full_rect.Width(), full_rect.Height(),
157 nullptr, 0, blend_type); 157 nullptr, 0, blend_type);
158 } 158 }
159 return FALSE; 159 return FALSE;
160 } 160 }
161 161
162 #endif 162 #endif
OLDNEW
« no previous file with comments | « core/fxge/win32/fx_win32_device.cpp ('k') | core/fxge/win32/win32_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698