From d56eb9cf5d84b844f473ec02f496f432cfc49a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 26 Jun 2007 23:20:44 +0000 Subject: [PATCH] * LockBits() now returns B_OK for non-overlay bitmaps, as that makes much more sense. * Added TODO about the possible use of the state parameter (would be nice to be compatible with R5 here, of course). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21510 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Bitmap.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Bitmap.cpp b/src/kits/interface/Bitmap.cpp index 633f98b1df..67e27405fb 100644 --- a/src/kits/interface/Bitmap.cpp +++ b/src/kits/interface/Bitmap.cpp @@ -409,6 +409,9 @@ BBitmap::IsValid() const status_t BBitmap::LockBits(uint32 *state) { + // TODO: how do we fill the "state"? + // It would be more or less useful to report what kind of bitmap + // we got (ie. overlay, placeholder, or non-overlay) if (fFlags & B_BITMAP_WILL_OVERLAY) { overlay_client_data* data = (overlay_client_data*)fBasePointer; @@ -424,7 +427,7 @@ BBitmap::LockBits(uint32 *state) // drawing the bitmap yet? // axeld: you mean for non overlays? - return B_ERROR; + return B_OK; } @@ -442,7 +445,7 @@ BBitmap::UnlockBits() release_sem(data->lock); } -// Area + /*! \brief Returns the ID of the area the bitmap data reside in. \return The ID of the area the bitmap data reside in. */