Don't keep using the old wxBitmap data after modifying it directly in wxGTK.
Drawing on a wxBitmap via wxMemoryDC modified its pixmap representation in wxGTK and even if its pixbuf representation was later changed using direct access to the bitmap pixels, the out of date pixmap continued to be used, creating the illusion of direct access being completely ignored. Fix this by purging the old pixmap representation when locking the bitmap for raw access. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1428,6 +1428,11 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
|
||||
}
|
||||
#else
|
||||
GdkPixbuf *pixbuf = GetPixbuf();
|
||||
|
||||
// Pixmap will get out of date when our pixbuf is accessed directly, so
|
||||
// ensure we don't keep the old data in it.
|
||||
PurgeOtherRepresentations(Pixbuf);
|
||||
|
||||
const bool hasAlpha = HasAlpha();
|
||||
|
||||
// allow access if bpp is valid and matches existence of alpha
|
||||
|
Reference in New Issue
Block a user