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

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

Issue 1377063003: Split ThreadProxy methods to ProxyMain and ProxyImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep ProxyMain and ProxyImpl methods private. Created 5 years, 1 month 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/trees/thread_proxy.cc ('k') | cc/trees/threaded_channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_THREADED_CHANNEL_H_ 5 #ifndef CC_TREES_THREADED_CHANNEL_H_
6 #define CC_TREES_THREADED_CHANNEL_H_ 6 #define CC_TREES_THREADED_CHANNEL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/trees/channel_impl.h" 11 #include "cc/trees/channel_impl.h"
12 #include "cc/trees/channel_main.h" 12 #include "cc/trees/channel_main.h"
13 #include "cc/trees/proxy_common.h"
13 #include "cc/trees/proxy_impl.h" 14 #include "cc/trees/proxy_impl.h"
14 #include "cc/trees/proxy_main.h" 15 #include "cc/trees/proxy_main.h"
15 #include "cc/trees/thread_proxy.h" 16 #include "cc/trees/thread_proxy.h"
16 17
17 namespace base { 18 namespace base {
18 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
19 } 20 }
20 21
21 namespace cc { 22 namespace cc {
22 class ChannelImpl; 23 class ChannelImpl;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 73 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
73 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 74 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
74 75
75 ~ThreadedChannel() override; 76 ~ThreadedChannel() override;
76 77
77 // ChannelMain Implementation 78 // ChannelMain Implementation
78 void SetThrottleFrameProductionOnImpl(bool throttle) override; 79 void SetThrottleFrameProductionOnImpl(bool throttle) override;
79 void UpdateTopControlsStateOnImpl(TopControlsState constraints, 80 void UpdateTopControlsStateOnImpl(TopControlsState constraints,
80 TopControlsState current, 81 TopControlsState current,
81 bool animate) override; 82 bool animate) override;
83 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
84 void MainThreadHasStoppedFlingingOnImpl() override;
85 void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
86 void SetDeferCommitsOnImpl(bool defer_commits) override;
87 void SetNeedsCommitOnImpl() override;
88 void BeginMainFrameAbortedOnImpl(CommitEarlyOutReason reason) override;
89 void SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) override;
90
91 // Blocking calls to ProxyImpl
92 void FinishAllRenderingOnImpl(CompletionEvent* completion) override;
93 void SetVisibleOnImpl(CompletionEvent* completion, bool visible) override;
94 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override;
95 void FinishGLOnImpl(CompletionEvent* completion) override;
96 void MainFrameWillHappenOnImplForTesting(
97 CompletionEvent* completion,
98 bool* main_frame_will_happen) override;
99 void StartCommitOnImpl(CompletionEvent* completion) override;
82 100
83 // ChannelImpl Implementation 101 // ChannelImpl Implementation
84 void DidCompleteSwapBuffers() override; 102 void DidCompleteSwapBuffers() override;
103 void SetRendererCapabilitiesMainCopy(
104 const RendererCapabilities& capabilities) override;
105 void BeginMainFrameNotExpectedSoon() override;
106 void DidCommitAndDrawFrame() override;
107 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue) override;
108 void DidLoseOutputSurface() override;
109 void RequestNewOutputSurface() override;
110 void DidInitializeOutputSurface(
111 bool success,
112 const RendererCapabilities& capabilities) override;
113 void DidCompletePageScaleAnimation() override;
114 void PostFrameTimingEventsOnMain(
115 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
116 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
117 override;
118 void BeginMainFrame(
119 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state) override;
85 120
86 protected: 121 protected:
87 ThreadedChannel(ThreadProxy* thread_proxy, 122 ThreadedChannel(ThreadProxy* thread_proxy,
88 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 123 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
89 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 124 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
90 125
91 private: 126 private:
92 base::SingleThreadTaskRunner* MainThreadTaskRunner() const; 127 base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
93 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const; 128 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
94 129
95 ProxyMain* proxy_main_; 130 ProxyMain* proxy_main_;
96 131
97 ProxyImpl* proxy_impl_; 132 ProxyImpl* proxy_impl_;
98 133
134 // TODO(khushalsagar): Temporary variable to access proxy for assertion checks
135 // Remove this once the proxy class is split and the complete
136 // implementation for controlling communication across threads is moved to
137 // ThreadedChannel.
138 Proxy* proxy_;
139
99 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 140 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
100 141
101 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 142 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
102 143
103 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel); 144 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
104 }; 145 };
105 146
106 } // namespace cc 147 } // namespace cc
107 148
108 #endif // CC_TREES_THREADED_CHANNEL_H_ 149 #endif // CC_TREES_THREADED_CHANNEL_H_
OLDNEW
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | cc/trees/threaded_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698