diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-03-31 21:05:09 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-03-31 21:09:07 +0300 |
commit | 9c87596c8a0123076249c7bd59eaaa41497b48fc (patch) | |
tree | eeb231b8a97d6cc72076550bbfefab6237a7eea8 /vcl/inc/quartz | |
parent | 3fec64a87f3b611c13a10c6dd84de0cf9c7c35b5 (diff) |
Add SAL_INFOs for very detailed CoreGraphics tracing
One would think there would exist some kind of shim library that would
automatically provide such traces, hmm.
Change-Id: I568d02a2ac70078dee0280d1feb3eab7bbd43030
Diffstat (limited to 'vcl/inc/quartz')
-rw-r--r-- | vcl/inc/quartz/salgdi.h | 3 | ||||
-rw-r--r-- | vcl/inc/quartz/salgdicommon.hxx | 12 | ||||
-rw-r--r-- | vcl/inc/quartz/utils.h | 9 |
3 files changed, 21 insertions, 3 deletions
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 0653484223c3..c009c56e388b 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -158,6 +158,9 @@ protected: AquaSalFrame* mpFrame; CGLayerRef mxLayer; // Quartz graphics layer CGContextRef mrContext; // Quartz drawing context +#if OSL_DEBUG_LEVEL > 0 + int mnContextStackDepth; +#endif class XorEmulation* mpXorEmulation; int mnXorMode; // 0: off 1: on 2: invert only int mnWidth; diff --git a/vcl/inc/quartz/salgdicommon.hxx b/vcl/inc/quartz/salgdicommon.hxx index 425010324e72..b0d9a2fdea7c 100644 --- a/vcl/inc/quartz/salgdicommon.hxx +++ b/vcl/inc/quartz/salgdicommon.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_VCL_INC_QUARTZ_SALGDICOMMON_HXX #define INCLUDED_VCL_INC_QUARTZ_SALGDICOMMON_HXX +#include <iostream> + #include <premac.h> #ifdef IOS #include <CoreGraphics/CoreGraphics.h> @@ -64,6 +66,16 @@ inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha m_fRGBA[3] = fAlpha; } +inline std::ostream &operator <<(std::ostream& s, const RGBAColor &aColor) +{ +#ifndef SAL_LOG_INFO + (void) aColor; +#else + s << "{" << aColor.GetRed() << "," << aColor.GetGreen() << "," << aColor.GetBlue() << "," << aColor.GetAlpha() << "}"; +#endif + return s; +} + // XOR emulation suckage. // See http://www.openoffice.org/marketing/ooocon2008/programme/wednesday_1401.pdf // and https://bugs.freedesktop.org/show_bug.cgi?id=38844 . diff --git a/vcl/inc/quartz/utils.h b/vcl/inc/quartz/utils.h index fe81c1d49fdf..e408250da167 100644 --- a/vcl/inc/quartz/utils.h +++ b/vcl/inc/quartz/utils.h @@ -39,10 +39,13 @@ OUString GetOUString( NSString* ); CFStringRef CreateCFString( const OUString& ); NSString* CreateNSString( const OUString& ); -std::ostream &operator <<(std::ostream& s, CGRect &rRect); -std::ostream &operator <<(std::ostream& s, CGPoint &rPoint); -std::ostream &operator <<(std::ostream& s, CGSize &rSize); +std::ostream &operator <<(std::ostream& s, const CGRect &rRect); +std::ostream &operator <<(std::ostream& s, const CGPoint &rPoint); +std::ostream &operator <<(std::ostream& s, const CGSize &rSize); std::ostream &operator <<(std::ostream& s, CGColorRef pSize); +std::ostream &operator <<(std::ostream& s, const CGAffineTransform &aXform); + +#define CG_TRACE( e ) SAL_INFO( "vcl.cg", e ) #endif // INCLUDED_VCL_INC_QUARTZ_UTILS_H |