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

Side by Side Diff: ui/ozone/platform/drm/gpu/scanout_buffer.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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
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_DRM_GPU_SCANOUT_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_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 class DrmDevice;
16
17 // Abstraction for a DRM buffer that can be scanned-out of.
18 class ScanoutBuffer : public base::RefCountedThreadSafe<ScanoutBuffer> {
19 public:
20 // ID allocated by the KMS API when the buffer is registered (via the handle).
21 virtual uint32_t GetFramebufferId() const = 0;
22
23 // Handle for the buffer. This is received when allocating the buffer.
24 virtual uint32_t GetHandle() const = 0;
25
26 // Size of the buffer.
27 virtual gfx::Size GetSize() const = 0;
28
29 protected:
30 virtual ~ScanoutBuffer() {}
31
32 friend class base::RefCountedThreadSafe<ScanoutBuffer>;
33 };
34
35 class ScanoutBufferGenerator {
36 public:
37 virtual ~ScanoutBufferGenerator() {}
38
39 virtual scoped_refptr<ScanoutBuffer> Create(
40 const scoped_refptr<DrmDevice>& drm,
41 const gfx::Size& size) = 0;
42 };
43
44 } // namespace ui
45
46 #endif // UI_OZONE_PLATFORM_DRM_GPU_SCANOUT_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/page_flip_request.cc ('k') | ui/ozone/platform/drm/gpu/screen_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698