OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/debug/trace_event_argument.h" | 8 #include "base/debug/trace_event_argument.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 TRACE_DISABLED_BY_DEFAULT("cc.debug"), | 1408 TRACE_DISABLED_BY_DEFAULT("cc.debug"), |
1409 state, | 1409 state, |
1410 "cc::LayerImpl", | 1410 "cc::LayerImpl", |
1411 LayerTypeAsString(), | 1411 LayerTypeAsString(), |
1412 this); | 1412 this); |
1413 state->SetInteger("layer_id", id()); | 1413 state->SetInteger("layer_id", id()); |
1414 state->BeginDictionary("bounds"); | 1414 state->BeginDictionary("bounds"); |
1415 MathUtil::AddToTracedValue(bounds_, state); | 1415 MathUtil::AddToTracedValue(bounds_, state); |
1416 state->EndDictionary(); | 1416 state->EndDictionary(); |
1417 | 1417 |
| 1418 state->SetDouble("opacity", opacity()); |
| 1419 |
1418 state->BeginArray("position"); | 1420 state->BeginArray("position"); |
1419 MathUtil::AddToTracedValue(position_, state); | 1421 MathUtil::AddToTracedValue(position_, state); |
1420 state->EndArray(); | 1422 state->EndArray(); |
1421 | 1423 |
1422 state->SetInteger("draws_content", DrawsContent()); | 1424 state->SetInteger("draws_content", DrawsContent()); |
1423 state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); | 1425 state->SetInteger("gpu_memory_usage", GPUMemoryUsageInBytes()); |
1424 | 1426 |
1425 state->BeginArray("scroll_offset"); | 1427 state->BeginArray("scroll_offset"); |
1426 MathUtil::AddToTracedValue(scroll_offset_, state); | 1428 MathUtil::AddToTracedValue(scroll_offset_, state); |
1427 state->EndArray(); | 1429 state->EndArray(); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 } | 1540 } |
1539 | 1541 |
1540 void LayerImpl::NotifyAnimationFinished( | 1542 void LayerImpl::NotifyAnimationFinished( |
1541 base::TimeTicks monotonic_time, | 1543 base::TimeTicks monotonic_time, |
1542 Animation::TargetProperty target_property) { | 1544 Animation::TargetProperty target_property) { |
1543 if (target_property == Animation::ScrollOffset) | 1545 if (target_property == Animation::ScrollOffset) |
1544 layer_tree_impl_->InputScrollAnimationFinished(); | 1546 layer_tree_impl_->InputScrollAnimationFinished(); |
1545 } | 1547 } |
1546 | 1548 |
1547 } // namespace cc | 1549 } // namespace cc |
OLD | NEW |