haiku/src/servers/app/BitmapManager.h
Axel Dörfler 117b384e5e * Implemented the overlay suspend/resume protocol on mode changes; not really tested
yet. Also, BBitmap::LockBits() should probably fail when the Bits() are NULL.
* The downside is that many more classes now know of each other.
* Cleaned up the work divided between the BitmapManager and the Overlay class.
* Fixed a memory leak in AS_CREATE_BITMAP in case the bitmap could not be added to
  the ServerApp's bitmap list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-27 11:29:20 +00:00

46 lines
955 B
C++

/*
* Copyright 2001-2007, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm <bpmagic@columbus.rr.com>
*/
#ifndef BITMAP_MANAGER_H
#define BITMAP_MANAGER_H
#include <GraphicsDefs.h>
#include <List.h>
#include <Locker.h>
#include <OS.h>
#include <Rect.h>
class ClientMemoryAllocator;
class HWInterface;
class ServerBitmap;
class BitmapManager {
public:
BitmapManager();
virtual ~BitmapManager();
ServerBitmap* CreateBitmap(ClientMemoryAllocator* allocator,
HWInterface& hwInterface, BRect bounds,
color_space space, int32 flags, int32 bytesPerRow = -1,
screen_id screen = B_MAIN_SCREEN_ID,
uint8* _allocationFlags = NULL);
void DeleteBitmap(ServerBitmap* bitmap);
void SuspendOverlays();
void ResumeOverlays();
protected:
BList fBitmapList;
BList fOverlays;
BLocker fLock;
};
extern BitmapManager *gBitmapManager;
#endif /* BITMAP_MANAGER_H */