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

Unified Diff: cc/test/fake_layer_tree_host_impl_client.h

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: Rebase; Avoid double activate; Fix OutputSurface init and page scroll delta; Created 7 years, 5 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: cc/test/fake_layer_tree_host_impl_client.h
diff --git a/cc/test/fake_layer_tree_host_impl_client.h b/cc/test/fake_layer_tree_host_impl_client.h
index efc40f2150ac756cd5fd7aa4584e9b51ed4fe5ae..fdd14bedde6b44e425e1a89ca67ab4cf02822e5e 100644
--- a/cc/test/fake_layer_tree_host_impl_client.h
+++ b/cc/test/fake_layer_tree_host_impl_client.h
@@ -12,6 +12,10 @@ namespace cc {
class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
public:
+ void SetLayerTreeHostImpl(LayerTreeHostImpl *host_impl) {
+ host_impl_ = host_impl;
+ }
+
// LayerTreeHostImplClient implementation.
virtual void DidTryInitializeRendererOnImplThread(
bool success,
@@ -21,6 +25,9 @@ class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
virtual void BeginFrameOnImplThread(const BeginFrameArgs& args)
OVERRIDE {}
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE {}
+ virtual void NotifyReadyToActivate() OVERRIDE {
+ host_impl_->ActivatePendingTree();
+ }
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE {}
virtual void SetNeedsRedrawOnImplThread() OVERRIDE {}
virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) OVERRIDE {}
@@ -39,6 +46,9 @@ class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient {
virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta)
OVERRIDE {}
virtual void DidActivatePendingTree() OVERRIDE {}
+
+ protected:
+ LayerTreeHostImpl *host_impl_;
};
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698