Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 777 layer_tree_host_->CommitComplete(); | 777 layer_tree_host_->CommitComplete(); |
| 778 layer_tree_host_->DidBeginFrame(); | 778 layer_tree_host_->DidBeginFrame(); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void ThreadProxy::StartCommitOnImplThread( | 781 void ThreadProxy::StartCommitOnImplThread( |
| 782 CompletionEvent* completion, | 782 CompletionEvent* completion, |
| 783 ResourceUpdateQueue* raw_queue, | 783 ResourceUpdateQueue* raw_queue, |
| 784 scoped_refptr<cc::ContextProvider> offscreen_context_provider) { | 784 scoped_refptr<cc::ContextProvider> offscreen_context_provider) { |
| 785 scoped_ptr<ResourceUpdateQueue> queue(raw_queue); | 785 scoped_ptr<ResourceUpdateQueue> queue(raw_queue); |
| 786 | 786 |
| 787 TRACE_EVENT0("cc", "ThreadProxy::StartCommitOnImplThread"); | |
|
aelias_OOO_until_Jul13
2013/07/23 00:06:48
Looks like you deleted this line by accident.
powei
2013/07/24 02:28:29
Done.
| |
| 788 DCHECK(!commit_completion_event_on_impl_thread_); | 787 DCHECK(!commit_completion_event_on_impl_thread_); |
| 789 DCHECK(IsImplThread() && IsMainThreadBlocked()); | 788 DCHECK(IsImplThread() && IsMainThreadBlocked()); |
| 790 DCHECK(scheduler_on_impl_thread_); | 789 DCHECK(scheduler_on_impl_thread_); |
| 791 DCHECK(scheduler_on_impl_thread_->CommitPending()); | 790 DCHECK(scheduler_on_impl_thread_->CommitPending()); |
| 792 | 791 |
| 793 if (!layer_tree_host_impl_) { | 792 if (!layer_tree_host_impl_) { |
| 794 TRACE_EVENT0("cc", "EarlyOut_NoLayerTree"); | 793 TRACE_EVENT0("cc", "EarlyOut_NoLayerTree"); |
| 795 completion->Signal(); | 794 completion->Signal(); |
| 796 return; | 795 return; |
| 797 } | 796 } |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1438 if (completion_event_for_commit_held_on_tree_activation_ && | 1437 if (completion_event_for_commit_held_on_tree_activation_ && |
| 1439 !layer_tree_host_impl_->pending_tree()) { | 1438 !layer_tree_host_impl_->pending_tree()) { |
| 1440 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", | 1439 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", |
| 1441 TRACE_EVENT_SCOPE_THREAD); | 1440 TRACE_EVENT_SCOPE_THREAD); |
| 1442 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); | 1441 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); |
| 1443 completion_event_for_commit_held_on_tree_activation_->Signal(); | 1442 completion_event_for_commit_held_on_tree_activation_->Signal(); |
| 1444 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1443 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1445 } | 1444 } |
| 1446 } | 1445 } |
| 1447 | 1446 |
| 1447 void ThreadProxy::UIResourceLostOnImplThread(UIResourceId uid) { | |
| 1448 DCHECK(IsImplThread()); | |
| 1449 Proxy::MainThreadTaskRunner()->PostTask( | |
| 1450 FROM_HERE, | |
| 1451 base::Bind(&ThreadProxy::PostUIResourceLostToMainThread, | |
| 1452 main_thread_weak_ptr_, | |
| 1453 uid)); | |
| 1454 } | |
| 1455 | |
| 1456 void ThreadProxy::PostUIResourceLostToMainThread(UIResourceId uid) { | |
| 1457 DCHECK(IsMainThread()); | |
| 1458 layer_tree_host_->UIResourceLost(uid); | |
| 1459 } | |
| 1460 | |
| 1448 } // namespace cc | 1461 } // namespace cc |
| OLD | NEW |