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

Unified Diff: content/common/mac/io_surface_manager.h

Issue 1137453002: content: Pass IOSurface references using Mach IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove parameter from MachBroker::InitChildProcess Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/common/mac/io_surface_manager.h
diff --git a/content/common/mac/io_surface_manager.h b/content/common/mac/io_surface_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..b71435c3b19585c4019f3ce650d812529383f972
--- /dev/null
+++ b/content/common/mac/io_surface_manager.h
@@ -0,0 +1,37 @@
+// 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 CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_
+#define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_
+
+#include <IOSurface/IOSurfaceAPI.h>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+class CONTENT_EXPORT IOSurfaceManager {
Robert Sesek 2015/05/12 23:15:25 This needs a class-level comment.
reveman 2015/05/15 14:48:57 Done.
+ public:
+ static IOSurfaceManager* GetInstance();
+ static void InitInstance(IOSurfaceManager* instance);
Robert Sesek 2015/05/12 23:15:25 SetInstance is probably a more appropriate name?
reveman 2015/05/15 14:48:57 Done. Was InitInstance to be consistent with Surfa
+
+ // Register an IO surface for use in another process.
Robert Sesek 2015/05/12 23:15:25 How does an io_surface_id differ from a client_id?
reveman 2015/05/15 14:48:57 client_id specifies what GPU client is allowed acc
+ virtual bool RegisterIOSurface(int io_surface_id,
+ int client_id,
+ IOSurfaceRef io_surface) = 0;
+
+ // Unregister an IO surface previously registered for use in another
+ // process.
+ virtual void UnregisterIOSurface(int io_surface_id, int client_id) = 0;
+
+ // Acquire IO surface reference for a registered IO surface.
+ virtual IOSurfaceRef AcquireIOSurface(int io_surface_id) = 0;
+
+ protected:
+ virtual ~IOSurfaceManager() {}
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_io_surface.cc ('k') | content/common/mac/io_surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698