OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_EXO_DISPLAY_H_ |
| 6 #define COMPONENTS_EXO_DISPLAY_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/shared_memory_handle.h" |
| 11 |
| 12 namespace exo { |
| 13 class SharedMemory; |
| 14 class ShellSurface; |
| 15 class Surface; |
| 16 |
| 17 // The core display class. This class provides functions for creating surfaces |
| 18 // and is in charge of combining the contents of multiple surfaces into one |
| 19 // displayable output. |
| 20 class Display { |
| 21 public: |
| 22 Display(); |
| 23 ~Display(); |
| 24 |
| 25 // Creates a new surface. |
| 26 scoped_ptr<Surface> CreateSurface(); |
| 27 |
| 28 // Creates a shared memory segment from |handle| of |size| with the |
| 29 // given |id|. This function takes ownership of |handle|. |
| 30 scoped_ptr<SharedMemory> CreateSharedMemory( |
| 31 const base::SharedMemoryHandle& handle, |
| 32 size_t size); |
| 33 |
| 34 // Creates a shell surface for an existing surface. |
| 35 scoped_ptr<ShellSurface> CreateShellSurface(Surface* surface); |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(Display); |
| 39 }; |
| 40 |
| 41 } // namespace exo |
| 42 |
| 43 #endif // COMPONENTS_EXO_DISPLAY_H_ |
OLD | NEW |