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

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

Issue 325133003: Refactor BufferData class into a separate file to be later used by individual gbm_bo's in EGLImage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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_DRI_BUFFER_DATA_H_
6 #define UI_OZONE_PLATFORM_DRI_BUFFER_DATA_H_
7
8 #include "base/memory/scoped_ptr.h"
9
10 struct gbm_bo;
11
12 namespace ui {
13
14 class DriWrapper;
15
16 class BufferData {
rjkroege 2014/06/11 14:43:04 What is this class for? Can you explain?
17 public:
18 // When we create the BufferData we need to register the buffer. Once
19 // successfully registered, the |framebuffer_| field will hold the ID of the
20 // buffer. The controller will use this ID when scanning out the buffer. On
21 // creation we will also associate the BufferData with the buffer.
22 static BufferData* CreateData(DriWrapper* dri, gbm_bo* buffer);
23
24 // Callback used by GBM to destory the BufferData associated with a buffer.
rjkroege 2014/06/11 14:43:04 nit destory
25 static void Destroy(gbm_bo* buffer, void* data);
26
27 // Returns the BufferData associated with |buffer|. NULL if no data is
28 // associated.
29 static BufferData* GetData(gbm_bo* buffer);
30
31 uint32_t framebuffer() const { return framebuffer_; }
32 uint32_t handle() const { return handle_; }
33
34 private:
35 BufferData(DriWrapper* dri, gbm_bo* buffer);
36 ~BufferData();
37
38 DriWrapper* dri_;
39
40 uint32_t handle_;
41
42 // ID provided by the controller when the buffer is registered. This ID is
43 // used when scanning out the buffer.
44 uint32_t framebuffer_;
45
46 DISALLOW_COPY_AND_ASSIGN(BufferData);
47 };
48
49 } // namespace ui
50
51 #endif // UI_OZONE_PLATFORM_DRI_BUFFER_DATA_H_
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/buffer_data.cc » ('j') | ui/ozone/platform/dri/buffer_data.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698