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

Unified Diff: components/exo/display.h

Issue 1412093006: components: Add Exosphere component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: components/exo/display.h
diff --git a/components/exo/display.h b/components/exo/display.h
new file mode 100644
index 0000000000000000000000000000000000000000..76d5d998276bbb7a8b93f938362408661f6234d2
--- /dev/null
+++ b/components/exo/display.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_EXO_DISPLAY_H_
+#define COMPONENTS_EXO_DISPLAY_H_
+
+#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/memory/shared_memory_handle.h"
+#include "components/exo/exo_export.h"
+
+namespace exo {
+class SharedMemory;
+class ShellSurface;
+class Surface;
+
+// The core display class. This class provides functions for creating surfaces
+// and is in charge of combining the contents of multiple surfaces into one
+// displayable output.
+class EXO_EXPORT Display {
+ public:
+ Display();
+ ~Display();
+
+ // Creates a new surface.
+ scoped_ptr<Surface> CreateSurface();
+
+ // Creates a shared memory segment from |handle| of |size| with the
+ // given |id|. This function takes ownership of |handle|.
+ scoped_ptr<SharedMemory> CreateSharedMemory(
+ const base::SharedMemoryHandle& handle,
+ size_t size);
+
+ // Creates a shell surface for an existing surface.
+ scoped_ptr<ShellSurface> GetShellSurface(Surface* surface);
piman 2015/11/17 02:43:53 nit: maybe CreateShellSurface
reveman 2015/11/17 18:04:04 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Display);
+};
+
+} // namespace exo
+
+#endif // COMPONENTS_EXO_DISPLAY_H_

Powered by Google App Engine
This is Rietveld 408576698