Index: content/browser/renderer_host/render_widget_host_view_aura.h |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h |
index 2253801f03038907e63fe6c71ba7823a50aa5cfd..ae56ae16ac39a57a5f97dc56d3df5b220b82a1f6 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.h |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h |
@@ -12,6 +12,7 @@ |
#include "base/callback.h" |
#include "base/memory/linked_ptr.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "content/browser/renderer_host/image_transport_factory.h" |
#include "content/browser/renderer_host/render_widget_host_view_base.h" |
#include "content/common/content_export.h" |
@@ -52,7 +53,8 @@ class RenderWidgetHostViewAura |
public ui::TextInputClient, |
public aura::WindowDelegate, |
public aura::client::ActivationDelegate, |
- public ImageTransportFactoryObserver { |
+ public ImageTransportFactoryObserver, |
+ public base::SupportsWeakPtr<RenderWidgetHostViewAura> { |
public: |
virtual ~RenderWidgetHostViewAura(); |
@@ -115,7 +117,8 @@ class RenderWidgetHostViewAura |
int32 width_in_pixel, |
int32 height_in_pixel, |
uint64* surface_id, |
- TransportDIB::Handle* surface_handle) OVERRIDE; |
+ TransportDIB::Handle* surface_handle, |
+ int32 route_id) OVERRIDE; |
virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE; |
virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE; |
virtual gfx::Rect GetRootWindowBounds() OVERRIDE; |
@@ -225,6 +228,12 @@ class RenderWidgetHostViewAura |
// Called when window_ is removed from the window tree. |
void RemovingFromRootWindow(); |
+ void SetSurfaceNotInUseByCompositor(); |
+ void AdjustSurfaceProtection(); |
+ |
+ void CopyFromCompositingSurfaceFinished(base::Callback<void(bool)> callback, |
+ bool result); |
+ |
ui::Compositor* GetCompositor(); |
// The model object. |
@@ -280,6 +289,20 @@ class RenderWidgetHostViewAura |
uint64 current_surface_; |
+ // Protected means that the current_surface_ may be in use by ui and cannot |
+ // be safely discarded. Things to consider are thumbnailer, compositor draw |
+ // pending, and tab visibility. |
+ bool current_surface_is_protected_; |
+ bool current_surface_in_use_by_compositor_; |
+ |
+ int pending_thumbnail_tasks_; |
+ |
+ // This id increments every time surface_is_protected changes. |
+ // Keeps gpu/browser IPC messages relying on protection state in sync. |
+ uint32 protection_state_id_; |
+ |
+ int32 surface_route_id_; |
+ |
gfx::GLSurfaceHandle shared_surface_handle_; |
// If non-NULL we're in OnPaint() and this is the supplied canvas. |