OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_OZONE_PLATFORM_DRI_SCANOUT_BUFFER_H_ | |
6 #define UI_OZONE_PLATFORM_DRI_SCANOUT_BUFFER_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include "ui/gfx/geometry/size.h" | |
11 #include "ui/ozone/public/native_pixmap.h" | |
12 | |
13 namespace ui { | |
14 | |
15 // Abstraction for a DRM buffer that can be scanned-out of. | |
16 class ScanoutBuffer : public NativePixmap { | |
alexst (slow to review)
2014/07/18 14:09:24
Any particular reason you chose to inherit here? I
dnicoara
2014/07/18 14:22:13
Modifying HDC directly requires lots of other chan
| |
17 public: | |
18 // ID allocated by the KMS API when the buffer is registered (via the handle). | |
19 virtual uint32_t GetFramebufferId() const = 0; | |
20 | |
21 // Handle for the buffer. This is received when allocating the buffer. | |
22 virtual uint32_t GetHandle() const = 0; | |
23 | |
24 // Size of the buffer. | |
25 virtual gfx::Size GetSize() const = 0; | |
26 | |
27 protected: | |
28 virtual ~ScanoutBuffer() {} | |
29 }; | |
30 | |
31 class ScanoutBufferGenerator { | |
32 public: | |
33 virtual ~ScanoutBufferGenerator() {} | |
34 | |
35 virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) = 0; | |
36 }; | |
37 | |
38 } // namespace ui | |
39 | |
40 #endif // UI_OZONE_PLATFORM_DRI_SCANOUT_BUFFER_H_ | |
OLD | NEW |