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

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: Use completion events for blocking calls from ProxyMain. 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // sequence. Currently ThreadProxy implements both so we pass the pointer 69 // sequence. Currently ThreadProxy implements both so we pass the pointer
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 InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
80 void MainThreadHasStoppedFlingingOnImpl() override;
81 void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
82 void SetDeferCommitsOnImpl(bool defer_commits) override;
83
84 // Blocking calls to ProxyImpl
85 void FinishAllRenderingOnImpl(CompletionEvent* completion) override;
86 void SetVisibleOnImpl(CompletionEvent* completion, bool visible) override;
87 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override;
88 void FinishGLOnImpl(CompletionEvent* completion) override;
89 void MainFrameWillHappenOnImplForTesting(
90 CompletionEvent* completion,
91 bool* main_frame_will_happen) override;
79 92
80 // ChannelImpl Implementation 93 // ChannelImpl Implementation
81 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 PostFrameTimingEventsOnMain(
107 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
108 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
109 override;
82 110
83 protected: 111 protected:
84 ThreadedChannel(ThreadProxy* thread_proxy, 112 ThreadedChannel(ThreadProxy* thread_proxy,
85 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 113 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
86 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 114 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
87 115
88 private: 116 private:
89 base::SingleThreadTaskRunner* MainThreadTaskRunner() const; 117 base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
90 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const; 118 base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
91 119
92 ProxyMain* proxy_main_; 120 ProxyMain* proxy_main_;
93 121
94 ProxyImpl* proxy_impl_; 122 ProxyImpl* proxy_impl_;
95 123
96 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 124 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
97 125
98 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; 126 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
99 127
100 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel); 128 DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
101 }; 129 };
102 130
103 } // namespace cc 131 } // namespace cc
104 132
105 #endif // CC_TREES_THREADED_CHANNEL_H_ 133 #endif // CC_TREES_THREADED_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698