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/agg/fx_agg_driver.h" | 7 #include "core/fxge/agg/fx_agg_driver.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 } | 439 } |
440 | 440 |
441 CFX_AggDeviceDriver::~CFX_AggDeviceDriver() { | 441 CFX_AggDeviceDriver::~CFX_AggDeviceDriver() { |
442 DestroyPlatform(); | 442 DestroyPlatform(); |
443 } | 443 } |
444 | 444 |
445 uint8_t* CFX_AggDeviceDriver::GetBuffer() const { | 445 uint8_t* CFX_AggDeviceDriver::GetBuffer() const { |
446 return m_pBitmap->GetBuffer(); | 446 return m_pBitmap->GetBuffer(); |
447 } | 447 } |
448 | 448 |
449 const CFX_DIBitmap* CFX_AggDeviceDriver::GetBitmap() const { | |
450 return m_pBitmap; | |
451 } | |
452 | |
453 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ | 449 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ |
454 void CFX_AggDeviceDriver::InitPlatform() {} | 450 void CFX_AggDeviceDriver::InitPlatform() {} |
455 | 451 |
456 void CFX_AggDeviceDriver::DestroyPlatform() {} | 452 void CFX_AggDeviceDriver::DestroyPlatform() {} |
457 | 453 |
458 FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, | 454 FX_BOOL CFX_AggDeviceDriver::DrawDeviceText(int nChars, |
459 const FXTEXT_CHARPOS* pCharPos, | 455 const FXTEXT_CHARPOS* pCharPos, |
460 CFX_Font* pFont, | 456 CFX_Font* pFont, |
461 const CFX_Matrix* pObject2Device, | 457 const CFX_Matrix* pObject2Device, |
462 FX_FLOAT font_size, | 458 FX_FLOAT font_size, |
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 WrapUnique(new CFX_AggDeviceDriver(pBitmap, FALSE, pOriDevice, FALSE))); | 1755 WrapUnique(new CFX_AggDeviceDriver(pBitmap, FALSE, pOriDevice, FALSE))); |
1760 return true; | 1756 return true; |
1761 } | 1757 } |
1762 | 1758 |
1763 CFX_FxgeDevice::~CFX_FxgeDevice() { | 1759 CFX_FxgeDevice::~CFX_FxgeDevice() { |
1764 if (m_bOwnedBitmap) { | 1760 if (m_bOwnedBitmap) { |
1765 delete GetBitmap(); | 1761 delete GetBitmap(); |
1766 } | 1762 } |
1767 } | 1763 } |
1768 #endif | 1764 #endif |
OLD | NEW |