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

Side by Side Diff: chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h

Issue 1166002: Fix handling of Mac accelerated plugin layers across tab switch. (Closed)
Patch Set: Created 10 years, 9 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
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 7
8 #include <OpenGL/OpenGL.h> 8 #include <OpenGL/OpenGL.h>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 TransportDIB::Handle transport_dib); 46 TransportDIB::Handle transport_dib);
47 47
48 // Takes an update from WebKit about a plugin's position and size and moves 48 // Takes an update from WebKit about a plugin's position and size and moves
49 // the plugin accordingly. 49 // the plugin accordingly.
50 void MovePluginContainer(const webkit_glue::WebPluginGeometry& move); 50 void MovePluginContainer(const webkit_glue::WebPluginGeometry& move);
51 51
52 // Draws all of the managed plugin containers into the given OpenGL 52 // Draws all of the managed plugin containers into the given OpenGL
53 // context, which must already be current. 53 // context, which must already be current.
54 void Draw(CGLContextObj context); 54 void Draw(CGLContextObj context);
55 55
56 // Causes the next Draw call on each container to trigger a texture upload.
57 // Should be called any time the drawing context has changed.
58 void ForceTextureReload();
59
56 // Called by the container to enqueue its OpenGL texture objects for 60 // Called by the container to enqueue its OpenGL texture objects for
57 // deletion. 61 // deletion.
58 void EnqueueTextureForDeletion(GLuint texture); 62 void EnqueueTextureForDeletion(GLuint texture);
59 63
60 private: 64 private:
61 uint32 current_id_; 65 uint32 current_id_;
62 66
63 // Maps a "fake" plugin window handle to the corresponding container. 67 // Maps a "fake" plugin window handle to the corresponding container.
64 AcceleratedSurfaceContainerMac* MapIDToContainer(gfx::PluginWindowHandle id); 68 AcceleratedSurfaceContainerMac* MapIDToContainer(gfx::PluginWindowHandle id);
65 69
66 // A map that associates plugin window handles with their containers. 70 // A map that associates plugin window handles with their containers.
67 typedef std::map<gfx::PluginWindowHandle, AcceleratedSurfaceContainerMac*> 71 typedef std::map<gfx::PluginWindowHandle, AcceleratedSurfaceContainerMac*>
68 PluginWindowToContainerMap; 72 PluginWindowToContainerMap;
69 PluginWindowToContainerMap plugin_window_to_container_map_; 73 PluginWindowToContainerMap plugin_window_to_container_map_;
70 74
71 // A list of OpenGL textures waiting to be deleted 75 // A list of OpenGL textures waiting to be deleted
72 std::vector<GLuint> textures_pending_deletion_; 76 std::vector<GLuint> textures_pending_deletion_;
73 77
74 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac); 78 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac);
75 }; 79 };
76 80
77 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_ 81 #endif // CHROME_BROWSER_RENDERER_HOST_GPU_PLUGIN_CONTAINER_MANAGER_MAC_H_
78 82
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698