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

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: Created 5 years, 2 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/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"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // and set ProxyImpl. 70 // and set ProxyImpl.
71 ThreadProxy* thread_proxy, 71 ThreadProxy* thread_proxy,
72 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 72 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
73 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 73 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
74 74
75 ~ThreadedChannel() override; 75 ~ThreadedChannel() override;
76 76
77 // ChannelMain Implementation 77 // ChannelMain Implementation
78 void SetThrottleFrameProductionOnImpl(bool throttle) override; 78 void SetThrottleFrameProductionOnImpl(bool throttle) override;
79 void SetLayerTreeHostClientReadyOnImpl() override; 79 void SetLayerTreeHostClientReadyOnImpl() override;
80 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
81 void MainThreadHasStoppedFlingingOnImpl() override;
82 void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
83 void SetDeferCommitsOnImpl(bool defer_commits) override;
84
85 // Blocking calls to ProxyImpl
86 void FinishAllRenderingOnImpl() override;
87 void SetVisibleOnImpl(bool visible) override;
88 void ReleaseOutputSurfaceOnImpl() override;
89 void FinishGLOnImpl() override;
90 void MainFrameWillHappenOnImplForTesting(
91 bool* main_frame_will_happen) override;
80 92
81 // ChannelImpl Implementation 93 // ChannelImpl Implementation
82 void DidCompleteSwapBuffers() override; 94 void DidCompleteSwapBuffers() override;
95 void SetRendererCapabilitiesMainCopy(
96 const RendererCapabilities& capabilities) override;
97 void BeginMainFrameNotExpectedSoon() override;
98 void DidCommitAndDrawFrame() override;
99 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue) override;
100 void DidLoseOutputSurface() override;
101 void RequestNewOutputSurface() override;
102 void DidInitializeOutputSurface(
103 bool success,
104 const RendererCapabilities& capabilities) override;
105 void DidCompletePageScaleAnimation() override;
106 void PostFrameTimingEventsToMain(
David Trainor- moved to gerrit 2015/09/30 14:44:56 ToMain -> OnMain?
Khushal 2015/09/30 15:26:34 Done.
107 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
108 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
109 override;
110
111 // TODO(khushalsagar): Remove this. Temporary method to create the weak
112 // pointer on the impl thread
113 void InitImplThreadWeakPtr();
114 void InvalidateImplThreadWeakPtr();
83 115
84 protected: 116 protected:
85 ThreadedChannel(ThreadProxy* thread_proxy, 117 ThreadedChannel(ThreadProxy* thread_proxy,
86 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 118 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
87 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 119 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
88 120
89 private: 121 private:
90 base::SingleThreadTaskRunner* MainThreadTaskRunner() const; 122 base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
91 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const; 123 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
92 124
125 void BlockingFinishAllRenderingOnImpl(CompletionEvent* completion);
126 void BlockingSetVisibleOnImpl(CompletionEvent* completion, bool visible);
127 void BlockingReleaseOutputSurfaceOnImpl(CompletionEvent* completion);
128 void BlockingFinishGLOnImpl(CompletionEvent* completion);
129 void BlockingMainFrameWillHappenOnImplForTesting(
130 CompletionEvent* completion,
131 bool* main_frame_will_happen);
132
93 ProxyMain* proxy_main_; 133 ProxyMain* proxy_main_;
94 134
95 ProxyImpl* proxy_impl_; 135 ProxyImpl* proxy_impl_;
96 136
97 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 137 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
98 138
99 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 139 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
100 140
141 // TODO(khushalsagar): Initialize this in ThreadedChannel when ChannelImpl
142 // gets initialization call.
143 base::WeakPtr<ThreadedChannel> impl_thread_weak_ptr_;
144
145 base::WeakPtrFactory<ThreadedChannel> impl_weak_factory_;
David Trainor- moved to gerrit 2015/09/30 14:44:57 Will we still store the weak factory here in the f
Khushal 2015/09/30 15:26:34 Yes. We can probably have an accessor for this to
146
101 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel); 147 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
102 }; 148 };
103 149
104 } // namespace cc 150 } // namespace cc
105 151
106 #endif // CC_TREES_THREADED_CHANNEL_H_ 152 #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