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

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

Issue 2778223005: Plumb activation time to main (Closed)
Patch Set: add baseline test in layer_tree_host_unittest_proxy; initialize source_frame_number is all ctors Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_PROXY_MAIN_H_ 5 #ifndef CC_TREES_PROXY_MAIN_H_
6 #define CC_TREES_PROXY_MAIN_H_ 6 #define CC_TREES_PROXY_MAIN_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/input/browser_controls_state.h" 10 #include "cc/input/browser_controls_state.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 CommitPipelineStage max_requested_pipeline_stage() const { 54 CommitPipelineStage max_requested_pipeline_stage() const {
55 return max_requested_pipeline_stage_; 55 return max_requested_pipeline_stage_;
56 } 56 }
57 CommitPipelineStage current_pipeline_stage() const { 57 CommitPipelineStage current_pipeline_stage() const {
58 return current_pipeline_stage_; 58 return current_pipeline_stage_;
59 } 59 }
60 CommitPipelineStage final_pipeline_stage() const { 60 CommitPipelineStage final_pipeline_stage() const {
61 return final_pipeline_stage_; 61 return final_pipeline_stage_;
62 } 62 }
63 63
64 BeginFrameArgs BeginFrameArgsForTesting() {
65 return begin_frame_args_for_testing_;
66 }
67
64 private: 68 private:
65 // Proxy implementation. 69 // Proxy implementation.
66 bool IsStarted() const override; 70 bool IsStarted() const override;
67 bool CommitToActiveTree() const override; 71 bool CommitToActiveTree() const override;
68 void SetCompositorFrameSink( 72 void SetCompositorFrameSink(
69 CompositorFrameSink* compositor_frame_sink) override; 73 CompositorFrameSink* compositor_frame_sink) override;
70 void SetVisible(bool visible) override; 74 void SetVisible(bool visible) override;
71 void SetNeedsAnimate() override; 75 void SetNeedsAnimate() override;
72 void SetNeedsUpdateLayers() override; 76 void SetNeedsUpdateLayers() override;
73 void SetNeedsCommit() override; 77 void SetNeedsCommit() override;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 126
123 bool defer_commits_; 127 bool defer_commits_;
124 128
125 // ProxyImpl is created and destroyed on the impl thread, and should only be 129 // ProxyImpl is created and destroyed on the impl thread, and should only be
126 // accessed on the impl thread. 130 // accessed on the impl thread.
127 // It is safe to use base::Unretained to post tasks to ProxyImpl on the impl 131 // It is safe to use base::Unretained to post tasks to ProxyImpl on the impl
128 // thread, since we control its lifetime. Any tasks posted to it are bound to 132 // thread, since we control its lifetime. Any tasks posted to it are bound to
129 // run before we destroy it on the impl thread. 133 // run before we destroy it on the impl thread.
130 std::unique_ptr<ProxyImpl> proxy_impl_; 134 std::unique_ptr<ProxyImpl> proxy_impl_;
131 135
136 BeginFrameArgs begin_frame_args_for_testing_;
brianderson 2017/04/13 22:36:37 Can you store this in LayerTreeTest from an overri
panicker 2017/04/14 22:02:45 Can you elaborate on what you mean exactly: - Stor
panicker 2017/04/17 21:54:50 Addressed
137
132 base::WeakPtrFactory<ProxyMain> weak_factory_; 138 base::WeakPtrFactory<ProxyMain> weak_factory_;
133 139
134 DISALLOW_COPY_AND_ASSIGN(ProxyMain); 140 DISALLOW_COPY_AND_ASSIGN(ProxyMain);
135 }; 141 };
136 142
137 } // namespace cc 143 } // namespace cc
138 144
139 #endif // CC_TREES_PROXY_MAIN_H_ 145 #endif // CC_TREES_PROXY_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698