Kaydet (Commit) b4fbe662 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 645a3303
...@@ -2349,11 +2349,15 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, ...@@ -2349,11 +2349,15 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
#if defined(IOS) #if defined(IOS)
CGContextRef cgc = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, nCanvasWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little); 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); CGContextTranslateCTM(cgc, 0, nCanvasHeight);
CGContextScaleCTM(cgc, fDPIScaleX, -fDPIScaleX); CGContextScaleCTM(cgc, fDPIScaleX, -fDPIScaleX);
doc_paintTileToCGContext(pThis, (void*) cgc, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); doc_paintTileToCGContext(pThis, (void*) cgc, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
SAL_INFO( "vcl.cg", "CGContextRelease(" << cgc << ")" );
CGContextRelease(cgc); CGContextRelease(cgc);
#else #else
...@@ -3891,6 +3895,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW ...@@ -3891,6 +3895,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
CGContextRef cgc = CGBitmapContextCreate(pBuffer, nWidth, nHeight, 8, nWidth*4, CGColorSpaceCreateDeviceRGB(), kCGImageAlphaNoneSkipFirst | kCGImageByteOrder32Little); 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); CGContextTranslateCTM(cgc, 0, nHeight);
CGContextScaleCTM(cgc, fDPIScale, -fDPIScale); CGContextScaleCTM(cgc, fDPIScale, -fDPIScale);
...@@ -3910,6 +3916,7 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW ...@@ -3910,6 +3916,7 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size()); pWindow->PaintToDevice(pDevice.get(), Point(0, 0), Size());
comphelper::LibreOfficeKit::setDialogPainting(false); comphelper::LibreOfficeKit::setDialogPainting(false);
SAL_INFO( "vcl.cg", "CGContextRelease(" << cgc << ")" );
CGContextRelease(cgc); CGContextRelease(cgc);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment