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

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 1ebce105ab25a9cb0571e41dde6dc3d375185d71..f947b046aae496add0562f5aa74702cc4aa2eb8a 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.
@@ -931,6 +932,8 @@ void RenderWidgetHostViewMac::RenderViewGone(base::TerminationStatus status,
}
void RenderWidgetHostViewMac::Destroy() {
+ // TODO(backer): Do we need to dealloc compositing_surface_?
+
// On Windows, popups are implemented with a popup window style, so that when
// an event comes in that would "cancel" it, it receives the OnCancelMode
// message and can kill itself. Alas, on the Mac, views cannot capture events
@@ -1297,13 +1300,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