diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-05-15 16:35:40 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-05-18 08:38:23 +0200 |
commit | 1b1c750146b07bb760603a8d1d2ef0a3ae5d98c2 (patch) | |
tree | a4c82b8f3a639af0342f06abddbeb14da039d06c /vcl/quartz | |
parent | 356dd5430ac928b87aed714d7c8ef92a9b4a6b19 (diff) |
macOS: store VirtualDevice size in an instance variable
Change-Id: Id0a7317e9aed4b0222affb7292f6a3a44af74040
Reviewed-on: https://gerrit.libreoffice.org/72438
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/salvd.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 0fe4e7f923d3..a08345dfd1c1 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -68,6 +68,8 @@ AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long &nDX , mxBitmapContext( nullptr ) , mnBitmapDepth( 0 ) , mxLayer( nullptr ) + , mnWidth(0) + , mnHeight(0) { SAL_INFO( "vcl.virdev", "AquaSalVirtualDevice::AquaSalVirtualDevice() this=" << this << " size=(" << nDX << "x" << nDY << ") bitcount=" << static_cast<int>(eFormat) << @@ -228,6 +230,9 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) Destroy(); + mnWidth = nDX; + mnHeight = nDY; + // create a Quartz layer matching to the intended virdev usage CGContextRef xCGContext = nullptr; if( mnBitmapDepth && (mnBitmapDepth < 16) ) @@ -305,16 +310,4 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) return (mxLayer != nullptr); } -long AquaSalVirtualDevice::GetWidth() const -{ - const CGSize aSize = CGLayerGetSize( mxLayer ); - return aSize.width; -} - -long AquaSalVirtualDevice::GetHeight() const -{ - const CGSize aSize = CGLayerGetSize( mxLayer ); - return aSize.height; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |