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

Side by Side Diff: cc/trees/thread_proxy.h

Issue 242783003: cc: Add testing stubs for proxy test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use LayerTreeTest harness Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_THREAD_PROXY_H_ 5 #ifndef CC_TREES_THREAD_PROXY_H_
6 #define CC_TREES_THREAD_PROXY_H_ 6 #define CC_TREES_THREAD_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 namespace cc { 25 namespace cc {
26 26
27 class ContextProvider; 27 class ContextProvider;
28 class InputHandlerClient; 28 class InputHandlerClient;
29 class LayerTreeHost; 29 class LayerTreeHost;
30 class ResourceUpdateQueue; 30 class ResourceUpdateQueue;
31 class Scheduler; 31 class Scheduler;
32 class ScopedThreadProxy; 32 class ScopedThreadProxy;
33 class ThreadProxyTestAPI;
33 34
34 class ThreadProxy : public Proxy, 35 class CC_EXPORT ThreadProxy : public Proxy,
35 LayerTreeHostImplClient, 36 LayerTreeHostImplClient,
36 SchedulerClient, 37 SchedulerClient,
37 ResourceUpdateControllerClient { 38 ResourceUpdateControllerClient {
38 public: 39 public:
39 static scoped_ptr<Proxy> Create( 40 static scoped_ptr<Proxy> Create(
40 LayerTreeHost* layer_tree_host, 41 LayerTreeHost* layer_tree_host,
41 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 42 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
42 43
43 virtual ~ThreadProxy(); 44 virtual ~ThreadProxy();
44 45
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 virtual void ScheduledActionManageTiles() OVERRIDE; 116 virtual void ScheduledActionManageTiles() OVERRIDE;
116 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; 117 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE;
117 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; 118 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE;
118 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; 119 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE;
119 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; 120 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE;
120 virtual void DidBeginImplFrameDeadline() OVERRIDE; 121 virtual void DidBeginImplFrameDeadline() OVERRIDE;
121 122
122 // ResourceUpdateControllerClient implementation 123 // ResourceUpdateControllerClient implementation
123 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; 124 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE;
124 125
125 private: 126 protected:
126 ThreadProxy(LayerTreeHost* layer_tree_host, 127 ThreadProxy(LayerTreeHost* layer_tree_host,
127 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 128 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
128 129
130 private:
131 friend class ThreadProxyTestAPI;
132
129 struct BeginMainFrameAndCommitState { 133 struct BeginMainFrameAndCommitState {
130 BeginMainFrameAndCommitState(); 134 BeginMainFrameAndCommitState();
131 ~BeginMainFrameAndCommitState(); 135 ~BeginMainFrameAndCommitState();
132 136
133 base::TimeTicks monotonic_frame_begin_time; 137 base::TimeTicks monotonic_frame_begin_time;
134 scoped_ptr<ScrollAndScaleSet> scroll_info; 138 scoped_ptr<ScrollAndScaleSet> scroll_info;
135 size_t memory_allocation_limit_bytes; 139 size_t memory_allocation_limit_bytes;
136 int memory_allocation_priority_cutoff; 140 int memory_allocation_priority_cutoff;
137 bool evicted_ui_resources; 141 bool evicted_ui_resources;
138 }; 142 };
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 310
307 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 311 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
308 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 312 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
309 313
310 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 314 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
311 }; 315 };
312 316
313 } // namespace cc 317 } // namespace cc
314 318
315 #endif // CC_TREES_THREAD_PROXY_H_ 319 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW
« cc/trees/layer_tree_host_unittest_proxy.cc ('K') | « cc/trees/layer_tree_host_unittest_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698