OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <OpenGL/OpenGL.h> | 9 #include <OpenGL/OpenGL.h> |
10 #include <map> | 10 #include <map> |
(...skipping 18 matching lines...) Expand all Loading... | |
29 // Allocates a new "fake" PluginWindowHandle, which is used as the | 29 // Allocates a new "fake" PluginWindowHandle, which is used as the |
30 // key for the other operations. | 30 // key for the other operations. |
31 gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque, | 31 gfx::PluginWindowHandle AllocateFakePluginWindowHandle(bool opaque, |
32 bool root); | 32 bool root); |
33 | 33 |
34 // Destroys a fake PluginWindowHandle and associated storage. | 34 // Destroys a fake PluginWindowHandle and associated storage. |
35 void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle id); | 35 void DestroyFakePluginWindowHandle(gfx::PluginWindowHandle id); |
36 | 36 |
37 // Indicates whether a "root" PluginWindowHandle has been allocated, | 37 // Indicates whether a "root" PluginWindowHandle has been allocated, |
38 // which means that we are using accelerated compositing and should | 38 // which means that we are using accelerated compositing and should |
39 // short-circuit the normal drawing process. | 39 // short-circuit the normal drawing process. |
stuartmorgan
2010/08/11 16:40:44
This comment pretty clearly doesn't match the func
Ken Russell (switch to Gerrit)
2010/08/14 02:12:11
Will fix.
| |
40 bool HasRootContainer(); | 40 bool IsRootContainer(gfx::PluginWindowHandle id); |
41 | 41 |
42 // Sets the size and backing store of the plugin instance. There are two | 42 // Sets the size and backing store of the plugin instance. There are two |
43 // versions: the IOSurface version is used on systems where the IOSurface | 43 // versions: the IOSurface version is used on systems where the IOSurface |
44 // API is supported (Mac OS X 10.6 and later); the TransportDIB is used on | 44 // API is supported (Mac OS X 10.6 and later); the TransportDIB is used on |
45 // Mac OS X 10.5 and earlier. | 45 // Mac OS X 10.5 and earlier. |
46 void SetSizeAndIOSurface(gfx::PluginWindowHandle id, | 46 void SetSizeAndIOSurface(gfx::PluginWindowHandle id, |
47 int32 width, | 47 int32 width, |
48 int32 height, | 48 int32 height, |
49 uint64 io_surface_identifier); | 49 uint64 io_surface_identifier); |
50 void SetSizeAndTransportDIB(gfx::PluginWindowHandle id, | 50 void SetSizeAndTransportDIB(gfx::PluginWindowHandle id, |
51 int32 width, | 51 int32 width, |
52 int32 height, | 52 int32 height, |
53 TransportDIB::Handle transport_dib); | 53 TransportDIB::Handle transport_dib); |
54 | 54 |
55 // Takes an update from WebKit about a plugin's position and size and moves | 55 // Takes an update from WebKit about a plugin's position and size and moves |
56 // the plugin accordingly. | 56 // the plugin accordingly. |
57 void MovePluginContainer(const webkit_glue::WebPluginGeometry& move); | 57 void MovePluginContainer(const webkit_glue::WebPluginGeometry& move); |
58 | 58 |
59 // Draws all of the managed plugin containers into the given OpenGL | 59 // Draws all of the managed plugin containers into the given OpenGL |
60 // context, which must already be current. | 60 // context, which must already be current. |
stuartmorgan
2010/08/11 16:40:44
Again, the comment is now completely wrong.
Ken Russell (switch to Gerrit)
2010/08/14 02:12:11
Will fix.
| |
61 void Draw(CGLContextObj context, | 61 void Draw(CGLContextObj context, |
62 gfx::PluginWindowHandle id, | |
62 bool draw_root_container); | 63 bool draw_root_container); |
63 | 64 |
64 // Causes the next Draw call on each container to trigger a texture upload. | 65 // Causes the next Draw call on each container to trigger a texture upload. |
65 // Should be called any time the drawing context has changed. | 66 // Should be called any time the drawing context has changed. |
66 void ForceTextureReload(); | 67 void ForceTextureReload(); |
67 | 68 |
68 // Called by the container to enqueue its OpenGL texture objects for | 69 // Called by the container to enqueue its OpenGL texture objects for |
69 // deletion. | 70 // deletion. |
70 void EnqueueTextureForDeletion(GLuint texture); | 71 void EnqueueTextureForDeletion(GLuint texture); |
71 | 72 |
(...skipping 20 matching lines...) Expand all Loading... | |
92 AcceleratedSurfaceContainerMac* root_container_; | 93 AcceleratedSurfaceContainerMac* root_container_; |
93 | 94 |
94 // A list of OpenGL textures waiting to be deleted | 95 // A list of OpenGL textures waiting to be deleted |
95 std::vector<GLuint> textures_pending_deletion_; | 96 std::vector<GLuint> textures_pending_deletion_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); | 98 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); |
98 }; | 99 }; |
99 | 100 |
100 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ | 101 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ |
101 | 102 |
OLD | NEW |