| 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/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 client_->DidCompleteSwapBuffers(); | 336 client_->DidCompleteSwapBuffers(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 // Called by the legacy scheduling path (e.g. where render_widget does the | 339 // Called by the legacy scheduling path (e.g. where render_widget does the |
| 340 // scheduling) | 340 // scheduling) |
| 341 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 341 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
| 342 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); | 342 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); |
| 343 DCHECK(Proxy::IsMainThread()); | 343 DCHECK(Proxy::IsMainThread()); |
| 344 DCHECK(!layer_tree_host_->output_surface_lost()); | 344 DCHECK(!layer_tree_host_->output_surface_lost()); |
| 345 | 345 |
| 346 layer_tree_host_->UpdateClientAnimations(frame_begin_time); |
| 346 layer_tree_host_->AnimateLayers(frame_begin_time); | 347 layer_tree_host_->AnimateLayers(frame_begin_time); |
| 347 | 348 |
| 348 if (PrioritizedResourceManager* contents_texture_manager = | 349 if (PrioritizedResourceManager* contents_texture_manager = |
| 349 layer_tree_host_->contents_texture_manager()) { | 350 layer_tree_host_->contents_texture_manager()) { |
| 350 contents_texture_manager->UnlinkAndClearEvictedBackings(); | 351 contents_texture_manager->UnlinkAndClearEvictedBackings(); |
| 351 contents_texture_manager->SetMaxMemoryLimitBytes( | 352 contents_texture_manager->SetMaxMemoryLimitBytes( |
| 352 layer_tree_host_impl_->memory_allocation_limit_bytes()); | 353 layer_tree_host_impl_->memory_allocation_limit_bytes()); |
| 353 contents_texture_manager->SetExternalPriorityCutoff( | 354 contents_texture_manager->SetExternalPriorityCutoff( |
| 354 layer_tree_host_impl_->memory_allocation_priority_cutoff()); | 355 layer_tree_host_impl_->memory_allocation_priority_cutoff()); |
| 355 } | 356 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 void SingleThreadProxy::DidSwapFrame() { | 467 void SingleThreadProxy::DidSwapFrame() { |
| 467 if (next_frame_is_newly_committed_frame_) { | 468 if (next_frame_is_newly_committed_frame_) { |
| 468 next_frame_is_newly_committed_frame_ = false; | 469 next_frame_is_newly_committed_frame_ = false; |
| 469 layer_tree_host_->DidCommitAndDrawFrame(); | 470 layer_tree_host_->DidCommitAndDrawFrame(); |
| 470 } | 471 } |
| 471 } | 472 } |
| 472 | 473 |
| 473 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 474 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
| 474 | 475 |
| 475 } // namespace cc | 476 } // namespace cc |
| OLD | NEW |