diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-12-11 20:12:18 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-12-11 20:34:28 +0200 |
commit | 311490855235a85bceb05e6009d3c37f79b3bc2a (patch) | |
tree | 0836015062f4b3b225e5248fbac2d2297cf0c176 /vcl/osx/salinst.cxx | |
parent | e760ee23a41e7ca64b8a38866d3eb231ad854ec1 (diff) |
Do as the docs say: Use the CGContext property instead of graphicsPort
The graphicsPort property of NSGraphicsContext is deprecated in 10.14.
CGContext is there since 10.10 so we can use it unconditionally.
But sadly this did not enable me to un-comment the assert() a few
lines below.
Wonder if this deprecation is just a cleanup of the API, and
functionality-wise the CGContext property is exactly the same as
graphicsPort?
Change-Id: I2d5d0c766c343faa2d8cabea3a0729ce5b3a34e3
Diffstat (limited to 'vcl/osx/salinst.cxx')
-rw-r--r-- | vcl/osx/salinst.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index f58f0e43e893..6c2ca65c3050 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -950,9 +950,7 @@ NSImage* CreateNSImage( const Image& rImage ) { [pImage lockFocusFlipped:YES]; NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; -SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14 - CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); -SAL_WNODEPRECATED_DECLARATIONS_POP + CGContextRef rCGContext = [pContext CGContext]; const CGRect aDstRect = { {0, 0}, { static_cast<CGFloat>(aSize.Width()), static_cast<CGFloat>(aSize.Height()) } }; CGContextDrawImage( rCGContext, aDstRect, xImage ); |