| 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 COMPONENTS_EXO_DISPLAY_H_ | 5 #ifndef COMPONENTS_EXO_DISPLAY_H_ |
| 6 #define COMPONENTS_EXO_DISPLAY_H_ | 6 #define COMPONENTS_EXO_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 std::unique_ptr<Surface> CreateSurface(); | 44 std::unique_ptr<Surface> CreateSurface(); |
| 45 | 45 |
| 46 // Creates a shared memory segment from |handle| of |size| with the | 46 // Creates a shared memory segment from |handle| of |size| with the |
| 47 // given |id|. This function takes ownership of |handle|. | 47 // given |id|. This function takes ownership of |handle|. |
| 48 std::unique_ptr<SharedMemory> CreateSharedMemory( | 48 std::unique_ptr<SharedMemory> CreateSharedMemory( |
| 49 const base::SharedMemoryHandle& handle, | 49 const base::SharedMemoryHandle& handle, |
| 50 size_t size); | 50 size_t size); |
| 51 | 51 |
| 52 #if defined(USE_OZONE) | 52 #if defined(USE_OZONE) |
| 53 // Creates a buffer for a Linux DMA-buf file descriptor. | 53 // Creates a buffer for a Linux DMA-buf file descriptor. |
| 54 std::unique_ptr<Buffer> CreateLinuxDMABufBuffer(base::ScopedFD fd, | 54 std::unique_ptr<Buffer> CreateLinuxDMABufBuffer( |
| 55 const gfx::Size& size, | 55 const gfx::Size& size, |
| 56 gfx::BufferFormat format, | 56 gfx::BufferFormat format, |
| 57 int stride); | 57 const std::vector<int>& strides, |
| 58 const std::vector<int>& offsets, |
| 59 std::vector<base::ScopedFD>&& fds); |
| 58 #endif | 60 #endif |
| 59 | 61 |
| 60 // Creates a shell surface for an existing surface. | 62 // Creates a shell surface for an existing surface. |
| 61 std::unique_ptr<ShellSurface> CreateShellSurface(Surface* surface); | 63 std::unique_ptr<ShellSurface> CreateShellSurface(Surface* surface); |
| 62 | 64 |
| 63 // Creates a popup shell surface for an existing surface at |position| and | 65 // Creates a popup shell surface for an existing surface at |position| and |
| 64 // with |parent|. |position| is in |parent| surface local coordinates. | 66 // with |parent|. |position| is in |parent| surface local coordinates. |
| 65 std::unique_ptr<ShellSurface> CreatePopupShellSurface( | 67 std::unique_ptr<ShellSurface> CreatePopupShellSurface( |
| 66 Surface* surface, | 68 Surface* surface, |
| 67 ShellSurface* parent, | 69 ShellSurface* parent, |
| 68 const gfx::Point& position); | 70 const gfx::Point& position); |
| 69 | 71 |
| 70 // Creates a remote shell surface for an existing surface using |container|. | 72 // Creates a remote shell surface for an existing surface using |container|. |
| 71 std::unique_ptr<ShellSurface> CreateRemoteShellSurface(Surface* surface, | 73 std::unique_ptr<ShellSurface> CreateRemoteShellSurface(Surface* surface, |
| 72 int container); | 74 int container); |
| 73 | 75 |
| 74 // Creates a sub-surface for an existing surface. The sub-surface will be | 76 // Creates a sub-surface for an existing surface. The sub-surface will be |
| 75 // a child of |parent|. | 77 // a child of |parent|. |
| 76 std::unique_ptr<SubSurface> CreateSubSurface(Surface* surface, | 78 std::unique_ptr<SubSurface> CreateSubSurface(Surface* surface, |
| 77 Surface* parent); | 79 Surface* parent); |
| 78 | 80 |
| 79 private: | 81 private: |
| 80 DISALLOW_COPY_AND_ASSIGN(Display); | 82 DISALLOW_COPY_AND_ASSIGN(Display); |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace exo | 85 } // namespace exo |
| 84 | 86 |
| 85 #endif // COMPONENTS_EXO_DISPLAY_H_ | 87 #endif // COMPONENTS_EXO_DISPLAY_H_ |
| OLD | NEW |