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

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

Issue 3391011: Map: Guard concurrent accesses to a std::map by a lock in drawing code. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
index bbfa490e73b8d84b9977909e16be12919f6523e9..0e38c1194f18041675055764d0c51ca2ecb46df4 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
@@ -11,6 +11,7 @@
#include "app/surface/transport_dib.h"
#include "base/basictypes.h"
+#include "base/lock.h"
#include "gfx/native_widget_types.h"
namespace webkit_glue {
@@ -106,6 +107,11 @@ class AcceleratedSurfaceContainerManagerMac {
// created, this is set to |false| while the compositor is not needed.
bool gpu_rendering_active_;
+ // Both |plugin_window_to_container_map_| and the
+ // AcceleratedSurfaceContainerMac in it are not threadsafe, but accessed from
+ // multiple threads. All these accesses are guarded by this lock.
+ mutable Lock lock_;
+
DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerManagerMac);
};
« no previous file with comments | « no previous file | chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698