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

Side by Side Diff: ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.h

Issue 1841683003: ui/ozone: Flush CPU caches when mapping/unmapping prime pixmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ran git cl format Created 4 years, 8 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 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_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_
6 #define UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 6 #define UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/files/scoped_file.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
13 #include "ui/ozone/public/client_native_pixmap.h" 14 #include "ui/ozone/public/client_native_pixmap.h"
14 15
15 namespace ui { 16 namespace ui {
16 17
17 class ClientNativePixmapDmaBuf : public ClientNativePixmap { 18 class ClientNativePixmapDmaBuf : public ClientNativePixmap {
18 public: 19 public:
19 static scoped_ptr<ClientNativePixmap> ImportFromDmabuf(int dmabuf_fd, 20 static scoped_ptr<ClientNativePixmap> ImportFromDmabuf(int dmabuf_fd,
20 const gfx::Size& size, 21 const gfx::Size& size,
21 int stride); 22 int stride);
22 23
23 ~ClientNativePixmapDmaBuf() override; 24 ~ClientNativePixmapDmaBuf() override;
24 25
25 // Overridden from ClientNativePixmap. 26 // Overridden from ClientNativePixmap.
26 void* Map() override; 27 void* Map() override;
27 void Unmap() override; 28 void Unmap() override;
28 void GetStride(int* stride) const override; 29 void GetStride(int* stride) const override;
29 30
30 private: 31 private:
31 ClientNativePixmapDmaBuf(int dmabuf_fd, const gfx::Size& size, int stride); 32 ClientNativePixmapDmaBuf(int dmabuf_fd, const gfx::Size& size, int stride);
32 33
34 base::ScopedFD dmabuf_fd_;
33 const gfx::Size size_; 35 const gfx::Size size_;
34 const int stride_; 36 const int stride_;
35 void* data_; 37 void* data_;
36 38
37 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf); 39 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf);
38 }; 40 };
39 41
40 } // namespace ui 42 } // namespace ui
41 43
42 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 44 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698