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

Side by Side Diff: cc/test/proxy_impl_for_test.h

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: test Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/proxy_impl_for_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_PROXY_IMPL_FOR_TEST_H_
6 #define CC_TEST_PROXY_IMPL_FOR_TEST_H_
7
8 #include "base/macros.h"
9 #include "cc/test/test_hooks.h"
10 #include "cc/trees/proxy_impl.h"
11
12 namespace cc {
13 // Creates a ProxyImpl that notifies the supplied |test_hooks| of various
14 // actions.
15 class ProxyImplForTest : public ProxyImpl {
16 public:
17 static std::unique_ptr<ProxyImplForTest> Create(
18 TestHooks* test_hooks,
19 ChannelImpl* channel_impl,
20 LayerTreeHost* layer_tree_host,
21 TaskRunnerProvider* task_runner_provider,
22 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
23
24 using ProxyImpl::PostAnimationEventsToMainThreadOnImplThread;
25 using ProxyImpl::DidLoseOutputSurfaceOnImplThread;
26 using ProxyImpl::DidCompletePageScaleAnimationOnImplThread;
27 using ProxyImpl::SendBeginMainFrameNotExpectedSoon;
28
29 const DelayedUniqueNotifier& smoothness_priority_expiration_notifier() const {
30 return smoothness_priority_expiration_notifier_;
31 }
32
33 ProxyImplForTest(
34 TestHooks* test_hooks,
35 ChannelImpl* channel_impl,
36 LayerTreeHost* layer_tree_host,
37 TaskRunnerProvider* task_runner_provider,
38 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
39
40 void ScheduledActionSendBeginMainFrame(const BeginFrameArgs& args) override;
41 DrawResult ScheduledActionDrawAndSwapIfPossible() override;
42 void ScheduledActionCommit() override;
43 void ScheduledActionBeginOutputSurfaceCreation() override;
44 void ScheduledActionPrepareTiles() override;
45 void ScheduledActionInvalidateOutputSurface() override;
46 void SendBeginMainFrameNotExpectedSoon() override;
47 void DidActivateSyncTree() override;
48 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
49 void MainThreadHasStoppedFlingingOnImpl() override;
50 void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
51 void UpdateTopControlsStateOnImpl(TopControlsState constraints,
52 TopControlsState current,
53 bool animate) override;
54 void SetDeferCommitsOnImpl(bool defer_commits) const override;
55 void BeginMainFrameAbortedOnImpl(
56 CommitEarlyOutReason reason,
57 base::TimeTicks main_thread_start_time) override;
58 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) override;
59 void SetNeedsCommitOnImpl() override;
60 void FinishAllRenderingOnImpl(CompletionEvent* completion) override;
61 void SetVisibleOnImpl(bool visible) override;
62 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override;
63 void FinishGLOnImpl(CompletionEvent* completion) override;
64 void StartCommitOnImpl(CompletionEvent* completion,
65 LayerTreeHost* layer_tree_host,
66 base::TimeTicks main_thread_start_time,
67 bool hold_commit_for_activation) override;
68
69 TestHooks* test_hooks_;
70 };
71
72 } // namespace cc
73
74 #endif // CC_TEST_PROXY_IMPL_FOR_TEST_H_
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/test/proxy_impl_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698