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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/ozone/platform/dri/gbm.gypi ('k') | ui/ozone/platform/dri/gbm_buffer.cc » ('j') | 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_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/gbm_buffer_base.h"
12 #include "ui/ozone/public/native_pixmap.h"
13 #include "ui/ozone/public/surface_factory_ozone.h"
14
15 struct gbm_bo;
16 struct gbm_device;
17
18 namespace ui {
19
20 class DriWrapper;
21
22 class GbmBuffer : public GbmBufferBase {
23 public:
24 static scoped_refptr<GbmBuffer> CreateBuffer(
25 DriWrapper* dri,
26 gbm_device* device,
27 SurfaceFactoryOzone::BufferFormat format,
28 const gfx::Size& size,
29 bool scanout);
30
31 private:
32 GbmBuffer(DriWrapper* dri, gbm_bo* bo, bool scanout);
33 virtual ~GbmBuffer();
34
35 DISALLOW_COPY_AND_ASSIGN(GbmBuffer);
36 };
37
38 class GbmPixmap : public NativePixmap {
39 public:
40 GbmPixmap(scoped_refptr<GbmBuffer> buffer);
41
42 // NativePixmap:
43 virtual void* GetEGLClientBuffer() override;
44 virtual int GetDmaBufFd() override;
45 virtual int GetDmaBufPitch() override;
46
47 scoped_refptr<GbmBuffer> buffer() { return buffer_; }
48
49 private:
50 virtual ~GbmPixmap();
51
52 scoped_refptr<GbmBuffer> buffer_;
53
54 DISALLOW_COPY_AND_ASSIGN(GbmPixmap);
55 };
56
57 } // namespace ui
58
59 #endif // UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/gbm.gypi ('k') | ui/ozone/platform/dri/gbm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698