summaryrefslogtreecommitdiff
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 18:39:01 +0200
commitb4fbe662d02366c38bb7660f25a8d2076ad34d69 (patch)
treebae6e2699fe7fac26cbfb21a4b5ff08727d241f0
parent645a33037116164eec7d2840a837d51f1f6abc5b (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
-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 09b092d8c21b..4662fb616c6e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2349,11 +2349,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
@@ -3891,6 +3895,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);
@@ -3910,6 +3916,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