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

Side by Side Diff: content/child/child_io_surface_manager_mac.h

Issue 1137453002: content: Pass IOSurface references using Mach IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment 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 unified diff | Download patch
OLDNEW
(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_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
6 #define CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
7
8 #include "base/mac/scoped_mach_port.h"
9 #include "base/macros.h"
10 #include "base/memory/singleton.h"
11 #include "content/common/mac/io_surface_manager.h"
12 #include "gpu/command_buffer/common/mailbox.h"
13
14 namespace content {
15
16 // Implementation of IOSurfaceManager that registers and acquires IOSurfaces
17 // through the browser process.
18 class CONTENT_EXPORT ChildIOSurfaceManager : public IOSurfaceManager {
19 public:
20 // Returns the global ChildIOSurfaceManager.
21 static ChildIOSurfaceManager* GetInstance();
22
23 // Overridden from IOSurfaceManager:
24 bool RegisterIOSurface(int io_surface_id,
25 int client_id,
26 IOSurfaceRef io_surface) override;
27 void UnregisterIOSurface(int io_surface_id, int client_id) override;
28 IOSurfaceRef AcquireIOSurface(int io_surface_id) override;
29
30 void set_mailbox(const gpu::Mailbox& mailbox) { mailbox_ = mailbox; }
31
32 private:
33 friend struct DefaultSingletonTraits<ChildIOSurfaceManager>;
34
35 ChildIOSurfaceManager();
36 ~ChildIOSurfaceManager() override;
37
38 base::mac::ScopedMachSendRight send_port_;
39 gpu::Mailbox mailbox_;
40
41 DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager);
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698