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 cd5e559dc9366173ce95faaa731107c7f982e15a..25ed41676149d65186d3a45940eb23e8580d1bb5 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.h |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h |
@@ -6,6 +6,7 @@ |
#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
#include <map> |
+#include <utility> |
#include <vector> |
#include "base/callback.h" |
@@ -31,6 +32,7 @@ class Canvas; |
} |
namespace ui { |
+class CompositorLock; |
class InputMethod; |
class Texture; |
} |
@@ -194,8 +196,6 @@ class RenderWidgetHostViewAura |
friend class WindowObserver; |
// Overridden from ui::CompositorObserver: |
- virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE; |
- virtual void OnCompositingWillStart(ui::Compositor* compositor) OVERRIDE; |
virtual void OnCompositingStarted(ui::Compositor* compositor) OVERRIDE; |
virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE; |
virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE; |
@@ -207,6 +207,15 @@ class RenderWidgetHostViewAura |
void UpdateCursorIfOverSelf(); |
void UpdateExternalTexture(); |
+ |
+ // Given the size of the latest accelerated surface from the renderer, |
+ // deactivate and remove spent locks. |
+ void UpdateResizeLocks(const gfx::Size& surface_size_in_dip); |
+ |
+ // Returns true if no pending resize locks have timed-out and |
+ // there is more than one active resize lock pending. |
+ bool CanFastTrackACK(const gfx::Size& surface_size_in_dip); |
+ |
ui::InputMethod* GetInputMethod() const; |
// Returns whether the widget needs an input grab to work properly. |
@@ -228,9 +237,11 @@ class RenderWidgetHostViewAura |
// moved to center. |
bool ShouldMoveToCenter(); |
- // Run the compositing callbacks. |
- void RunCompositingDidCommitCallbacks(ui::Compositor* compositor); |
- void RunCompositingWillStartCallbacks(ui::Compositor* compositor); |
+ void RunCompositingStartedCallbacks(ui::Compositor* compositor); |
+ |
+ // Add a callback that waits for a commit and the start of a draw. |
+ void AddCompositingStartedCallback( |
+ base::Callback<void(ui::Compositor*)> callback); |
// Insert a sync point into the compositor's command stream and acknowledge |
// that we have presented the accelerated surface buffer. |
@@ -316,8 +327,9 @@ class RenderWidgetHostViewAura |
std::vector< base::Callback<void(ui::Compositor*)> > |
on_compositing_did_commit_callbacks_; |
- std::vector< base::Callback<void(ui::Compositor*)> > |
- on_compositing_will_start_callbacks_; |
+ typedef std::pair<int, base::Callback<void(ui::Compositor*)> > |
+ CommitIdAndCallback; |
+ std::vector<CommitIdAndCallback> on_compositing_started_callbacks_; |
std::map<uint64, scoped_refptr<ui::Texture> > |
image_transport_clients_; |
@@ -372,7 +384,7 @@ class RenderWidgetHostViewAura |
std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; |
// This lock is for waiting for a front surface to become available to draw. |
- scoped_refptr<aura::CompositorLock> released_front_lock_; |
+ scoped_refptr<ui::CompositorLock> released_front_lock_; |
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
}; |