vfs: check userland buffers before reading them.
[haiku.git] / src / servers / app / drawing / DWindowBuffer.h
blob44cd20907561c6a40acc9741ef18ebf806d785ba
1 #ifndef D_WINDOW_BUFFER_H
2 #define D_WINDOW_BUFFER_H
5 #include "RenderingBuffer.h"
7 #include <Accelerant.h>
8 #include <DirectWindow.h>
11 class DWindowBuffer : public RenderingBuffer {
12 public:
13 DWindowBuffer();
14 virtual ~DWindowBuffer();
16 virtual status_t InitCheck() const;
18 virtual color_space ColorSpace() const;
19 virtual void* Bits() const;
20 virtual uint32 BytesPerRow() const;
21 virtual uint32 Width() const;
22 virtual uint32 Height() const;
24 void SetTo(direct_buffer_info* info);
26 void SetTo(frame_buffer_config* config,
27 uint32 x, uint32 y,
28 uint32 width, uint32 height,
29 color_space format);
31 BRegion& WindowClipping()
32 { return fWindowClipping; }
33 private:
34 uint8* fBits;
35 uint32 fWidth;
36 uint32 fHeight;
37 uint32 fBytesPerRow;
38 color_space fFormat;
40 BRegion fWindowClipping;
43 #endif // D_WINDOW_BUFFER_H