| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/cfx_renderdevice.h" | 7 #include "core/fxge/include/cfx_renderdevice.h" |
| 8 | 8 |
| 9 #include "core/fxcrt/include/fx_safe_types.h" | 9 #include "core/fxcrt/include/fx_safe_types.h" |
| 10 #include "core/fxge/include/cfx_autofontcache.h" | 10 #include "core/fxge/include/cfx_autofontcache.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 m_RenderCaps = m_pDeviceDriver->GetDeviceCaps(FXDC_RENDER_CAPS); | 372 m_RenderCaps = m_pDeviceDriver->GetDeviceCaps(FXDC_RENDER_CAPS); |
| 373 m_DeviceClass = m_pDeviceDriver->GetDeviceCaps(FXDC_DEVICE_CLASS); | 373 m_DeviceClass = m_pDeviceDriver->GetDeviceCaps(FXDC_DEVICE_CLASS); |
| 374 if (!m_pDeviceDriver->GetClipBox(&m_ClipBox)) { | 374 if (!m_pDeviceDriver->GetClipBox(&m_ClipBox)) { |
| 375 m_ClipBox.left = 0; | 375 m_ClipBox.left = 0; |
| 376 m_ClipBox.top = 0; | 376 m_ClipBox.top = 0; |
| 377 m_ClipBox.right = m_Width; | 377 m_ClipBox.right = m_Width; |
| 378 m_ClipBox.bottom = m_Height; | 378 m_ClipBox.bottom = m_Height; |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 FX_BOOL CFX_RenderDevice::StartRendering() { | |
| 383 return m_pDeviceDriver->StartRendering(); | |
| 384 } | |
| 385 | |
| 386 void CFX_RenderDevice::EndRendering() { | |
| 387 m_pDeviceDriver->EndRendering(); | |
| 388 } | |
| 389 | |
| 390 void CFX_RenderDevice::SaveState() { | 382 void CFX_RenderDevice::SaveState() { |
| 391 m_pDeviceDriver->SaveState(); | 383 m_pDeviceDriver->SaveState(); |
| 392 } | 384 } |
| 393 | 385 |
| 394 void CFX_RenderDevice::RestoreState(bool bKeepSaved) { | 386 void CFX_RenderDevice::RestoreState(bool bKeepSaved) { |
| 395 m_pDeviceDriver->RestoreState(bKeepSaved); | 387 m_pDeviceDriver->RestoreState(bKeepSaved); |
| 396 UpdateClipBox(); | 388 UpdateClipBox(); |
| 397 } | 389 } |
| 398 | 390 |
| 399 int CFX_RenderDevice::GetDeviceCaps(int caps_id) const { | 391 int CFX_RenderDevice::GetDeviceCaps(int caps_id) const { |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 fill_color, stroke_color, fill_mode, | 1088 fill_color, stroke_color, fill_mode, |
| 1097 FXDIB_BLEND_NORMAL)) { | 1089 FXDIB_BLEND_NORMAL)) { |
| 1098 return FALSE; | 1090 return FALSE; |
| 1099 } | 1091 } |
| 1100 } | 1092 } |
| 1101 if (pClippingPath) | 1093 if (pClippingPath) |
| 1102 pClippingPath->Append(&TransformedPath, pUser2Device); | 1094 pClippingPath->Append(&TransformedPath, pUser2Device); |
| 1103 } | 1095 } |
| 1104 return TRUE; | 1096 return TRUE; |
| 1105 } | 1097 } |
| OLD | NEW |