xref: /haiku/src/servers/app/drawing/MallocBuffer.h (revision 268f99dd7dc4bd7474a8bd2742d3f1ec1de6752a)
1 // MallocBuffer.h
2 
3 #ifndef MALLOC_BUFFER_H
4 #define MALLOC_BUFFER_H
5 
6 #include "RenderingBuffer.h"
7 
8 class BBitmap;
9 
10 class MallocBuffer : public RenderingBuffer {
11  public:
12 								MallocBuffer(uint32 width,
13 											 uint32 height);
14 	virtual						~MallocBuffer();
15 
16 	virtual	status_t			InitCheck() const;
IsGraphicsMemory()17 	virtual	bool				IsGraphicsMemory() const { return false; }
18 
19 	virtual	color_space			ColorSpace() const;
20 	virtual	void*				Bits() const;
21 	virtual	uint32				BytesPerRow() const;
22 	virtual	uint32				Width() const;
23 	virtual	uint32				Height() const;
24 
25  private:
26 
27 			void*				fBuffer;
28 			uint32				fWidth;
29 			uint32				fHeight;
30 };
31 
32 #endif // MALLOC_BUFFER_H
33