| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 if (bitmap.HasAlpha()) { | 254 if (bitmap.HasAlpha()) { |
| 255 bitmap.Clear(0); | 255 bitmap.Clear(0); |
| 256 Backdrop.Copy(&bitmap); | 256 Backdrop.Copy(&bitmap); |
| 257 } else { | 257 } else { |
| 258 if (!m_pDeviceDriver->GetDIBits(&bitmap, rect.left, rect.top, NULL)) { | 258 if (!m_pDeviceDriver->GetDIBits(&bitmap, rect.left, rect.top, NULL)) { |
| 259 return FALSE; | 259 return FALSE; |
| 260 } | 260 } |
| 261 Backdrop.Copy(&bitmap); | 261 Backdrop.Copy(&bitmap); |
| 262 } | 262 } |
| 263 CFX_FxgeDevice bitmap_device; | 263 CFX_FxgeDevice bitmap_device; |
| 264 bitmap_device.Attach(&bitmap, 0, FALSE, &Backdrop, TRUE); | 264 bitmap_device.Attach(&bitmap, false, &Backdrop, true); |
| 265 CFX_Matrix matrix; | 265 CFX_Matrix matrix; |
| 266 if (pObject2Device) { | 266 if (pObject2Device) { |
| 267 matrix = *pObject2Device; | 267 matrix = *pObject2Device; |
| 268 } | 268 } |
| 269 matrix.TranslateI(-rect.left, -rect.top); | 269 matrix.TranslateI(-rect.left, -rect.top); |
| 270 matrix.Concat(fScaleX, 0, 0, fScaleY, 0, 0); | 270 matrix.Concat(fScaleX, 0, 0, fScaleY, 0, 0); |
| 271 if (!bitmap_device.GetDeviceDriver()->DrawPath( | 271 if (!bitmap_device.GetDeviceDriver()->DrawPath( |
| 272 pPathData, &matrix, pGraphState, fill_color, stroke_color, | 272 pPathData, &matrix, pGraphState, fill_color, stroke_color, |
| 273 fill_mode, 0, nullptr, blend_type)) { | 273 fill_mode, 0, nullptr, blend_type)) { |
| 274 return FALSE; | 274 return FALSE; |
| (...skipping 174 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 |