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 70d244f43ec88b2ca9a0f63c98f8571270d4adba..c6076f3e87c417243767bffa3c690f5696b78e01 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.h |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h |
@@ -24,7 +24,6 @@ |
#include "webkit/glue/webcursor.h" |
namespace aura { |
-class CompositorLock; |
class WindowTracker; |
} |
@@ -33,6 +32,7 @@ class Canvas; |
} |
namespace ui { |
+class CompositorLock; |
class InputMethod; |
class Texture; |
} |
@@ -206,10 +206,11 @@ class RenderWidgetHostViewAura |
// 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; |
+ virtual void OnCompositingLockStateChanged( |
+ ui::Compositor* compositor) OVERRIDE; |
// Overridden from ImageTransportFactoryObserver: |
virtual void OnLostResources() OVERRIDE; |
@@ -217,6 +218,7 @@ class RenderWidgetHostViewAura |
virtual ~RenderWidgetHostViewAura(); |
void UpdateCursorIfOverSelf(); |
+ bool ShouldFastACK(uint64 surface_id); |
void UpdateExternalTexture(); |
ui::InputMethod* GetInputMethod() const; |
@@ -241,12 +243,12 @@ class RenderWidgetHostViewAura |
// Run the compositing callbacks. |
void RunCompositingDidCommitCallbacks(ui::Compositor* compositor); |
- void RunCompositingWillStartCallbacks(ui::Compositor* compositor); |
// 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); |
// Called when window_ is removed from the window tree. |
@@ -330,9 +332,6 @@ 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_; |
- |
std::map<uint64, scoped_refptr<ui::Texture> > |
image_transport_clients_; |
@@ -379,19 +378,32 @@ class RenderWidgetHostViewAura |
// Used to prevent further resizes while a resize is pending. |
class ResizeLock; |
+ typedef std::vector<linked_ptr<ResizeLock> > ResizeLockList; |
+ |
// These locks are the ones waiting for a texture of the right size to come |
// back from the renderer/GPU process. |
- std::vector<linked_ptr<ResizeLock> > resize_locks_; |
- // These locks are the ones waiting for a frame to be drawn. |
- std::vector<linked_ptr<ResizeLock> > locks_pending_draw_; |
+ ResizeLockList resize_locks_; |
+ // These locks are the ones waiting for a frame to be committed. |
+ ResizeLockList locks_pending_commit_; |
// 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_; |
// Used to track the state of the window we're created from. Only used when |
// created fullscreen. |
scoped_ptr<aura::WindowTracker> host_tracker_; |
+ enum CanLockCompositorState { |
+ YES, |
+ // We locked, so at some point we'll need to kick a frame. |
+ YES_DID_LOCK, |
+ // No. A lock timed out, we need to kick a new frame before locking again. |
+ NO_PENDING_RENDERER_FRAME, |
+ // No. We've got a frame, but it hasn't been committed. |
+ NO_PENDING_COMMIT, |
+ }; |
+ CanLockCompositorState can_lock_compositor_; |
+ |
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
}; |