1 /* 2 * Copyright 2001-2007, 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 class ClientMemoryAllocator; 19 class HWInterface; 20 class ServerBitmap; 21 22 class BitmapManager { 23 public: 24 BitmapManager(); 25 virtual ~BitmapManager(); 26 27 ServerBitmap* CreateBitmap(ClientMemoryAllocator* allocator, 28 HWInterface& hwInterface, BRect bounds, 29 color_space space, uint32 flags, 30 int32 bytesPerRow = -1, 31 screen_id screen = B_MAIN_SCREEN_ID, 32 uint8* _allocationFlags = NULL); 33 void DeleteBitmap(ServerBitmap* bitmap); 34 35 void SuspendOverlays(); 36 void ResumeOverlays(); 37 38 protected: 39 BList fBitmapList; 40 BList fOverlays; 41 BLocker fLock; 42 }; 43 44 extern BitmapManager *gBitmapManager; 45 46 #endif /* BITMAP_MANAGER_H */ 47