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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index bc9fbe9ccd49d3a0573d1f58453fc91a51307c5a..fdbb4973acc68b3a81189d3ec86cd1bdb969cf35 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -52,11 +52,20 @@ class RWHVMEditCommandHelper;
// insertText: and insertNewline: to synthesize the corresponding Char event.
scoped_nsobject<NSEvent> currentKeyEvent_;
NSWindow* lastWindow_; // weak
+
+ // The Core Animation layer, if any, hosting the accelerated plugins' output.
+ scoped_nsobject<CALayer> accelerated_plugin_layer_;
}
- (void)setCanBeKeyView:(BOOL)can;
- (void)setCloseOnDeactivate:(BOOL)b;
- (void)setToolTipAtMousePoint:(NSString *)string;
+// Makes sure that the initial layer setup for accelerated plugin drawing has
+// been done. Can be called multiple times.
+- (void)ensureAcceleratedPluginLayer;
+// Triggers a refresh of the accelerated plugin layer; should be called whenever
+// the shared surface for one of the plugins is updated.
+- (void)drawAcceleratedPluginLayer;
@end
///////////////////////////////////////////////////////////////////////////////
@@ -139,6 +148,9 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
// Draws the current GPU-accelerated plug-in instances into the given context.
virtual void DrawAcceleratedSurfaceInstances(CGLContextObj context);
+ // Informs the plug-in instances that their drawing context has changed.
+ virtual void AcceleratedSurfaceContextChanged();
+
virtual void SetVisuallyDeemphasized(bool deemphasized);
void KillSelf();
@@ -207,9 +219,6 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
// methods needs it.
NSRect im_caret_rect_;
- // The Core Animation layer, if any, hosting the GPU plugins' output.
- scoped_nsobject<CALayer> gpu_plugin_layer_;
-
private:
// Updates the display cursor to the current cursor if the cursor is over this
// render view.

Powered by Google App Engine
This is Rietveld 408576698