| 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/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // region that the given point hits. | 371 // region that the given point hits. |
| 372 for (; layer_impl; layer_impl = layer_impl->parent()) { | 372 for (; layer_impl; layer_impl = layer_impl->parent()) { |
| 373 if (LayerTreeHostCommon::LayerHasTouchEventHandlersAt(device_viewport_point, | 373 if (LayerTreeHostCommon::LayerHasTouchEventHandlersAt(device_viewport_point, |
| 374 layer_impl)) | 374 layer_impl)) |
| 375 return true; | 375 return true; |
| 376 } | 376 } |
| 377 | 377 |
| 378 return false; | 378 return false; |
| 379 } | 379 } |
| 380 | 380 |
| 381 void LayerTreeHostImpl::DidReceiveLastInputEventForBeginFrame( | |
| 382 base::TimeTicks frame_time) { | |
| 383 client_->DidReceiveLastInputEventForBeginFrameOnImplThread(frame_time); | |
| 384 } | |
| 385 | |
| 386 void LayerTreeHostImpl::TrackDamageForAllSurfaces( | 381 void LayerTreeHostImpl::TrackDamageForAllSurfaces( |
| 387 LayerImpl* root_draw_layer, | 382 LayerImpl* root_draw_layer, |
| 388 const LayerImplList& render_surface_layer_list) { | 383 const LayerImplList& render_surface_layer_list) { |
| 389 // For now, we use damage tracking to compute a global scissor. To do this, we | 384 // For now, we use damage tracking to compute a global scissor. To do this, we |
| 390 // must compute all damage tracking before drawing anything, so that we know | 385 // must compute all damage tracking before drawing anything, so that we know |
| 391 // the root damage rect. The root damage rect is then used to scissor each | 386 // the root damage rect. The root damage rect is then used to scissor each |
| 392 // surface. | 387 // surface. |
| 393 | 388 |
| 394 for (int surface_index = render_surface_layer_list.size() - 1; | 389 for (int surface_index = render_surface_layer_list.size() - 1; |
| 395 surface_index >= 0; | 390 surface_index >= 0; |
| (...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 } | 2267 } |
| 2273 | 2268 |
| 2274 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2269 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
| 2275 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2270 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
| 2276 paint_time_counter_->ClearHistory(); | 2271 paint_time_counter_->ClearHistory(); |
| 2277 | 2272 |
| 2278 debug_state_ = debug_state; | 2273 debug_state_ = debug_state; |
| 2279 } | 2274 } |
| 2280 | 2275 |
| 2281 } // namespace cc | 2276 } // namespace cc |
| OLD | NEW |