| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_GFX_NATIVE_PIXMAP_HANDLE_H_ | 5 #ifndef UI_GFX_NATIVE_PIXMAP_HANDLE_H_ |
| 6 #define UI_GFX_NATIVE_PIXMAP_HANDLE_H_ | 6 #define UI_GFX_NATIVE_PIXMAP_HANDLE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 11 #include "ui/gfx/gfx_export.h" | 13 #include "ui/gfx/gfx_export.h" |
| 12 | 14 |
| 13 #if defined(USE_OZONE) | 15 #if defined(USE_OZONE) |
| 14 #include "base/file_descriptor_posix.h" | 16 #include "base/file_descriptor_posix.h" |
| 15 #endif | 17 #endif |
| 16 | 18 |
| 17 namespace gfx { | 19 namespace gfx { |
| 18 | 20 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 43 | 45 |
| 44 ~NativePixmapHandle(); | 46 ~NativePixmapHandle(); |
| 45 | 47 |
| 46 #if defined(USE_OZONE) | 48 #if defined(USE_OZONE) |
| 47 // File descriptors for the underlying memory objects (usually dmabufs). | 49 // File descriptors for the underlying memory objects (usually dmabufs). |
| 48 std::vector<base::FileDescriptor> fds; | 50 std::vector<base::FileDescriptor> fds; |
| 49 #endif | 51 #endif |
| 50 std::vector<NativePixmapPlane> planes; | 52 std::vector<NativePixmapPlane> planes; |
| 51 }; | 53 }; |
| 52 | 54 |
| 55 #if defined(USE_OZONE) |
| 56 // Returns an instance of |handle| which can be sent over IPC. This duplicates |
| 57 // the file-handles, so that the IPC code take ownership of them, without |
| 58 // invalidating |handle|. |
| 59 NativePixmapHandle CloneHandleForIPC(const NativePixmapHandle& handle); |
| 60 #endif |
| 61 |
| 53 } // namespace gfx | 62 } // namespace gfx |
| 54 | 63 |
| 55 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_H_ | 64 #endif // UI_GFX_NATIVE_PIXMAP_HANDLE_H_ |
| OLD | NEW |