| 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 CFX_RenderDevice::CFX_RenderDevice() { | 9 CFX_RenderDevice::CFX_RenderDevice() { |
| 10 m_pDeviceDriver = NULL; | 10 m_pDeviceDriver = NULL; |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 381 } |
| 382 if (!m_pDeviceDriver->GetDIBits(&background, dest_rect.left, | 382 if (!m_pDeviceDriver->GetDIBits(&background, dest_rect.left, |
| 383 dest_rect.top)) { | 383 dest_rect.top)) { |
| 384 return FALSE; | 384 return FALSE; |
| 385 } | 385 } |
| 386 if (!background.CompositeBitmap(0, 0, bg_pixel_width, bg_pixel_height, | 386 if (!background.CompositeBitmap(0, 0, bg_pixel_width, bg_pixel_height, |
| 387 pBitmap, src_rect.left, src_rect.top, | 387 pBitmap, src_rect.left, src_rect.top, |
| 388 blend_mode, nullptr, FALSE, nullptr)) { | 388 blend_mode, nullptr, FALSE, nullptr)) { |
| 389 return FALSE; | 389 return FALSE; |
| 390 } | 390 } |
| 391 FX_RECT src_rect(0, 0, bg_pixel_width, bg_pixel_height); | 391 FX_RECT rect(0, 0, bg_pixel_width, bg_pixel_height); |
| 392 return m_pDeviceDriver->SetDIBits(&background, 0, &src_rect, dest_rect.left, | 392 return m_pDeviceDriver->SetDIBits(&background, 0, &rect, dest_rect.left, |
| 393 dest_rect.top, FXDIB_BLEND_NORMAL); | 393 dest_rect.top, FXDIB_BLEND_NORMAL); |
| 394 } | 394 } |
| 395 return m_pDeviceDriver->SetDIBits(pBitmap, 0, &src_rect, dest_rect.left, | 395 return m_pDeviceDriver->SetDIBits(pBitmap, 0, &src_rect, dest_rect.left, |
| 396 dest_rect.top, blend_mode, 0, nullptr); | 396 dest_rect.top, blend_mode, 0, nullptr); |
| 397 } | 397 } |
| 398 | 398 |
| 399 FX_BOOL CFX_RenderDevice::StretchDIBitsWithFlagsAndBlend( | 399 FX_BOOL CFX_RenderDevice::StretchDIBitsWithFlagsAndBlend( |
| 400 const CFX_DIBSource* pBitmap, | 400 const CFX_DIBSource* pBitmap, |
| 401 int left, | 401 int left, |
| 402 int top, | 402 int top, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 flags, handle, 0, nullptr, blend_mode); | 449 flags, handle, 0, nullptr, blend_mode); |
| 450 } | 450 } |
| 451 | 451 |
| 452 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { | 452 FX_BOOL CFX_RenderDevice::ContinueDIBits(void* handle, IFX_Pause* pPause) { |
| 453 return m_pDeviceDriver->ContinueDIBits(handle, pPause); | 453 return m_pDeviceDriver->ContinueDIBits(handle, pPause); |
| 454 } | 454 } |
| 455 | 455 |
| 456 void CFX_RenderDevice::CancelDIBits(void* handle) { | 456 void CFX_RenderDevice::CancelDIBits(void* handle) { |
| 457 m_pDeviceDriver->CancelDIBits(handle); | 457 m_pDeviceDriver->CancelDIBits(handle); |
| 458 } | 458 } |
| OLD | NEW |