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

Side by Side Diff: content/browser/in_process_io_surface_manager_mac.h

Issue 1532813002: Replace IOSurfaceManager by directly passing IOSurface Mach ports over Chrome IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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_BROWSER_IN_PROCESS_IO_SURFACE_MANAGER_MAC_H_
6 #define CONTENT_BROWSER_IN_PROCESS_IO_SURFACE_MANAGER_MAC_H_
7
8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/mac/scoped_mach_port.h"
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/singleton.h"
13 #include "base/synchronization/lock.h"
14 #include "content/common/content_export.h"
15 #include "ui/gfx/mac/io_surface_manager.h"
16
17 namespace content {
18
19 class CONTENT_EXPORT InProcessIOSurfaceManager : public gfx::IOSurfaceManager {
20 public:
21 static InProcessIOSurfaceManager* GetInstance();
22
23 // Overridden from IOSurfaceManager:
24 bool RegisterIOSurface(gfx::IOSurfaceId io_surface_id,
25 int client_id,
26 IOSurfaceRef io_surface) override;
27 void UnregisterIOSurface(gfx::IOSurfaceId io_surface_id,
28 int client_id) override;
29 IOSurfaceRef AcquireIOSurface(gfx::IOSurfaceId io_surface_id) override;
30
31 private:
32 friend struct base::DefaultSingletonTraits<InProcessIOSurfaceManager>;
33
34 InProcessIOSurfaceManager();
35 ~InProcessIOSurfaceManager() override;
36
37 using IOSurfaceMap =
38 base::ScopedPtrHashMap<gfx::IOSurfaceId,
39 scoped_ptr<base::mac::ScopedMachSendRight>>;
40 IOSurfaceMap io_surfaces_;
41 base::Lock lock_;
42
43 DISALLOW_COPY_AND_ASSIGN(InProcessIOSurfaceManager);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_BROWSER_IN_PROCESS_IO_SURFACE_MANAGER_MAC_H_
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.cc ('k') | content/browser/in_process_io_surface_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698