[Libreoffice-commits] core.git: 2 commits - vcl/quartz
Tor Lillqvist
tml at collabora.com
Sun Apr 6 23:33:59 PDT 2014
vcl/quartz/salgdicommon.cxx | 2 +-
vcl/quartz/salgdiutils.cxx | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
New commits:
commit 54687db04e3621f229d61cc690e7c065e24d0cfc
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Apr 4 18:45:33 2014 +0300
Add CG_TRACEs to this (OS X -only) file, too, for completeness
Change-Id: Ib97ca36821b00b40bdda68da6ca0b4b7f789386c
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index cd23413..c251203 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -29,6 +29,7 @@
#include "vcl/svapp.hxx"
#include "quartz/salgdi.h"
+#include "quartz/utils.h"
#include "osx/salframe.h"
#include "osx/saldata.hxx"
@@ -77,11 +78,13 @@ void AquaSalGraphics::UnsetState()
{
if( mrContext )
{
+ CG_TRACE( "CGContextRestoreGState(" << mrContext << ")" );
CGContextRestoreGState( mrContext );
mrContext = 0;
}
if( mxClipPath )
{
+ CG_TRACE( "CGPathRelease(" << mxClipPath << ")" );
CGPathRelease( mxClipPath );
mxClipPath = NULL;
}
@@ -115,19 +118,27 @@ bool AquaSalGraphics::CheckContext()
NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()];
CGContextRef xCGContext = reinterpret_cast<CGContextRef>([pNSGContext graphicsPort]);
mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, NULL );
+ CG_TRACE( "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer );
if( mxLayer )
+ {
mrContext = CGLayerGetContext( mxLayer );
+ CG_TRACE( "CGLayerGetContext(" << mxLayer << ") = " << mrContext );
+ }
if( mrContext )
{
// copy original layer to resized layer
if( rReleaseLayer )
+ {
+ CG_TRACE( "CGContextDrawLayerAtPoint(" << mrContext << "," << CGPointZero << "," << rReleaseLayer << ")" );
CGContextDrawLayerAtPoint( mrContext, CGPointZero, rReleaseLayer );
+ }
CGContextTranslateCTM( mrContext, 0, nHeight );
CGContextScaleCTM( mrContext, 1.0, -1.0 );
CGContextSetFillColorSpace( mrContext, GetSalData()->mxRGBSpace );
CGContextSetStrokeColorSpace( mrContext, GetSalData()->mxRGBSpace );
+ CG_TRACE( "CGContextSaveGState(" << mrContext << ") " << ++mnContextStackDepth );
CGContextSaveGState( mrContext );
SetState();
@@ -138,9 +149,15 @@ bool AquaSalGraphics::CheckContext()
}
if( rReleaseLayer )
+ {
+ CG_TRACE( "CGLayerRelease(" << rReleaseLayer << ")" );
CGLayerRelease( rReleaseLayer );
+ }
else if( rReleaseContext )
+ {
+ CG_TRACE( "CGContextRelease(" << rReleaseContext << ")" );
CGContextRelease( rReleaseContext );
+ }
}
DBG_ASSERT( mrContext || mbPrinter, "<<<WARNING>>> AquaSalGraphics::CheckContext() FAILED!!!!\n" );
@@ -181,17 +198,22 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
if( (mxLayer != NULL) && (pContext != NULL) )
{
CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]);
+ CG_TRACE( "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext );
CGMutablePathRef rClip = mpFrame->getClipPath();
if( rClip )
{
CGContextSaveGState( rCGContext );
+ CG_TRACE( "CGContextBeginPath(" << rCGContext << ")" );
CGContextBeginPath( rCGContext );
+ CG_TRACE( "CGContextAddPath(" << rCGContext << "," << rClip << ")" );
CGContextAddPath( rCGContext, rClip );
+ CG_TRACE( "CGContextClip(" << rCGContext << ")" );
CGContextClip( rCGContext );
}
ApplyXorContext();
+ CG_TRACE( "CGContextDrawLayerAtPoint(" << rCGContext << "," << CGPointZero << "," << mxLayer << ")" );
CGContextDrawLayerAtPoint( rCGContext, CGPointZero, mxLayer );
if( rClip ) // cleanup clipping
CGContextRestoreGState( rCGContext );
commit 89a8511b7a5f6cf730d7bef045017696648602d8
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Apr 3 16:55:09 2014 +0300
Typo
Change-Id: I89c00f13f28276c7d3d19fcb0a0d1f1ef64b2d60
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 33ee232..b4b6dad 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -904,7 +904,7 @@ bool AquaSalGraphics::drawPolyLine(
CGContextSetAlpha( mrContext, 1.0 - fTransparency );
CGContextSetLineJoin( mrContext, aCGLineJoin );
CGContextSetLineCap( mrContext, aCGLineCap );
- CG_TRACE( "CGContextSetLineWifth(" << mrContext << "," << rLineWidths.getX() << ")" );
+ CG_TRACE( "CGContextSetLineWidth(" << mrContext << "," << rLineWidths.getX() << ")" );
CGContextSetLineWidth( mrContext, rLineWidths.getX() );
CG_TRACE( "CGContextDrawPath(" << mrContext << ",kCGPathStroke)" );
CGContextDrawPath( mrContext, kCGPathStroke );
More information about the Libreoffice-commits
mailing list