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

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

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 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h" 5 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/renderer_host/accelerated_surface_container_mac.h" 8 #include "chrome/browser/renderer_host/accelerated_surface_container_mac.h"
9 #include "webkit/glue/webplugin.h" 9 #include "webkit/glue/webplugin.h"
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 // Unbind any texture from the texture target to ensure that the 76 // Unbind any texture from the texture target to ensure that the
77 // next time through we will have to re-bind the texture and thereby 77 // next time through we will have to re-bind the texture and thereby
78 // pick up modifications from the other process. 78 // pick up modifications from the other process.
79 glBindTexture(target, 0); 79 glBindTexture(target, 0);
80 80
81 glFlush(); 81 glFlush();
82 } 82 }
83 83
84 void AcceleratedSurfaceContainerManagerMac::ForceTextureReload() {
85 for (PluginWindowToContainerMap::const_iterator i =
86 plugin_window_to_container_map_.begin();
87 i != plugin_window_to_container_map_.end(); ++i) {
88 AcceleratedSurfaceContainerMac* container = i->second;
89 container->ForceTextureReload();
90 }
91 }
92
84 void AcceleratedSurfaceContainerManagerMac::EnqueueTextureForDeletion( 93 void AcceleratedSurfaceContainerManagerMac::EnqueueTextureForDeletion(
85 GLuint texture) { 94 GLuint texture) {
86 if (texture) { 95 if (texture) {
87 textures_pending_deletion_.push_back(texture); 96 textures_pending_deletion_.push_back(texture);
88 } 97 }
89 } 98 }
90 99
91 AcceleratedSurfaceContainerMac* 100 AcceleratedSurfaceContainerMac*
92 AcceleratedSurfaceContainerManagerMac::MapIDToContainer( 101 AcceleratedSurfaceContainerManagerMac::MapIDToContainer(
93 gfx::PluginWindowHandle id) { 102 gfx::PluginWindowHandle id) {
94 PluginWindowToContainerMap::const_iterator i = 103 PluginWindowToContainerMap::const_iterator i =
95 plugin_window_to_container_map_.find(id); 104 plugin_window_to_container_map_.find(id);
96 if (i != plugin_window_to_container_map_.end()) 105 if (i != plugin_window_to_container_map_.end())
97 return i->second; 106 return i->second;
98 107
99 LOG(ERROR) << "Request for plugin container for unknown window id " << id; 108 LOG(ERROR) << "Request for plugin container for unknown window id " << id;
100 109
101 return NULL; 110 return NULL;
102 } 111 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698