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

Side by Side 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 unified diff | Download patch
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 #include "cc/trees/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 if (completion_event_for_commit_held_on_tree_activation_ && 1438 if (completion_event_for_commit_held_on_tree_activation_ &&
1439 !layer_tree_host_impl_->pending_tree()) { 1439 !layer_tree_host_impl_->pending_tree()) {
1440 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", 1440 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation",
1441 TRACE_EVENT_SCOPE_THREAD); 1441 TRACE_EVENT_SCOPE_THREAD);
1442 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); 1442 DCHECK(layer_tree_host_impl_->settings().impl_side_painting);
1443 completion_event_for_commit_held_on_tree_activation_->Signal(); 1443 completion_event_for_commit_held_on_tree_activation_->Signal();
1444 completion_event_for_commit_held_on_tree_activation_ = NULL; 1444 completion_event_for_commit_held_on_tree_activation_ = NULL;
1445 } 1445 }
1446 } 1446 }
1447 1447
1448 void ThreadProxy::UIResourceCreatedOnImplThread(UIResourceId uid) {
1449 DCHECK(IsImplThread());
1450 Proxy::MainThreadTaskRunner()->PostTask(
1451 FROM_HERE,
1452 base::Bind(&ThreadProxy::PostUIResourceCreatedToMainThread,
1453 main_thread_weak_ptr_,
1454 uid));
1455 }
1456
1457 void ThreadProxy::UIResourceLostOnImplThread(UIResourceId uid) {
1458 DCHECK(IsImplThread());
1459 Proxy::MainThreadTaskRunner()->PostTask(
1460 FROM_HERE,
1461 base::Bind(&ThreadProxy::PostUIResourceLostToMainThread,
1462 main_thread_weak_ptr_,
1463 uid));
1464 }
1465
1466 void ThreadProxy::PostUIResourceCreatedToMainThread(UIResourceId uid) {
1467 DCHECK(IsMainThread());
1468 layer_tree_host_->UIResourceReady(uid);
1469 }
1470
1471 void ThreadProxy::PostUIResourceLostToMainThread(UIResourceId uid) {
1472 DCHECK(IsMainThread());
1473 layer_tree_host_->UIResourceLost(uid);
1474 }
1475
1448 } // namespace cc 1476 } // namespace cc
OLDNEW
« 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