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

Unified Diff: cc/trees/threaded_channel.cc

Issue 1418953002: cc: Send shared variables between main and impl side using the channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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.cc
diff --git a/cc/trees/threaded_channel.cc b/cc/trees/threaded_channel.cc
index 5c0cb6f66120db94923f9ba66f6f4ae981a1b59c..d2c0e16ed26117bb83ba081e147e670e705fd6c6 100644
--- a/cc/trees/threaded_channel.cc
+++ b/cc/trees/threaded_channel.cc
@@ -92,10 +92,28 @@ void ThreadedChannel::SetNeedsRedrawOnImpl(const gfx::Rect& damage_rect) {
proxy_impl_->GetImplWeakPtr(), damage_rect));
}
-void ThreadedChannel::StartCommitOnImpl(CompletionEvent* completion) {
+void ThreadedChannel::StartCommitOnImpl(CompletionEvent* completion,
+ LayerTreeHost* layer_tree_host,
+ bool hold_commit_for_activation) {
ImplThreadTaskRunner()->PostTask(
- FROM_HERE, base::Bind(&ProxyImpl::StartCommitOnImpl,
+ FROM_HERE,
+ base::Bind(&ProxyImpl::StartCommitOnImpl, proxy_impl_->GetImplWeakPtr(),
+ completion, layer_tree_host, hold_commit_for_activation));
+}
+
+void ThreadedChannel::InitializeImplOnImpl(CompletionEvent* completion,
+ LayerTreeHost* layer_tree_host) {
+ ImplThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ProxyImpl::InitializeImplOnImpl,
+ base::Unretained(proxy_impl_), completion, layer_tree_host));
+}
+
+void ThreadedChannel::LayerTreeHostClosedOnImpl(CompletionEvent* completion) {
+ ImplThreadTaskRunner()->PostTask(
+ FROM_HERE, base::Bind(&ProxyImpl::LayerTreeHostClosedOnImpl,
proxy_impl_->GetImplWeakPtr(), completion));
+ proxy_impl_ = nullptr;
}
void ThreadedChannel::SetVisibleOnImpl(CompletionEvent* completion,

Powered by Google App Engine
This is Rietveld 408576698