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 #include "core/fxge/include/fx_ge.h" | 7 #include "core/fxge/include/fx_ge.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 } | 748 } |
749 if (m_DeviceClass != FXDC_DISPLAY) { | 749 if (m_DeviceClass != FXDC_DISPLAY) { |
750 m_RenderCaps = FXRC_BIT_MASK; | 750 m_RenderCaps = FXRC_BIT_MASK; |
751 } else { | 751 } else { |
752 m_RenderCaps = FXRC_GET_BITS | FXRC_BIT_MASK; | 752 m_RenderCaps = FXRC_GET_BITS | FXRC_BIT_MASK; |
753 } | 753 } |
754 } | 754 } |
755 | 755 |
756 CGdiDeviceDriver::~CGdiDeviceDriver() {} | 756 CGdiDeviceDriver::~CGdiDeviceDriver() {} |
757 | 757 |
758 int CGdiDeviceDriver::GetDeviceCaps(int caps_id) { | 758 int CGdiDeviceDriver::GetDeviceCaps(int caps_id) const { |
759 switch (caps_id) { | 759 switch (caps_id) { |
760 case FXDC_DEVICE_CLASS: | 760 case FXDC_DEVICE_CLASS: |
761 return m_DeviceClass; | 761 return m_DeviceClass; |
762 case FXDC_PIXEL_WIDTH: | 762 case FXDC_PIXEL_WIDTH: |
763 return m_Width; | 763 return m_Width; |
764 case FXDC_PIXEL_HEIGHT: | 764 case FXDC_PIXEL_HEIGHT: |
765 return m_Height; | 765 return m_Height; |
766 case FXDC_BITS_PIXEL: | 766 case FXDC_BITS_PIXEL: |
767 return m_nBitsPerPixel; | 767 return m_nBitsPerPixel; |
768 case FXDC_RENDER_CAPS: | 768 case FXDC_RENDER_CAPS: |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 if (m_hDC) { | 1429 if (m_hDC) { |
1430 SelectObject(m_hDC, m_hOldBitmap); | 1430 SelectObject(m_hDC, m_hOldBitmap); |
1431 DeleteDC(m_hDC); | 1431 DeleteDC(m_hDC); |
1432 } | 1432 } |
1433 if (m_hBitmap) | 1433 if (m_hBitmap) |
1434 DeleteObject(m_hBitmap); | 1434 DeleteObject(m_hBitmap); |
1435 delete GetBitmap(); | 1435 delete GetBitmap(); |
1436 } | 1436 } |
1437 | 1437 |
1438 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ | 1438 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ |
OLD | NEW |