]> git.saurik.com Git - wxWidgets.git/commitdiff
switching to explicit flush mode, otherwise clientdc destruction lead to contention...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 24 Oct 2009 19:22:40 +0000 (19:22 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 24 Oct 2009 19:22:40 +0000 (19:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcgraph.cpp
src/osx/carbon/dcclient.cpp
src/osx/carbon/graphics.cpp

index 94a541d21cfe131f1b876f9df4d0c602cb5a2d1f..6a63c43f98be2c7e5fe7055d062bc387c97f4017 100644 (file)
@@ -265,9 +265,7 @@ void wxGCDCImpl::EndPage()
 
 void wxGCDCImpl::Flush()
 {
-#ifdef __WXOSX_OR_COCOA__
-    CGContextFlush( (CGContextRef) m_graphicContext->GetNativeContext() );
-#endif
+    m_graphicContext->Flush();
 }
 
 void wxGCDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h )
index 663640741cd7e5b2c27f969977f85ff032f9954e..0a257909e71eb0b9c7c99d9a72d68406e2d5ef86 100644 (file)
@@ -181,6 +181,10 @@ wxPaintDCImpl::wxPaintDCImpl( wxDC *owner, wxWindow *window ) :
     wxPoint origin = window->GetClientAreaOrigin() ;
     m_window->GetClientSize( &m_width , &m_height);
     SetDeviceOrigin( origin.x, origin.y );
+#ifdef __WXOSX_IPHONE__
+    m_graphicContext->ResetClip();
+    m_clipping = false;
+#endif
     DoSetClippingRegion( 0 , 0 , m_width , m_height ) ;
 }
 
index 1467704afdc9a74e72042a541e171f7cfdb0926b..ce0a00a5073827d921d6bb73c98bd640905f6709 100644 (file)
@@ -2010,9 +2010,6 @@ void wxMacCoreGraphicsContext::SetNativeContext( CGContextRef cg )
         CGContextRestoreGState( m_cgContext );
         if ( m_contextSynthesized )
         {
-            // TODO: in case of performance problems, try issuing this not too
-            // frequently (half of refresh rate)
-            CGContextFlush(m_cgContext);
 #if wxOSX_USE_CARBON
             QDEndCGContext( GetWindowPort( m_windowRef ) , &m_cgContext);
 #endif