1 /* 2 * Copyright 2001-2009, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * DarkWyrm <bpmagic@columbus.rr.com> 7 */ 8 #ifndef BITMAP_MANAGER_H 9 #define BITMAP_MANAGER_H 10 11 12 #include <GraphicsDefs.h> 13 #include <List.h> 14 #include <Locker.h> 15 #include <OS.h> 16 #include <Rect.h> 17 18 19 class ClientMemoryAllocator; 20 class HWInterface; 21 class ServerBitmap; 22 23 24 class BitmapManager { 25 public: 26 BitmapManager(); 27 virtual ~BitmapManager(); 28 29 ServerBitmap* CreateBitmap(ClientMemoryAllocator* allocator, 30 HWInterface& hwInterface, BRect bounds, 31 color_space space, uint32 flags, 32 int32 bytesPerRow = -1, 33 int32 screen = B_MAIN_SCREEN_ID.id, 34 uint8* _allocationFlags = NULL); 35 void DeleteBitmap(ServerBitmap* bitmap); 36 37 void SuspendOverlays(); 38 void ResumeOverlays(); 39 40 protected: 41 BList fBitmapList; 42 BList fOverlays; 43 BLocker fLock; 44 }; 45 46 extern BitmapManager* gBitmapManager; 47 48 #endif /* BITMAP_MANAGER_H */ 49