having ONE set of raster-ops starting from 10.5

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2012-06-13 17:13:05 +00:00
parent 8cc8979669
commit 3503581b33

View File

@@ -1846,8 +1846,8 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
if (m_composition == wxCOMPOSITION_DEST) if (m_composition == wxCOMPOSITION_DEST)
return true; return true;
#if wxOSX_USE_COCOA_OR_CARBON // TODO REMOVE if we don't need it because of bugs in 10.5
if ( UMAGetSystemVersion() < 0x1060 ) #if 0
{ {
CGCompositeOperation cop = kCGCompositeOperationSourceOver; CGCompositeOperation cop = kCGCompositeOperationSourceOver;
CGBlendMode mode = kCGBlendModeNormal; CGBlendMode mode = kCGBlendModeNormal;
@@ -1886,11 +1886,9 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
case wxCOMPOSITION_XOR: case wxCOMPOSITION_XOR:
cop = kCGCompositeOperationXOR; cop = kCGCompositeOperationXOR;
break; break;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
case wxCOMPOSITION_ADD: case wxCOMPOSITION_ADD:
mode = kCGBlendModePlusLighter ; mode = kCGBlendModePlusLighter ;
break; break;
#endif
default: default:
return false; return false;
} }
@@ -1900,8 +1898,6 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
CGContextSetBlendMode(m_cgContext, mode); CGContextSetBlendMode(m_cgContext, mode);
} }
#endif #endif
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
else
{ {
CGBlendMode mode = kCGBlendModeNormal; CGBlendMode mode = kCGBlendModeNormal;
switch( op ) switch( op )
@@ -1948,7 +1944,7 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
} }
CGContextSetBlendMode(m_cgContext, mode); CGContextSetBlendMode(m_cgContext, mode);
} }
#endif
CheckInvariants(); CheckInvariants();
return true; return true;
} }
@@ -2375,7 +2371,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
CGContextRestoreGState(m_cgContext); CGContextRestoreGState(m_cgContext);
CGContextSetTextMatrix(m_cgContext, textMatrix); CGContextSetTextMatrix(m_cgContext, textMatrix);
CFRelease( col ); CGColorRelease( col );
CheckInvariants(); CheckInvariants();
return; return;
} }