desktop/source/lib/init.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit b4fbe662d02366c38bb7660f25a8d2076ad34d69
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Fri Mar 15 16:56:45 2019 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Fri Mar 15 18:39:01 2019 +0200

    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

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to