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

Side by Side Diff: ui/gfx/linux/client_native_pixmap_dmabuf.h

Issue 2711933002: Rename ClientNativePixmapFactoryGbm to ClientNativePixmapFactoryDmabuf amd move to ui/gfx (Closed)
Patch Set: Addressed sadrul's remark Created 3 years, 9 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/gfx/BUILD.gn ('k') | ui/gfx/linux/client_native_pixmap_dmabuf.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 5 #ifndef UI_GFX_LINUX_CLIENT_NATIVE_PIXMAP_DMABUF_H_
6 #define UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 6 #define UI_GFX_LINUX_CLIENT_NATIVE_PIXMAP_DMABUF_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/files/scoped_file.h" 12 #include "base/files/scoped_file.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "ui/gfx/client_native_pixmap.h" 14 #include "ui/gfx/client_native_pixmap.h"
15 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
16 #include "ui/gfx/native_pixmap_handle.h" 16 #include "ui/gfx/native_pixmap_handle.h"
17 17
18 namespace ui { 18 namespace gfx {
19 19
20 class ClientNativePixmapDmaBuf : public gfx::ClientNativePixmap { 20 class ClientNativePixmapDmaBuf : public gfx::ClientNativePixmap {
21 public: 21 public:
22 static std::unique_ptr<gfx::ClientNativePixmap> ImportFromDmabuf( 22 static std::unique_ptr<gfx::ClientNativePixmap> ImportFromDmabuf(
23 const gfx::NativePixmapHandle& handle, 23 const gfx::NativePixmapHandle& handle,
24 const gfx::Size& size); 24 const gfx::Size& size);
25 25
26 ~ClientNativePixmapDmaBuf() override; 26 ~ClientNativePixmapDmaBuf() override;
27 27
28 // Overridden from ClientNativePixmap. 28 // Overridden from ClientNativePixmap.
29 bool Map() override; 29 bool Map() override;
30 void Unmap() override; 30 void Unmap() override;
31 31
32 void* GetMemoryAddress(size_t plane) const override; 32 void* GetMemoryAddress(size_t plane) const override;
33 int GetStride(size_t plane) const override; 33 int GetStride(size_t plane) const override;
34 34
35 private: 35 private:
36 ClientNativePixmapDmaBuf(const gfx::NativePixmapHandle& handle, 36 ClientNativePixmapDmaBuf(const gfx::NativePixmapHandle& handle,
37 const gfx::Size& size); 37 const gfx::Size& size);
38 38
39 const gfx::NativePixmapHandle pixmap_handle_; 39 const gfx::NativePixmapHandle pixmap_handle_;
40 const gfx::Size size_; 40 const gfx::Size size_;
41 base::ScopedFD dmabuf_fd_; 41 base::ScopedFD dmabuf_fd_;
42 void* data_; 42 void* data_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf); 44 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf);
45 }; 45 };
46 46
47 } // namespace ui 47 } // namespace gfx
48 48
49 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 49 #endif // UI_GFX_LINUX_CLIENT_NATIVE_PIXMAP_DMABUF_H_
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/linux/client_native_pixmap_dmabuf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698