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

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

Issue 667293002: [Ozone-GBM] Use dma_buf with surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_ 6 #define UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 20 matching lines...) Expand all
31 private: 31 private:
32 GbmBuffer(DriWrapper* dri, gbm_bo* bo, bool scanout); 32 GbmBuffer(DriWrapper* dri, gbm_bo* bo, bool scanout);
33 virtual ~GbmBuffer(); 33 virtual ~GbmBuffer();
34 34
35 DISALLOW_COPY_AND_ASSIGN(GbmBuffer); 35 DISALLOW_COPY_AND_ASSIGN(GbmBuffer);
36 }; 36 };
37 37
38 class GbmPixmap : public NativePixmap { 38 class GbmPixmap : public NativePixmap {
39 public: 39 public:
40 GbmPixmap(scoped_refptr<GbmBuffer> buffer); 40 GbmPixmap(scoped_refptr<GbmBuffer> buffer);
41 bool Initialize(DriWrapper* dri);
41 42
42 // NativePixmap: 43 // NativePixmap:
43 virtual void* GetEGLClientBuffer() override; 44 virtual void* GetEGLClientBuffer() override;
44 virtual int GetDmaBufFd() override; 45 virtual int GetDmaBufFd() override;
45 virtual int GetDmaBufPitch() override; 46 virtual int GetDmaBufPitch() override;
46 47
47 scoped_refptr<GbmBuffer> buffer() { return buffer_; } 48 scoped_refptr<GbmBuffer> buffer() { return buffer_; }
48 49
49 private: 50 private:
50 virtual ~GbmPixmap(); 51 virtual ~GbmPixmap();
51 52
52 scoped_refptr<GbmBuffer> buffer_; 53 scoped_refptr<GbmBuffer> buffer_;
54 int dma_buf_;
53 55
54 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); 56 DISALLOW_COPY_AND_ASSIGN(GbmPixmap);
55 }; 57 };
56 58
57 } // namespace ui 59 } // namespace ui
58 60
59 #endif // UI_OZONE_PLATFORM_DRI_GBM_BUFFER_H_ 61 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698