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

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

Issue 1134993003: ozone: Implement zero/one-copy texture for Ozone GBM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase to new crrev.com/1128113011 Created 5 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
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_DRM_GPU_GBM_BUFFER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_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 24 matching lines...) Expand all
35 35
36 class GbmPixmap : public NativePixmap { 36 class GbmPixmap : public NativePixmap {
37 public: 37 public:
38 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer); 38 GbmPixmap(const scoped_refptr<GbmBuffer>& buffer);
39 bool Initialize(); 39 bool Initialize();
40 40
41 // NativePixmap: 41 // NativePixmap:
42 void* GetEGLClientBuffer() override; 42 void* GetEGLClientBuffer() override;
43 int GetDmaBufFd() override; 43 int GetDmaBufFd() override;
44 int GetDmaBufPitch() override; 44 int GetDmaBufPitch() override;
45 BufferUsage GetBufferUsage() const override;
46 void* Map() override;
47 void Unmap() override;
45 48
46 scoped_refptr<GbmBuffer> buffer() { return buffer_; } 49 scoped_refptr<GbmBuffer> buffer() { return buffer_; }
47 50
48 private: 51 private:
49 ~GbmPixmap() override; 52 ~GbmPixmap() override;
50 53
51 scoped_refptr<GbmBuffer> buffer_; 54 scoped_refptr<GbmBuffer> buffer_;
52 int dma_buf_ = -1; 55 int dma_buf_ = -1;
53 56
54 DISALLOW_COPY_AND_ASSIGN(GbmPixmap); 57 DISALLOW_COPY_AND_ASSIGN(GbmPixmap);
55 }; 58 };
56 59
57 } // namespace ui 60 } // namespace ui
58 61
59 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_ 62 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698