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

Unified Diff: chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc

Issue 3185004: Cleanups to well-behaved accelerated plugin CL requested by... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
===================================================================
--- chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc (revision 56221)
+++ chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc (working copy)
@@ -65,34 +65,16 @@
container->SetSizeAndTransportDIB(width, height, transport_dib);
}
-void AcceleratedSurfaceContainerManagerMac::MovePluginContainer(
+void AcceleratedSurfaceContainerManagerMac::SetPluginContainerGeometry(
const webkit_glue::WebPluginGeometry& move) {
AcceleratedSurfaceContainerMac* container = MapIDToContainer(move.window);
if (container)
- container->MoveTo(move);
+ container->SetGeometry(move);
}
void AcceleratedSurfaceContainerManagerMac::Draw(CGLContextObj context,
gfx::PluginWindowHandle id,
bool draw_root_container) {
- // Clean up old texture objects. This is essentially a pre-emptive
- // cleanup, as the resources will be released when the OpenGL
- // context associated with the CAOpenGLLayer is destroyed. However,
- // if we render many plugins in the same layer, we should try to
- // eagerly reclaim their resources. Note also that the OpenGL
- // context must be current when performing the deletion, and it
- // seems risky to make the OpenGL context current at an arbitrary
- // point in time, which is why the deletion does not occur in the
- // container's destructor.
- for (std::vector<GLuint>::iterator iter =
- textures_pending_deletion_.begin();
- iter != textures_pending_deletion_.end();
- ++iter) {
- GLuint texture = *iter;
- glDeleteTextures(1, &texture);
- }
- textures_pending_deletion_.clear();
-
glColorMask(true, true, true, true);
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -123,13 +105,6 @@
}
}
-void AcceleratedSurfaceContainerManagerMac::EnqueueTextureForDeletion(
- GLuint texture) {
- if (texture) {
- textures_pending_deletion_.push_back(texture);
- }
-}
-
AcceleratedSurfaceContainerMac*
AcceleratedSurfaceContainerManagerMac::MapIDToContainer(
gfx::PluginWindowHandle id) {

Powered by Google App Engine
This is Rietveld 408576698