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

Unified Diff: cc/trees/thread_proxy.cc

Issue 18191020: UI Resource Manager (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
===================================================================
--- cc/trees/thread_proxy.cc (revision 210393)
+++ cc/trees/thread_proxy.cc (working copy)
@@ -1445,4 +1445,32 @@
}
}
+void ThreadProxy::UIResourceCreatedOnImplThread(UIResourceId uid) {
+ DCHECK(IsImplThread());
+ Proxy::MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::PostUIResourceCreatedToMainThread,
+ main_thread_weak_ptr_,
+ uid));
+}
+
+void ThreadProxy::UIResourceLostOnImplThread(UIResourceId uid) {
+ DCHECK(IsImplThread());
+ Proxy::MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&ThreadProxy::PostUIResourceLostToMainThread,
+ main_thread_weak_ptr_,
+ uid));
+}
+
+void ThreadProxy::PostUIResourceCreatedToMainThread(UIResourceId uid) {
+ DCHECK(IsMainThread());
+ layer_tree_host_->UIResourceReady(uid);
+}
+
+void ThreadProxy::PostUIResourceLostToMainThread(UIResourceId uid) {
+ DCHECK(IsMainThread());
+ layer_tree_host_->UIResourceLost(uid);
+}
+
} // namespace cc
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698