summaryrefslogtreecommitdiff
path: root/desktop/source/lib
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-03-15 16:56:45 +0200
committerTor Lillqvist <tml@collabora.com>2019-03-15 17:11:01 +0200
commit8a244ee9b43dce6bdcd930473586a2d8452dfb12 (patch)
treede4a2102c45277c57127d14e8bf95a8673ff7fd8 /desktop/source/lib
parent9da36e5362324509e47bc9ae93d31fc3250f96c0 (diff)
tdf#124042: Add SAL_INFOs for iOS about the CGContext life cycle in LOKit
Use the same logging tag as in vcl for uniformity. Helps in tracing the life cycle and usage of CGContexts. Change-Id: I89c33ac63fa26e10a8866c2aacecce89ef9b5f6b
Diffstat (limited to 'desktop/source/lib')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 88970631ce48..d79d086b66f9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2380,11 +2380,15 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
#if defined(IOS)
CGContextRef cgc = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, nCanvasWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little);
+ // Use the vcl.cg tag even if this code is not in vcl, to match all other SAL_INFO logging about Core Graphics, in vcl.
+ SAL_INFO( "vcl.cg", "CGBitmapContextCreate(" << nCanvasWidth << "x" << nCanvasHeight << "x32) = " << cgc );
+
CGContextTranslateCTM(cgc, 0, nCanvasHeight);
CGContextScaleCTM(cgc, fDPIScaleX, -fDPIScaleX);
doc_paintTileToCGContext(pThis, (void*) cgc, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+ SAL_INFO( "vcl.cg", "CGContextRelease(" << cgc << ")" );
CGContextRelease(cgc);
#else
ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::DEFAULT) ;
@@ -3968,6 +3972,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
CGContextRef cgc = CGBitmapContextCreate(pBuffer, nWidth, nHeight, 8, nWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little);
+ SAL_INFO( "vcl.cg", "CGBitmapContextCreate(" << nWidth << "x" << nHeight << "x32) = " << cgc);
+
CGContextTranslateCTM(cgc, 0, nHeight);
CGContextScaleCTM(cgc, fDPIScale, -fDPIScale);
@@ -3987,6 +3993,7 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size());
comphelper::LibreOfficeKit::setDialogPainting(false);
+ SAL_INFO( "vcl.cg", "CGContextRelease(" << cgc << ")" );
CGContextRelease(cgc);
#else