| 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 #include "core/fxge/include/ifx_renderdevicedriver.h" | 8 #include "core/fxge/include/ifx_renderdevicedriver.h" |
| 9 | 9 |
| 10 #if defined _SKIA_SUPPORT_ | 10 #if defined _SKIA_SUPPORT_ |
| 11 #include "third_party/skia/include/core/SkTypes.h" | 11 #include "third_party/skia/include/core/SkTypes.h" |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 CFX_RenderDevice::CFX_RenderDevice() | 14 CFX_RenderDevice::CFX_RenderDevice() |
| 15 : m_pBitmap(nullptr), | 15 : m_pBitmap(nullptr), |
| 16 m_Width(0), | 16 m_Width(0), |
| 17 m_Height(0), | 17 m_Height(0), |
| 18 m_bpp(0), | 18 m_bpp(0), |
| 19 m_RenderCaps(0), | 19 m_RenderCaps(0), |
| 20 m_DeviceClass(0) {} | 20 m_DeviceClass(0) {} |
| 21 | 21 |
| 22 CFX_RenderDevice::~CFX_RenderDevice() {} | 22 CFX_RenderDevice::~CFX_RenderDevice() {} |
| 23 | 23 |
| 24 #ifdef _SKIA_SUPPORT_ |
| 25 void CFX_RenderDevice::Flush() { |
| 26 m_pDeviceDriver.reset(); |
| 27 } |
| 28 #endif |
| 29 |
| 24 void CFX_RenderDevice::SetDeviceDriver( | 30 void CFX_RenderDevice::SetDeviceDriver( |
| 25 std::unique_ptr<IFX_RenderDeviceDriver> pDriver) { | 31 std::unique_ptr<IFX_RenderDeviceDriver> pDriver) { |
| 26 m_pDeviceDriver = std::move(pDriver); | 32 m_pDeviceDriver = std::move(pDriver); |
| 27 InitDeviceInfo(); | 33 InitDeviceInfo(); |
| 28 } | 34 } |
| 29 | 35 |
| 30 void CFX_RenderDevice::InitDeviceInfo() { | 36 void CFX_RenderDevice::InitDeviceInfo() { |
| 31 m_Width = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_WIDTH); | 37 m_Width = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_WIDTH); |
| 32 m_Height = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_HEIGHT); | 38 m_Height = m_pDeviceDriver->GetDeviceCaps(FXDC_PIXEL_HEIGHT); |
| 33 m_bpp = m_pDeviceDriver->GetDeviceCaps(FXDC_BITS_PIXEL); | 39 m_bpp = m_pDeviceDriver->GetDeviceCaps(FXDC_BITS_PIXEL); |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 void CFX_RenderDevice::CancelDIBits(void* handle) { | 487 void CFX_RenderDevice::CancelDIBits(void* handle) { |
| 482 m_pDeviceDriver->CancelDIBits(handle); | 488 m_pDeviceDriver->CancelDIBits(handle); |
| 483 } | 489 } |
| 484 | 490 |
| 485 #ifdef _SKIA_SUPPORT_ | 491 #ifdef _SKIA_SUPPORT_ |
| 486 | 492 |
| 487 void CFX_RenderDevice::DebugVerifyBitmapIsPreMultiplied() const { | 493 void CFX_RenderDevice::DebugVerifyBitmapIsPreMultiplied() const { |
| 488 SkASSERT(0); | 494 SkASSERT(0); |
| 489 } | 495 } |
| 490 #endif | 496 #endif |
| OLD | NEW |