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

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: Rebasing 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/threaded_channel.h
diff --git a/cc/trees/threaded_channel.h b/cc/trees/threaded_channel.h
index a3f1fa5ecbe0b9a09b9f31e1d69a43398a0a32bd..26764649c7359a03154a43ed0bad34e77c8a4671 100644
--- a/cc/trees/threaded_channel.h
+++ b/cc/trees/threaded_channel.h
@@ -76,9 +76,41 @@ class CC_EXPORT ThreadedChannel : public ChannelMain, public ChannelImpl {
// ChannelMain Implementation
void SetThrottleFrameProductionOnImpl(bool throttle) 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 PostFrameTimingEventsOnMain(
+ 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,
@@ -89,6 +121,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_;
@@ -97,6 +137,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_;
+
DISALLOW_COPY_AND_ASSIGN(ThreadedChannel);
};

Powered by Google App Engine
This is Rietveld 408576698