Chromium Code Reviews| 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 CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_ | |
| 6 #define CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_ | |
| 7 | |
| 8 #include <IOSurface/IOSurfaceAPI.h> | |
| 9 | |
| 10 #include "content/common/content_export.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 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.
| |
| 15 public: | |
| 16 static IOSurfaceManager* GetInstance(); | |
| 17 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
| |
| 18 | |
| 19 // 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
| |
| 20 virtual bool RegisterIOSurface(int io_surface_id, | |
| 21 int client_id, | |
| 22 IOSurfaceRef io_surface) = 0; | |
| 23 | |
| 24 // Unregister an IO surface previously registered for use in another | |
| 25 // process. | |
| 26 virtual void UnregisterIOSurface(int io_surface_id, int client_id) = 0; | |
| 27 | |
| 28 // Acquire IO surface reference for a registered IO surface. | |
| 29 virtual IOSurfaceRef AcquireIOSurface(int io_surface_id) = 0; | |
| 30 | |
| 31 protected: | |
| 32 virtual ~IOSurfaceManager() {} | |
| 33 }; | |
| 34 | |
| 35 } // namespace content | |
| 36 | |
| 37 #endif // CONTENT_COMMON_MAC_IO_SURFACE_MANAGER_H_ | |
| OLD | NEW |