void wxLayoutWindow::OnPaint( wxPaintEvent &WXUNUSED(event)) { wxRect region = GetUpdateRegion().GetBox(); InternalPaint(®ion); }
void TopPane::UpdateBits() { /* ORIGINAL ALLEGIANCE VERSION. ZEnter("TopPane::UpdateBits()"); if (m_bNeedPaint) { ZTrace("m_bNeedPaint == true"); if (CalcPaint()) { m_bNeedPaint = true; m_bPaintAll = true; } ZTrace("after CalcPaint() m_bNeedPaint ==" + ZString(m_bNeedPaint)); ZTrace("after CalcPaint() m_bPaintAll ==" + ZString(m_bPaintAll )); m_bPaintAll |= g_bPaintAll; InternalPaint(m_psurface); m_bNeedPaint = false; } ZExit("TopPane::UpdateBits()");*/ ZEnter("TopPane::UpdateBits()"); { HRESULT hr; bool bRenderTargetRequired; PrivateSurface* pprivateSurface; CastTo(pprivateSurface, m_psurface); bRenderTargetRequired = pprivateSurface->GetSurfaceType().Test(SurfaceTypeRenderTarget() ) == true; if( bRenderTargetRequired == true ) { TEXHANDLE hTexture = pprivateSurface->GetTexHandle( ); _ASSERT( hTexture != INVALID_TEX_HANDLE ); hr = CVRAMManager::Get()->PushRenderTarget( hTexture ); } ZTrace("m_bNeedPaint == true"); CalcPaint(); m_bNeedPaint = true; m_bPaintAll = true; ZTrace("after CalcPaint() m_bPaintAll ==" + ZString(m_bPaintAll )); WinPoint offset( 0, 0 ); // Call InternalPaint() with the child offset and parent size as params and create initial clipping rect. WinRect rectClip( 0, 0, (int) m_psurface->GetSize().X(), (int) m_psurface->GetSize().Y() ); m_bPaintAll |= g_bPaintAll; InternalPaint( m_psurface ); m_bNeedPaint = false; if( bRenderTargetRequired == true ) { CVRAMManager::Get()->PopRenderTarget( ); } } ZExit("TopPane::UpdateBits()"); /* { ZTrace("m_bNeedPaint == true"); CalcPaint(); m_bNeedPaint = true; m_bPaintAll = true; ZTrace("after CalcPaint() m_bNeedPaint ==" + ZString(m_bNeedPaint)); ZTrace("after CalcPaint() m_bPaintAll ==" + ZString(m_bPaintAll )); m_bPaintAll |= g_bPaintAll; // localOffset.SetY( localOffset.Y() - (int)m_psurface->GetSize().Y() ); // localOffset += globalOffset; WinPoint offset( localOffset ); // Remove offset now. offset.SetY( offset.Y() - (int)m_psurface->GetSize().Y() ); // Call InternalPaint() with the child offset and parent size as params and create initial clipping rect. WinRect rectClip( offset.X(), offset.Y(), offset.X() + (int) m_psurface->GetSize().X(), offset.Y() + (int) m_psurface->GetSize().Y() ); // m_psurface is a dummy surface. Store the context. InternalPaint( m_psurface, offset, rectClip ); m_bNeedPaint = false; } ZExit("TopPane::UpdateBits()");*/ }