Chromium Code Reviews| 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 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1450 if (!InnerViewportScrollLayer()) | 1450 if (!InnerViewportScrollLayer()) |
| 1451 return metadata; | 1451 return metadata; |
| 1452 | 1452 |
| 1453 // TODO(miletus) : Change the metadata to hold ScrollOffset. | 1453 // TODO(miletus) : Change the metadata to hold ScrollOffset. |
| 1454 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( | 1454 metadata.root_scroll_offset = gfx::ScrollOffsetToVector2dF( |
| 1455 active_tree_->TotalScrollOffset()); | 1455 active_tree_->TotalScrollOffset()); |
| 1456 | 1456 |
| 1457 return metadata; | 1457 return metadata; |
| 1458 } | 1458 } |
| 1459 | 1459 |
| 1460 void LayerTreeHostImpl::DrawLayers(FrameData* frame, | 1460 void LayerTreeHostImpl::DrawLayers(FrameData* frame) { |
| 1461 base::TimeTicks frame_begin_time) { | |
| 1462 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); | 1461 TRACE_EVENT0("cc", "LayerTreeHostImpl::DrawLayers"); |
| 1462 | |
| 1463 base::TimeTicks frame_begin_time = CurrentBeginFrameArgs().frame_time; | |
|
danakj
2015/04/24 17:24:22
I think I prefer passing things to a function rath
danakj
2015/04/24 17:24:46
(Esp for such a complicated/huge class as this)
| |
| 1463 DCHECK(CanDraw()); | 1464 DCHECK(CanDraw()); |
| 1464 | 1465 |
| 1465 if (!frame->composite_events.empty()) { | 1466 if (!frame->composite_events.empty()) { |
| 1466 frame_timing_tracker_->SaveTimeStamps(frame_begin_time, | 1467 frame_timing_tracker_->SaveTimeStamps(frame_begin_time, |
| 1467 frame->composite_events); | 1468 frame->composite_events); |
| 1468 } | 1469 } |
| 1469 | 1470 |
| 1470 if (frame->has_no_damage) { | 1471 if (frame->has_no_damage) { |
| 1471 TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoDamage", TRACE_EVENT_SCOPE_THREAD); | 1472 TRACE_EVENT_INSTANT0("cc", "EarlyOut_NoDamage", TRACE_EVENT_SCOPE_THREAD); |
| 1472 DCHECK(!output_surface_->capabilities() | 1473 DCHECK(!output_surface_->capabilities() |
| (...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3366 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3367 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
| 3367 | 3368 |
| 3368 curve->UpdateTarget( | 3369 curve->UpdateTarget( |
| 3369 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3370 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
| 3370 .InSecondsF(), | 3371 .InSecondsF(), |
| 3371 new_target); | 3372 new_target); |
| 3372 | 3373 |
| 3373 return true; | 3374 return true; |
| 3374 } | 3375 } |
| 3375 } // namespace cc | 3376 } // namespace cc |
| OLD | NEW |