21c8c925d8
is managed for those bitmaps: - the shared client memory mechanism is used to allocate a small overlay_client_data structure that contains the actual buffer and a semaphore that you have acquire in order to access it. - LockBits()/UnlockBits() now have a function: you need to call them before accessing the overlay buffer, and you need to keep that lock until you're done with it. * The overlay cookie is now an extra member of the ServerBitmap class. * Removed fInitialized from ServerBitmap - IsValid() now just checks the buffer associated with the bitmap. * ViewLayer::Draw() will now handle overlay bitmaps specially and will draw the overlay color instead of any contents (this is currently in ugly pink, but will become some dark color later on). * All what's missing from actually being able to use overlays now is to configure them so that they are shown on screen. VLC will now show an empty pink window when overlay video is enabled. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17201 a95241bf-73f2-0310-859d-f6bbb57e9c96
42 lines
878 B
C++
42 lines
878 B
C++
/*
|
|
* Copyright 2001-2006, 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);
|
|
|
|
protected:
|
|
BList fBitmapList;
|
|
BLocker fLock;
|
|
};
|
|
|
|
extern BitmapManager *gBitmapManager;
|
|
|
|
#endif /* BITMAP_MANAGER_H */
|