OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_
H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_
H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_
H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_MAC_
H_ |
7 | 7 |
8 #include <OpenGL/OpenGL.h> | 8 #include <OpenGL/OpenGL.h> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/surface/transport_dib.h" | 14 #include "ui/surface/transport_dib.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Rect; | 17 class Rect; |
18 } | 18 } |
19 | 19 |
20 namespace webkit { | 20 namespace webkit { |
21 namespace npapi { | 21 namespace npapi { |
22 struct WebPluginGeometry; | 22 struct WebPluginGeometry; |
23 } | 23 } |
24 } | 24 } |
25 | 25 |
| 26 namespace content { |
| 27 |
26 class AcceleratedSurfaceContainerMac; | 28 class AcceleratedSurfaceContainerMac; |
27 | 29 |
28 // Helper class that manages the backing store and on-screen rendering | 30 // Helper class that manages the backing store and on-screen rendering |
29 // of instances of the GPU plugin on the Mac. | 31 // of instances of the GPU plugin on the Mac. |
30 class AcceleratedSurfaceContainerManagerMac { | 32 class AcceleratedSurfaceContainerManagerMac { |
31 public: | 33 public: |
32 AcceleratedSurfaceContainerManagerMac(); | 34 AcceleratedSurfaceContainerManagerMac(); |
33 ~AcceleratedSurfaceContainerManagerMac(); | 35 ~AcceleratedSurfaceContainerManagerMac(); |
34 | 36 |
35 // Allocates a new "fake" PluginWindowHandle, which is used as the | 37 // Allocates a new "fake" PluginWindowHandle, which is used as the |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 PluginWindowToContainerMap plugin_window_to_container_map_; | 90 PluginWindowToContainerMap plugin_window_to_container_map_; |
89 | 91 |
90 // Both |plugin_window_to_container_map_| and the | 92 // Both |plugin_window_to_container_map_| and the |
91 // AcceleratedSurfaceContainerMac in it are not threadsafe, but accessed from | 93 // AcceleratedSurfaceContainerMac in it are not threadsafe, but accessed from |
92 // multiple threads. All these accesses are guarded by this lock. | 94 // multiple threads. All these accesses are guarded by this lock. |
93 mutable base::Lock lock_; | 95 mutable base::Lock lock_; |
94 | 96 |
95 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); | 97 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); |
96 }; | 98 }; |
97 | 99 |
| 100 } // namespace content |
| 101 |
98 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_M
AC_H_ | 102 #endif // CONTENT_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_MANAGER_M
AC_H_ |
OLD | NEW |