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

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

Issue 2302053003: ozone: Validate the memory buffer used. (Closed)
Patch Set: . Created 4 years, 3 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 | « no previous file | ui/ozone/platform/drm/common/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_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 <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 ImportFromDmabuf(int dmabuf_fd, const gfx::Size& size, int stride); 22 ImportFromDmabuf(int dmabuf_fd, const gfx::Size& size, int stride);
23 23
24 ~ClientNativePixmapDmaBuf() override; 24 ~ClientNativePixmapDmaBuf() override;
25 25
26 // Overridden from ClientNativePixmap. 26 // Overridden from ClientNativePixmap.
27 void* Map() override; 27 void* Map() override;
28 void Unmap() override; 28 void Unmap() override;
29 void GetStride(int* stride) const override; 29 void GetStride(int* stride) const override;
30 30
31 private: 31 private:
32 ClientNativePixmapDmaBuf(int dmabuf_fd, const gfx::Size& size, int stride); 32 ClientNativePixmapDmaBuf(int dmabuf_fd,
33 const gfx::Size& size,
34 int stride,
35 size_t map_size);
33 36
34 base::ScopedFD dmabuf_fd_; 37 base::ScopedFD dmabuf_fd_;
38 const size_t map_size_;
35 const gfx::Size size_; 39 const gfx::Size size_;
36 const int stride_; 40 const int stride_;
37 void* data_; 41 void* data_;
38 42
39 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf); 43 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapDmaBuf);
40 }; 44 };
41 45
42 } // namespace ui 46 } // namespace ui
43 47
44 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_ 48 #endif // UI_OZONE_PLATFORM_DRM_COMMON_CLIENT_NATIVE_PIXMAP_DMABUF_H_
OLDNEW
« no previous file with comments | « no previous file | ui/ozone/platform/drm/common/client_native_pixmap_dmabuf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698