Make it possible to reconnect BBitmap to the app_server.

* maintain a list of all BBitmaps
* refactor the client memory allocator class, its possible now to just clone existing client area
This commit is contained in:
czeidler
2012-01-22 15:30:15 +13:00
parent 04209cdd81
commit 577f58763b
9 changed files with 298 additions and 112 deletions
+4
View File
@@ -110,10 +110,12 @@ public:
BBitmap& operator=(const BBitmap& source);
class Private;
private:
friend class BView;
friend class BApplication;
friend class BPrivate::BPrivateScreen;
friend class Private;
virtual status_t Perform(perform_code d, void* arg);
virtual void _ReservedBitmap1();
@@ -127,6 +129,8 @@ private:
void _CleanUp();
void _AssertPointer();
void _ReconnectToAppServer();
private:
uint8* fBasePointer;
int32 fSize;
+13
View File
@@ -6,6 +6,7 @@
#define _BITMAP_PRIVATE_H
#include <Bitmap.h>
#include <OS.h>
@@ -16,4 +17,16 @@ struct overlay_client_data {
uint8* buffer;
};
void reconnect_bitmaps_to_app_server();
class BBitmap::Private {
public:
Private(BBitmap* bitmap);
void ReconnectToAppServer();
private:
BBitmap* fBitmap;
};
#endif // _BITMAP_PRIVATE_H