Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: ui/ozone/platform/dri/scanout_buffer.h

Issue 399213005: [Ozone-DRI] Adding ScanoutBuffer interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use RefCounted as base Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 "base/memory/ref_counted.h"
11 #include "ui/gfx/geometry/size.h"
12
13 namespace ui {
14
15 // Abstraction for a DRM buffer that can be scanned-out of.
16 class ScanoutBuffer : public base::RefCounted<ScanoutBuffer> {
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 friend class base::RefCounted<ScanoutBuffer>;
31 };
32
33 class ScanoutBufferGenerator {
34 public:
35 virtual ~ScanoutBufferGenerator() {}
36
37 virtual scoped_refptr<ScanoutBuffer> Create(const gfx::Size& size) = 0;
38 };
39
40 } // namespace ui
41
42 #endif // UI_OZONE_PLATFORM_DRI_SCANOUT_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698