Removed wxPG_DOUBLE_BUFFER constant. Now all wxPG rendering is done double-buffered, regardless of the platform. Code path with wxPG_DOUBLE_BUFFER = 0 did not render correctly (fixes #13140). In future should probably use wxAutoBufferedPaintDC or something similar, but this will require non-trivial code changes and testing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
63722a74b0
commit
35f8ae6572
@ -1795,9 +1795,7 @@ protected:
|
||||
wxWindow *m_wndEditor;
|
||||
wxWindow *m_wndEditor2;
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
wxBitmap *m_doubleBuffer;
|
||||
#endif
|
||||
|
||||
/** Local time ms when control was created. */
|
||||
wxLongLong m_timeCreated;
|
||||
@ -2687,7 +2685,6 @@ protected:
|
||||
#undef wxPG_FL_INITIALIZED
|
||||
#undef wxPG_FL_ACTIVATION_BY_CLICK
|
||||
#undef wxPG_SUPPORT_TOOLTIPS
|
||||
#undef wxPG_DOUBLE_BUFFER
|
||||
#undef wxPG_ICON_WIDTH
|
||||
#undef wxPG_USE_RENDERER_NATIVE
|
||||
// Following are needed by the manager headers
|
||||
|
@ -43,9 +43,6 @@
|
||||
// 1 if wxRendererNative should be employed
|
||||
#define wxPG_USE_RENDERER_NATIVE 0
|
||||
|
||||
// 1 to use double-buffer that guarantees flicker-free painting
|
||||
#define wxPG_DOUBLE_BUFFER 1
|
||||
|
||||
// Enable tooltips
|
||||
#define wxPG_SUPPORT_TOOLTIPS 1
|
||||
|
||||
@ -79,9 +76,6 @@
|
||||
// 1 if wxRendererNative should be employed
|
||||
#define wxPG_USE_RENDERER_NATIVE 1
|
||||
|
||||
// 1 to use double-buffer that guarantees flicker-free painting
|
||||
#define wxPG_DOUBLE_BUFFER 1
|
||||
|
||||
// Enable tooltips
|
||||
#define wxPG_SUPPORT_TOOLTIPS 1
|
||||
|
||||
@ -113,9 +107,6 @@
|
||||
// 1 if wxRendererNative should be employed
|
||||
#define wxPG_USE_RENDERER_NATIVE 1
|
||||
|
||||
// 1 to use double-buffer that guarantees flicker-free painting
|
||||
#define wxPG_DOUBLE_BUFFER 0
|
||||
|
||||
// Enable tooltips
|
||||
#define wxPG_SUPPORT_TOOLTIPS 1
|
||||
|
||||
@ -147,9 +138,6 @@
|
||||
// 1 if wxRendererNative should be employed
|
||||
#define wxPG_USE_RENDERER_NATIVE 0
|
||||
|
||||
// 1 to use double-buffer that guarantees flicker-free painting
|
||||
#define wxPG_DOUBLE_BUFFER 0
|
||||
|
||||
// Enable tooltips
|
||||
#define wxPG_SUPPORT_TOOLTIPS 0
|
||||
|
||||
@ -192,8 +180,6 @@
|
||||
|
||||
#if defined(__WXWINCE__)
|
||||
#define wxPG_SMALL_SCREEN 1
|
||||
#undef wxPG_DOUBLE_BUFFER
|
||||
#define wxPG_DOUBLE_BUFFER 0
|
||||
#else
|
||||
#define wxPG_SMALL_SCREEN 0
|
||||
#endif
|
||||
|
@ -375,9 +375,7 @@ void wxPropertyGrid::Init1()
|
||||
m_coloursCustomized = 0;
|
||||
m_frozen = 0;
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
m_doubleBuffer = NULL;
|
||||
#endif
|
||||
|
||||
#ifndef wxPG_ICON_WIDTH
|
||||
m_expandbmp = NULL;
|
||||
@ -544,10 +542,8 @@ wxPropertyGrid::~wxPropertyGrid()
|
||||
wxS("Close(false).)") );
|
||||
}
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
if ( m_doubleBuffer )
|
||||
delete m_doubleBuffer;
|
||||
#endif
|
||||
|
||||
if ( m_iFlags & wxPG_FL_CREATEDSTATE )
|
||||
delete m_pState;
|
||||
@ -1127,9 +1123,7 @@ void wxPropertyGrid::SetExtraStyle( long exStyle )
|
||||
}
|
||||
else
|
||||
{
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
wxDELETE(m_doubleBuffer);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -1965,7 +1959,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
||||
wxDC* dcPtr = &dc;
|
||||
bool isBuffered = false;
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
wxMemoryDC* bufferDC = NULL;
|
||||
|
||||
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
|
||||
@ -1986,7 +1979,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
||||
isBuffered = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( dcPtr )
|
||||
{
|
||||
@ -2005,7 +1997,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
||||
}
|
||||
}
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
if ( bufferDC )
|
||||
{
|
||||
dc.Blit( drawRect.x, drawRect.y, drawRect.width,
|
||||
@ -2013,7 +2004,6 @@ void wxPropertyGrid::DrawItems( wxDC& dc,
|
||||
bufferDC, 0, 0, wxCOPY );
|
||||
delete bufferDC;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2085,10 +2075,11 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
||||
int xRelMod = 0;
|
||||
|
||||
//
|
||||
// With wxPG_DOUBLE_BUFFER, do double buffering
|
||||
// For now, do some manual calculation for double buffering
|
||||
// - buffer's y = 0, so align itemsRect and coordinates to that
|
||||
//
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
// TODO: In future use wxAutoBufferedPaintDC (for example)
|
||||
//
|
||||
int yRelMod = 0;
|
||||
|
||||
wxRect cr2;
|
||||
@ -2107,9 +2098,6 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
|
||||
firstItemTopY -= yRelMod;
|
||||
lastItemBottomY -= yRelMod;
|
||||
}
|
||||
#else
|
||||
wxUnusedVar(isBuffered);
|
||||
#endif
|
||||
|
||||
int x = m_marginWidth - xRelMod;
|
||||
|
||||
@ -4619,7 +4607,6 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
#if wxPG_DOUBLE_BUFFER
|
||||
if ( !(GetExtraStyle() & wxPG_EX_NATIVE_DOUBLE_BUFFERING) )
|
||||
{
|
||||
int dblh = (m_lineHeight*2);
|
||||
@ -4647,8 +4634,6 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
m_pState->OnClientWidthChange( width, event.GetSize().x - m_ncWidth, true );
|
||||
m_ncWidth = event.GetSize().x;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user