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

Unified 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, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/thread_proxy.cc ('k') | cc/trees/threaded_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/threaded_channel.h
diff --git a/cc/trees/threaded_channel.h b/cc/trees/threaded_channel.h
index 70238f3ded5e473828b30e22863d87f437ab3a25..c9dede900c857922fb8541a564d5159a2282de6e 100644
--- a/cc/trees/threaded_channel.h
+++ b/cc/trees/threaded_channel.h
@@ -77,9 +77,41 @@ class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
// ChannelMain Implementation
void SetThrottleFrameProductionOnImpl(bool throttle) override;
void SetLayerTreeHostClientReadyOnImpl() override;
+ void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override;
+ void MainThreadHasStoppedFlingingOnImpl() override;
+ void SetInputThrottledUntilCommitOnImpl(bool is_throttled) override;
+ void SetDeferCommitsOnImpl(bool defer_commits) override;
+
+ // Blocking calls to ProxyImpl
+ void FinishAllRenderingOnImpl() override;
+ void SetVisibleOnImpl(bool visible) override;
+ void ReleaseOutputSurfaceOnImpl() override;
+ void FinishGLOnImpl() override;
+ void MainFrameWillHappenOnImplForTesting(
+ bool* main_frame_will_happen) override;
// ChannelImpl Implementation
void DidCompleteSwapBuffers() override;
+ void SetRendererCapabilitiesMainCopy(
+ const RendererCapabilities& capabilities) override;
+ void BeginMainFrameNotExpectedSoon() override;
+ void DidCommitAndDrawFrame() override;
+ void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue) override;
+ void DidLoseOutputSurface() override;
+ void RequestNewOutputSurface() override;
+ void DidInitializeOutputSurface(
+ bool success,
+ const RendererCapabilities& capabilities) override;
+ void DidCompletePageScaleAnimation() override;
+ void PostFrameTimingEventsToMain(
David Trainor- moved to gerrit 2015/09/30 14:44:56 ToMain -> OnMain?
Khushal 2015/09/30 15:26:34 Done.
+ scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
+ scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
+ override;
+
+ // TODO(khushalsagar): Remove this. Temporary method to create the weak
+ // pointer on the impl thread
+ void InitImplThreadWeakPtr();
+ void InvalidateImplThreadWeakPtr();
protected:
ThreadedChannel(ThreadProxy* thread_proxy,
@@ -90,6 +122,14 @@ class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
base::SingleThreadTaskRunner* MainThreadTaskRunner() const;
base::SingleThreadTaskRunner* ImplThreadTaskRunner() const;
+ void BlockingFinishAllRenderingOnImpl(CompletionEvent* completion);
+ void BlockingSetVisibleOnImpl(CompletionEvent* completion, bool visible);
+ void BlockingReleaseOutputSurfaceOnImpl(CompletionEvent* completion);
+ void BlockingFinishGLOnImpl(CompletionEvent* completion);
+ void BlockingMainFrameWillHappenOnImplForTesting(
+ CompletionEvent* completion,
+ bool* main_frame_will_happen);
+
ProxyMain* proxy_main_;
ProxyImpl* proxy_impl_;
@@ -98,6 +138,12 @@ class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_;
+ // TODO(khushalsagar): Initialize this in ThreadedChannel when ChannelImpl
+ // gets initialization call.
+ base::WeakPtr<ThreadedChannel> impl_thread_weak_ptr_;
+
+ 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
+
DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
};
« 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