| 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 23687b3edf60e952f65bc8cdce8045ce8c6f6e93..50bfbcb269ad363b4134d82d8dc61b7011a7b288 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/gtest_prod_util.h"
|
| #include "base/memory/linked_ptr.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/memory/scoped_ptr.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"
|
| @@ -120,7 +121,8 @@ class RenderWidgetHostViewAura
|
| virtual void AcceleratedSurfaceNew(
|
| int32 width_in_pixel,
|
| int32 height_in_pixel,
|
| - uint64 surface_id) OVERRIDE;
|
| + uint64 surface_id,
|
| + const std::vector<signed char>& mailbox_name) OVERRIDE;
|
| virtual void AcceleratedSurfaceRelease(uint64 surface_id) OVERRIDE;
|
| virtual void GetScreenInfo(WebKit::WebScreenInfo* results) OVERRIDE;
|
| virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
|
| @@ -219,7 +221,7 @@ class RenderWidgetHostViewAura
|
| virtual ~RenderWidgetHostViewAura();
|
|
|
| void UpdateCursorIfOverSelf();
|
| - bool ShouldFastACK(uint64 surface_id);
|
| + bool ShouldFastACK(const gfx::Size& size);
|
| void UpdateExternalTexture();
|
| ui::InputMethod* GetInputMethod() const;
|
|
|
| @@ -243,14 +245,15 @@ class RenderWidgetHostViewAura
|
| bool ShouldMoveToCenter();
|
|
|
| // Run the compositing callbacks.
|
| - void RunCompositingDidCommitCallbacks(ui::Compositor* compositor);
|
| + void RunCompositingDidCommitCallbacks();
|
|
|
| // Insert a sync point into the compositor's command stream and acknowledge
|
| // that we have presented the accelerated surface buffer.
|
| - static void InsertSyncPointAndACK(int32 route_id,
|
| - int gpu_host_id,
|
| - bool presented,
|
| - ui::Compositor* compositor);
|
| + static void InsertSyncPointAndACK(
|
| + int32 route_id,
|
| + int gpu_host_id,
|
| + uint64 surface_handle,
|
| + scoped_refptr<ui::Texture> texture_to_produce);
|
|
|
| // Called when window_ gets added to a new window tree.
|
| void AddingToRootWindow();
|
| @@ -258,21 +261,16 @@ class RenderWidgetHostViewAura
|
| // Called when window_ is removed from the window tree.
|
| void RemovingFromRootWindow();
|
|
|
| - // After clearing |current_surface_|, and waiting for the compositor to finish
|
| - // using it, call this to inform the gpu process.
|
| - void SetSurfaceNotInUseByCompositor(ui::Compositor* compositor);
|
| -
|
| - // This is called every time |current_surface_| usage changes (by thumbnailer,
|
| - // compositor draws, and tab visibility). Every time usage of current surface
|
| - // changes between "may be used" and "certain to not be used" by the ui, we
|
| - // inform the gpu process.
|
| - void AdjustSurfaceProtection();
|
| + // Called after commit for the last reference to the texture going away
|
| + // after it was released as the frontbuffer.
|
| + void SetSurfaceNotInUseByCompositor(scoped_refptr<ui::Texture>);
|
|
|
| // Called after async thumbnailer task completes. Used to call
|
| // AdjustSurfaceProtection.
|
| static void CopyFromCompositingSurfaceFinished(
|
| base::WeakPtr<RenderWidgetHostViewAura> render_widget_host_view,
|
| const base::Callback<void(bool)>& callback,
|
| + scoped_refptr<ui::Texture>,
|
| bool result);
|
|
|
| ui::Compositor* GetCompositor();
|
| @@ -283,6 +281,11 @@ class RenderWidgetHostViewAura
|
| // Converts |rect| from window coordinate to screen coordinate.
|
| gfx::Rect ConvertRectToScreen(const gfx::Rect& rect);
|
|
|
| + void SwapBuffersCompleted(int gpu_host_id,
|
| + int route_id,
|
| + uint64 surface_handle,
|
| + scoped_refptr<ui::Texture> texture);
|
| +
|
| // The model object.
|
| RenderWidgetHostImpl* host_;
|
|
|
| @@ -335,27 +338,20 @@ class RenderWidgetHostViewAura
|
| // The scale factor of the display the renderer is currently on.
|
| float device_scale_factor_;
|
|
|
| - std::vector< base::Callback<void(ui::Compositor*)> >
|
| - on_compositing_did_commit_callbacks_;
|
| + std::vector<base::Closure> on_compositing_did_commit_callbacks_;
|
|
|
| - std::map<uint64, scoped_refptr<ui::Texture> >
|
| - image_transport_clients_;
|
| + std::map<uint64, scoped_refptr<ui::Texture> > image_transport_clients_;
|
|
|
| + // The identifier of the current frontbuffer.
|
| 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,
|
| - // and tab visibility.
|
| - bool current_surface_is_protected_;
|
| - bool current_surface_in_use_by_compositor_;
|
| + // The damage in the previous buffer.
|
| + gfx::Rect previous_damage_rect_;
|
|
|
| - int pending_thumbnail_tasks_;
|
| + // Pending damage from previous frames that we skipped.
|
| + gfx::Rect skipped_damage_;
|
|
|
| - // This id increments every time surface_is_protected changes. We tag IPC
|
| - // messages which rely on protection state with this id to stay in sync.
|
| - uint32 protection_state_id_;
|
| -
|
| - int32 surface_route_id_;
|
| + int pending_thumbnail_tasks_;
|
|
|
| gfx::GLSurfaceHandle shared_surface_handle_;
|
|
|
|
|