| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 TRACE_EVENT0("cc", "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 418 TRACE_EVENT0("cc", "ThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| 419 DCHECK(IsImplThread()); | 419 DCHECK(IsImplThread()); |
| 420 impl().scheduler->DidSwapBuffersComplete(); | 420 impl().scheduler->DidSwapBuffersComplete(); |
| 421 Proxy::MainThreadTaskRunner()->PostTask( | 421 Proxy::MainThreadTaskRunner()->PostTask( |
| 422 FROM_HERE, | 422 FROM_HERE, |
| 423 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 423 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 424 } | 424 } |
| 425 | 425 |
| 426 void ThreadProxy::SetNeedsBeginFrame(bool enable) { | 426 void ThreadProxy::SetNeedsBeginFrame(bool enable) { |
| 427 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrame", "enable", enable); | 427 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrame", "enable", enable); |
| 428 impl().layer_tree_host_impl->SetNeedsBeginFrame(enable); | 428 impl().scheduler.SetNeedsBeginFrame(enable); |
| 429 UpdateBackgroundAnimateTicking(); | 429 UpdateBackgroundAnimateTicking(); |
| 430 } | 430 } |
| 431 | 431 |
| 432 void ThreadProxy::BeginFrame(const BeginFrameArgs& args) { | 432 void ThreadProxy::BeginFrame(const BeginFrameArgs& args) { |
| 433 impl().scheduler->BeginFrame(args); | 433 impl().scheduler->BeginFrame(args); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 436 void ThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 437 impl().layer_tree_host_impl->WillBeginImplFrame(args); | 437 impl().layer_tree_host_impl->WillBeginImplFrame(args); |
| 438 } | 438 } |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 impl().layer_tree_host_impl->resource_provider()->Finish(); | 1454 impl().layer_tree_host_impl->resource_provider()->Finish(); |
| 1455 completion->Signal(); | 1455 completion->Signal(); |
| 1456 } | 1456 } |
| 1457 | 1457 |
| 1458 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { | 1458 void ThreadProxy::LayerTreeHostClosedOnImplThread(CompletionEvent* completion) { |
| 1459 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread"); | 1459 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread"); |
| 1460 DCHECK(IsImplThread()); | 1460 DCHECK(IsImplThread()); |
| 1461 layer_tree_host()->DeleteContentsTexturesOnImplThread( | 1461 layer_tree_host()->DeleteContentsTexturesOnImplThread( |
| 1462 impl().layer_tree_host_impl->resource_provider()); | 1462 impl().layer_tree_host_impl->resource_provider()); |
| 1463 impl().current_resource_update_controller.reset(); | 1463 impl().current_resource_update_controller.reset(); |
| 1464 impl().layer_tree_host_impl->SetNeedsBeginFrame(false); | 1464 // impl().scheduler. |
| 1465 impl().scheduler.SetNeedsBeginFrame(false); |
| 1465 impl().scheduler.reset(); | 1466 impl().scheduler.reset(); |
| 1466 impl().layer_tree_host_impl.reset(); | 1467 impl().layer_tree_host_impl.reset(); |
| 1467 impl().weak_factory.InvalidateWeakPtrs(); | 1468 impl().weak_factory.InvalidateWeakPtrs(); |
| 1468 impl().contents_texture_manager = NULL; | 1469 impl().contents_texture_manager = NULL; |
| 1469 completion->Signal(); | 1470 completion->Signal(); |
| 1470 } | 1471 } |
| 1471 | 1472 |
| 1472 size_t ThreadProxy::MaxPartialTextureUpdates() const { | 1473 size_t ThreadProxy::MaxPartialTextureUpdates() const { |
| 1473 return ResourceUpdateController::MaxPartialTextureUpdates(); | 1474 return ResourceUpdateController::MaxPartialTextureUpdates(); |
| 1474 } | 1475 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 | 1654 |
| 1654 impl().timing_history.DidActivatePendingTree(); | 1655 impl().timing_history.DidActivatePendingTree(); |
| 1655 } | 1656 } |
| 1656 | 1657 |
| 1657 void ThreadProxy::DidManageTiles() { | 1658 void ThreadProxy::DidManageTiles() { |
| 1658 DCHECK(IsImplThread()); | 1659 DCHECK(IsImplThread()); |
| 1659 impl().scheduler->DidManageTiles(); | 1660 impl().scheduler->DidManageTiles(); |
| 1660 } | 1661 } |
| 1661 | 1662 |
| 1662 } // namespace cc | 1663 } // namespace cc |
| OLD | NEW |