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

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

Issue 365193003: Change NativeBufferOzone to be an object and move the overlay calls to the surface object. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | ui/ozone/platform/dri/gbm_buffer.cc » ('j') | ui/ozone/platform/dri/gbm_buffer.cc » ('J')
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_GBM_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "ui/ozone/platform/dri/scanout_surface.h"
12 #include "ui/ozone/public/surface_factory_ozone.h"
13
14 struct gbm_bo;
15 struct gbm_device;
16
17 namespace ui {
18
19 class DriWrapper;
20
21 class GbmBuffer : public NativePixmap, public ScanoutSurface {
dnicoara 2014/07/03 18:30:16 Do you need to inherit from ScanoutSurface? I'm as
achaulk 2014/07/03 19:49:43 Oh, yeah those are part of the next set of changes
22 public:
23 GbmBuffer(gbm_device* device, DriWrapper* dri, const gfx::Size& size);
24
25 bool InitializeBuffer(SurfaceFactoryOzone::BufferFormat format,
alexst (slow to review) 2014/07/03 18:30:32 nit: these fit
26 bool scanout);
27
28 // ScanoutSurface:
29 virtual bool Initialize() OVERRIDE;
30 virtual uint32_t GetFramebufferId() const OVERRIDE;
31 virtual uint32_t GetHandle() const OVERRIDE;
32 virtual gfx::Size Size() const OVERRIDE;
33 virtual void SwapBuffers() OVERRIDE;
34
35 // NativePixmap:
36 virtual void* native_handle() OVERRIDE;
37 virtual int dma_buf_fd() OVERRIDE;
38
39 protected:
40 virtual ~GbmBuffer();
41
42 private:
43 gbm_device* gbm_device_;
44 gbm_bo* bo_;
45
46 uint32_t handle_;
47 uint32_t framebuffer_;
48
49 DriWrapper* dri_;
50
51 gfx::Size size_;
52 };
53
54 } // namespace ui
55
56 #endif // UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/dri/gbm_buffer.cc » ('j') | ui/ozone/platform/dri/gbm_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698