summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdi.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-05-15 16:48:20 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-05-18 08:49:17 +0200
commitca2aa30771039bc0dc5cec9050f4e70a3b629e19 (patch)
treececf042c0942b6086f9813c82912bc8281d8f899 /vcl/quartz/salgdi.cxx
parent1b1c750146b07bb760603a8d1d2ef0a3ae5d98c2 (diff)
Wrap CGLayer into a CGLayerHolder class and move code to use it
Change-Id: I52539f6582d099ef80048d9a25266c88e1f6d783 Reviewed-on: https://gerrit.libreoffice.org/72439 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/quartz/salgdi.cxx')
-rw-r--r--vcl/quartz/salgdi.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index a68f9e9736ef..846b7abbbc49 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -181,11 +181,7 @@ bool CoreTextFontFace::GetFontCapabilities(vcl::FontCapabilities &rFontCapabilit
}
AquaSalGraphics::AquaSalGraphics()
- : mxLayer( nullptr )
-#ifdef MACOSX
- , mpFrame( nullptr )
-#endif
- , mpXorEmulation( nullptr )
+ : mpXorEmulation( nullptr )
, mnXorMode( 0 )
, mnWidth( 0 )
, mnHeight( 0 )
@@ -197,6 +193,9 @@ AquaSalGraphics::AquaSalGraphics()
, maFillColor( COL_BLACK )
, maTextColor( COL_BLACK )
, mbNonAntialiasedText( false )
+#ifdef MACOSX
+ , mpFrame( nullptr )
+#endif
, mbPrinter( false )
, mbVirDev( false )
#ifdef MACOSX
@@ -238,10 +237,10 @@ AquaSalGraphics::~AquaSalGraphics()
if (mbForeignContext)
return;
#endif
- if( mxLayer )
+ if (maLayer.isSet())
{
- SAL_INFO("vcl.cg", "CGLayerRelease(" << mxLayer << ")" );
- CGLayerRelease( mxLayer );
+ SAL_INFO("vcl.cg", "CGLayerRelease(" << maLayer.get() << ")" );
+ CGLayerRelease(maLayer.get());
}
else if (maContextHolder.isSet()
#ifdef MACOSX