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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread"); | 375 TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread"); |
376 // Cause a commit so we can notice the lost context. | 376 // Cause a commit so we can notice the lost context. |
377 SetNeedsCommitOnImplThread(); | 377 SetNeedsCommitOnImplThread(); |
378 client_->DidAbortSwapBuffers(); | 378 client_->DidAbortSwapBuffers(); |
379 } | 379 } |
380 | 380 |
381 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 381 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
382 client_->DidPostSwapBuffers(); | 382 client_->DidPostSwapBuffers(); |
383 } | 383 } |
384 | 384 |
385 void SingleThreadProxy::OnSwapBuffersCompleteOnImplThread() { | 385 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
386 TRACE_EVENT0("cc", "SingleThreadProxy::OnSwapBuffersCompleteOnImplThread"); | 386 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
387 client_->DidCompleteSwapBuffers(); | 387 client_->DidCompleteSwapBuffers(); |
388 } | 388 } |
389 | 389 |
390 // Called by the legacy scheduling path (e.g. where render_widget does the | 390 // Called by the legacy scheduling path (e.g. where render_widget does the |
391 // scheduling) | 391 // scheduling) |
392 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { | 392 void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) { |
393 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); | 393 TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately"); |
394 gfx::Rect device_viewport_damage_rect; | 394 gfx::Rect device_viewport_damage_rect; |
395 | 395 |
396 LayerTreeHostImpl::FrameData frame; | 396 LayerTreeHostImpl::FrameData frame; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 void SingleThreadProxy::DidSwapFrame() { | 564 void SingleThreadProxy::DidSwapFrame() { |
565 if (next_frame_is_newly_committed_frame_) { | 565 if (next_frame_is_newly_committed_frame_) { |
566 next_frame_is_newly_committed_frame_ = false; | 566 next_frame_is_newly_committed_frame_ = false; |
567 layer_tree_host_->DidCommitAndDrawFrame(); | 567 layer_tree_host_->DidCommitAndDrawFrame(); |
568 } | 568 } |
569 } | 569 } |
570 | 570 |
571 bool SingleThreadProxy::CommitPendingForTesting() { return false; } | 571 bool SingleThreadProxy::CommitPendingForTesting() { return false; } |
572 | 572 |
573 } // namespace cc | 573 } // namespace cc |
OLD | NEW |