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/ozone/platform/drm/gpu/client_native_pixmap_vgem.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 on crrev.com/1263323004 Created 5 years, 4 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
(Empty)
1 // Copyright 2015 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_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_
7
8 #include "base/file_descriptor_posix.h"
9 #include "ui/gfx/buffer_types.h"
10 #include "ui/gfx/geometry/size.h"
11 #include "ui/gfx/native_pixmap_handle_ozone.h"
12 #include "ui/ozone/public/client_native_pixmap.h"
13
14 namespace ui {
15
16 class ClientNativePixmapVgem : public ClientNativePixmap {
17 public:
18 ClientNativePixmapVgem(const gfx::NativePixmapHandle& handle,
19 const base::FileDescriptor& vgem_handle,
20 const gfx::Size& size,
21 gfx::BufferFormat format);
22 ~ClientNativePixmapVgem() override;
23
24 bool Initialize();
25
26 // ClientNativePixmap:
reveman 2015/08/06 12:08:35 Overridden from Cli...
dshwang 2015/08/06 13:59:17 Done.
27 bool Map(void** data) override;
28 void Unmap() override;
29 void GetStride(int* stride) const override;
30
31 private:
32 uint32_t vgem_bo_handle_;
33 base::ScopedFD dma_buf_;
34 base::FileDescriptor vgem_fd_;
35 gfx::Size size_;
36 gfx::BufferFormat format_;
37 int stride_;
38 void* mmap_ptr_;
39
40 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapVgem);
41 };
42
43 } // namespace ui
44
45 #endif // UI_OZONE_PLATFORM_DRM_GPU_CLIENT_NATIVE_PIXMAP_VGEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698