xref: /haiku/src/servers/app/drawing/interface/local/AccelerantBuffer.h (revision 02354704729d38c3b078c696adc1bbbd33cbcf72)
1 /*
2  * Copyright 2005 Michael Lotz <mmlr@mlotz.ch>
3  * All rights reserved. Distributed under the terms of the MIT license.
4  */
5 #ifndef ACCELERANT_BUFFER_H
6 #define ACCELERANT_BUFFER_H
7 
8 #include <Accelerant.h>
9 #include "RenderingBuffer.h"
10 
11 class AccelerantBuffer : public RenderingBuffer {
12 public:
13 								AccelerantBuffer();
14 								AccelerantBuffer(const display_mode& mode,
15 									const frame_buffer_config& config);
16 								AccelerantBuffer(const AccelerantBuffer& other,
17 									bool offscreenBuffer = false);
18 	virtual						~AccelerantBuffer();
19 
20 	virtual	status_t			InitCheck() const;
21 
22 	virtual	color_space			ColorSpace() const;
23 	virtual	void*				Bits() const;
24 	virtual	uint32				BytesPerRow() const;
25 	virtual	uint32				Width() const;
26 	virtual	uint32				Height() const;
27 
28 			void				SetDisplayMode(const display_mode& mode);
29 			void				SetFrameBufferConfig(
30 									const frame_buffer_config& config);
31 			void				SetOffscreenBuffer(bool offscreenBuffer);
32 
33 private:
34 			display_mode		fDisplayMode;
35 			frame_buffer_config	fFrameBufferConfig;
36 
37 			bool				fDisplayModeSet : 1;
38 			bool				fFrameBufferConfigSet : 1;
39 			bool				fIsOffscreenBuffer : 1;
40 };
41 
42 #endif // ACCELERANT_BUFFER_H
43