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/drm/gpu/vgem_pixmap.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, 6 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 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_DRM_GPU_VGEM_BUFFER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_VGEM_BUFFER_H_
7
8 #include "ui/ozone/public/native_pixmap.h"
9 #include "ui/ozone/public/surface_factory_ozone.h"
10
11 namespace ui {
12
13 class VgemPixmap : public NativePixmap {
14 public:
15 VgemPixmap(base::FileDescriptor handle,
16 base::FileDescriptor vgem_handle,
17 gfx::Size size,
18 SurfaceFactoryOzone::BufferFormat format,
19 BufferUsage usage);
20 bool Initialize();
21
22 // NativePixmap:
23 void* GetEGLClientBuffer() override;
24 int GetDmaBufFd() override;
25 int GetDmaBufPitch() override;
26 BufferUsage GetBufferUsage() const override;
27 void* Map() override;
28 void Unmap() override;
29
30 protected:
31 ~VgemPixmap() override;
32
33 private:
34 uint32_t vgem_bo_handle_;
35 base::ScopedFD dma_buf_;
36 base::FileDescriptor vgem_fd_;
37 gfx::Size size_;
38 SurfaceFactoryOzone::BufferFormat format_;
39 BufferUsage usage_;
40 size_t stride_;
41 void* mmap_ptr_;
42
43 DISALLOW_COPY_AND_ASSIGN(VgemPixmap);
44 };
45
46 } // namespace ui
47
48 #endif // UI_OZONE_PLATFORM_DRM_GPU_VGEM_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698