]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/bitmap.cpp
wxWinCE compile fixes
[wxWidgets.git] / src / dfb / bitmap.cpp
index 1f65aacad0f1d8b8dc9340fa6239ee1082aabd56..8b57fb96deaf2da115d76923ae9d71e97d31389b 100644 (file)
@@ -189,17 +189,11 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
     wxFAIL_MSG( _T("not implemented") );
 }
 
-bool wxBitmap::Ok() const
+bool wxBitmap::IsOk() const
 {
     return (m_refData != NULL && M_BITMAP->m_surface);
 }
 
-bool wxBitmap::operator==(const wxBitmap& bmp) const
-{
-    // FIXME: is this the right way to compare bitmaps?
-    return (m_refData == bmp.m_refData);
-}
-
 int wxBitmap::GetHeight() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid bitmap") );
@@ -236,6 +230,7 @@ void wxBitmap::SetMask(wxMask *mask)
 {
     wxCHECK_RET( Ok(), wxT("invalid bitmap") );
 
+    AllocExclusive();
     delete M_BITMAP->m_mask;
     M_BITMAP->m_mask = mask;
 }
@@ -328,6 +323,7 @@ void wxBitmap::SetPalette(const wxPalette& palette)
     wxCHECK_RET( Ok(), wxT("invalid bitmap") );
     wxCHECK_RET( GetDepth() > 1 && GetDepth() <= 8, wxT("cannot set palette for bitmap of this depth") );
 
+    AllocExclusive();
     delete M_BITMAP->m_palette;
     M_BITMAP->m_palette = NULL;