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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 426 TRACE_EVENT0("cc", "ThreadProxy::CheckOutputSurfaceStatusOnImplThread"); | 426 TRACE_EVENT0("cc", "ThreadProxy::CheckOutputSurfaceStatusOnImplThread"); |
| 427 DCHECK(IsImplThread()); | 427 DCHECK(IsImplThread()); |
| 428 if (!impl().layer_tree_host_impl->IsContextLost()) | 428 if (!impl().layer_tree_host_impl->IsContextLost()) |
| 429 return; | 429 return; |
| 430 if (ContextProvider* offscreen_contexts = | 430 if (ContextProvider* offscreen_contexts = |
| 431 impl().layer_tree_host_impl->offscreen_context_provider()) | 431 impl().layer_tree_host_impl->offscreen_context_provider()) |
| 432 offscreen_contexts->VerifyContexts(); | 432 offscreen_contexts->VerifyContexts(); |
| 433 impl().scheduler->DidLoseOutputSurface(); | 433 impl().scheduler->DidLoseOutputSurface(); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void ThreadProxy::OnSwapBuffersCompleteOnImplThread() { | 436 void ThreadProxy::SetMaxSwapsPending(int max) { |
|
danakj
2014/04/11 15:12:28
SetMaxSwapsPendingOnImplThread() ?
brianderson
2014/04/11 20:49:40
Okay, that would be more consistent.
| |
| 437 TRACE_EVENT0("cc", "ThreadProxy::OnSwapBuffersCompleteOnImplThread"); | 437 impl().scheduler->SetMaxSwapsPending(max); |
| 438 } | |
| 439 | |
| 440 void ThreadProxy::DidSwapBuffersOnImplThread() { | |
| 441 impl().scheduler->DidSwapBuffers(); | |
| 442 } | |
| 443 | |
| 444 void ThreadProxy::DidSwapBuffersCompleteOnImplThread() { | |
| 445 TRACE_EVENT0("cc", "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); | |
| 438 DCHECK(IsImplThread()); | 446 DCHECK(IsImplThread()); |
| 447 impl().scheduler->DidSwapBuffersComplete(); | |
| 439 Proxy::MainThreadTaskRunner()->PostTask( | 448 Proxy::MainThreadTaskRunner()->PostTask( |
| 440 FROM_HERE, | 449 FROM_HERE, |
| 441 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 450 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 442 } | 451 } |
| 443 | 452 |
| 444 void ThreadProxy::SetNeedsBeginFrame(bool enable) { | 453 void ThreadProxy::SetNeedsBeginFrame(bool enable) { |
| 445 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrame", "enable", enable); | 454 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrame", "enable", enable); |
| 446 impl().layer_tree_host_impl->SetNeedsBeginFrame(enable); | 455 impl().layer_tree_host_impl->SetNeedsBeginFrame(enable); |
| 447 UpdateBackgroundAnimateTicking(); | 456 UpdateBackgroundAnimateTicking(); |
| 448 } | 457 } |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1690 | 1699 |
| 1691 impl().timing_history.DidActivatePendingTree(); | 1700 impl().timing_history.DidActivatePendingTree(); |
| 1692 } | 1701 } |
| 1693 | 1702 |
| 1694 void ThreadProxy::DidManageTiles() { | 1703 void ThreadProxy::DidManageTiles() { |
| 1695 DCHECK(IsImplThread()); | 1704 DCHECK(IsImplThread()); |
| 1696 impl().scheduler->DidManageTiles(); | 1705 impl().scheduler->DidManageTiles(); |
| 1697 } | 1706 } |
| 1698 | 1707 |
| 1699 } // namespace cc | 1708 } // namespace cc |
| OLD | NEW |