| 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/trace_event/trace_event.h" |    8 #include "base/trace_event/trace_event.h" | 
|    9 #include "cc/debug/benchmark_instrumentation.h" |    9 #include "cc/debug/benchmark_instrumentation.h" | 
|   10 #include "cc/debug/devtools_instrumentation.h" |   10 #include "cc/debug/devtools_instrumentation.h" | 
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  542     LayerTreeHostImpl::FrameData frame; |  542     LayerTreeHostImpl::FrameData frame; | 
|  543     DoComposite(frame_begin_time, &frame); |  543     DoComposite(frame_begin_time, &frame); | 
|  544  |  544  | 
|  545     // DoComposite could abort, but because this is a synchronous composite |  545     // DoComposite could abort, but because this is a synchronous composite | 
|  546     // another draw will never be scheduled, so break remaining promises. |  546     // another draw will never be scheduled, so break remaining promises. | 
|  547     layer_tree_host_impl_->active_tree()->BreakSwapPromises( |  547     layer_tree_host_impl_->active_tree()->BreakSwapPromises( | 
|  548         SwapPromise::SWAP_FAILS); |  548         SwapPromise::SWAP_FAILS); | 
|  549   } |  549   } | 
|  550 } |  550 } | 
|  551  |  551  | 
|  552 void SingleThreadProxy::AsValueInto( |  | 
|  553     base::trace_event::TracedValue* state) const { |  | 
|  554   // The following line casts away const modifiers because it is just |  | 
|  555   // setting debug state. We still want the AsValue() function and its |  | 
|  556   // call chain to be const throughout. |  | 
|  557   DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this)); |  | 
|  558  |  | 
|  559   state->BeginDictionary("layer_tree_host_impl"); |  | 
|  560   layer_tree_host_impl_->AsValueInto(state); |  | 
|  561   state->EndDictionary(); |  | 
|  562 } |  | 
|  563  |  | 
|  564 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { |  552 void SingleThreadProxy::ForceSerializeOnSwapBuffers() { | 
|  565   { |  553   { | 
|  566     DebugScopedSetImplThread impl(this); |  554     DebugScopedSetImplThread impl(this); | 
|  567     if (layer_tree_host_impl_->renderer()) { |  555     if (layer_tree_host_impl_->renderer()) { | 
|  568       DCHECK(!layer_tree_host_->output_surface_lost()); |  556       DCHECK(!layer_tree_host_->output_surface_lost()); | 
|  569       layer_tree_host_impl_->renderer()->DoNoOp(); |  557       layer_tree_host_impl_->renderer()->DoNoOp(); | 
|  570     } |  558     } | 
|  571   } |  559   } | 
|  572 } |  560 } | 
|  573  |  561  | 
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  830  |  818  | 
|  831 void SingleThreadProxy::DidBeginImplFrameDeadline() { |  819 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 
|  832   layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |  820   layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 
|  833 } |  821 } | 
|  834  |  822  | 
|  835 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |  823 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 
|  836   layer_tree_host_->SendBeginFramesToChildren(args); |  824   layer_tree_host_->SendBeginFramesToChildren(args); | 
|  837 } |  825 } | 
|  838  |  826  | 
|  839 }  // namespace cc |  827 }  // namespace cc | 
| OLD | NEW |