1 /* 2 * Copyright 2001-2006, 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, int32 flags, int32 bytesPerRow = -1, 30 screen_id screen = B_MAIN_SCREEN_ID, 31 uint8* _allocationFlags = NULL); 32 void DeleteBitmap(ServerBitmap* bitmap); 33 34 protected: 35 BList fBitmapList; 36 BLocker fLock; 37 }; 38 39 extern BitmapManager *gBitmapManager; 40 41 #endif /* BITMAP_MANAGER_H */ 42