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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_mac.mm

Issue 6840060: Progress towards fixing 77536 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 8 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.mm
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index fb5527b303ac9d96e377aed0484dc98ee68aaa66..0dd5487d79fd3b27a44d8be9d9e5f5d21f1ea6a7 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -595,7 +595,8 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget)
is_loading_(false),
is_hidden_(false),
shutdown_factory_(this),
- needs_gpu_visibility_update_after_repaint_(false) {
+ needs_gpu_visibility_update_after_repaint_(false),
+ compositing_surface_(gfx::kNullPluginWindow) {
// |cocoa_view_| owns us and we will be deleted when |cocoa_view_| goes away.
// Since we autorelease it, our caller must put |native_view()| into the view
// hierarchy right after calling us.
@@ -1297,13 +1298,11 @@ void RenderWidgetHostViewMac::GpuRenderingStateDidChange() {
}
}
-gfx::PluginWindowHandle RenderWidgetHostViewMac::AcquireCompositingSurface() {
- return AllocateFakePluginWindowHandle(/*opaque=*/true, /*root=*/true);
-}
-
-void RenderWidgetHostViewMac::ReleaseCompositingSurface(
- gfx::PluginWindowHandle surface) {
- DestroyFakePluginWindowHandle(surface);
+gfx::PluginWindowHandle RenderWidgetHostViewMac::GetCompositingSurface() {
+ if (compositing_surface_ == gfx::kNullPluginWindow)
+ compositing_surface_ = AllocateFakePluginWindowHandle(
+ /*opaque=*/true, /*root=*/true);
+ return compositing_surface_;
}
void RenderWidgetHostViewMac::DrawAcceleratedSurfaceInstance(

Powered by Google App Engine
This is Rietveld 408576698