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/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "base/trace_event/trace_event_argument.h" | 10 #include "base/trace_event/trace_event_argument.h" |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 } | 1455 } |
1456 | 1456 |
1457 void LayerImpl::RemoveDependentNeedsPushProperties() { | 1457 void LayerImpl::RemoveDependentNeedsPushProperties() { |
1458 num_dependents_need_push_properties_--; | 1458 num_dependents_need_push_properties_--; |
1459 DCHECK_GE(num_dependents_need_push_properties_, 0); | 1459 DCHECK_GE(num_dependents_need_push_properties_, 0); |
1460 | 1460 |
1461 if (!parent_should_know_need_push_properties() && parent_) | 1461 if (!parent_should_know_need_push_properties() && parent_) |
1462 parent_->RemoveDependentNeedsPushProperties(); | 1462 parent_->RemoveDependentNeedsPushProperties(); |
1463 } | 1463 } |
1464 | 1464 |
1465 void LayerImpl::GetAllTilesAndPrioritiesForTracing( | 1465 void LayerImpl::GetAllPrioritizedTilesForTracing( |
1466 std::map<const Tile*, TilePriority>* tile_map) const { | 1466 std::vector<PrioritizedTile>* prioritized_tiles) const { |
1467 } | 1467 } |
1468 | 1468 |
1469 void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const { | 1469 void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
1470 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( | 1470 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( |
1471 TRACE_DISABLED_BY_DEFAULT("cc.debug"), | 1471 TRACE_DISABLED_BY_DEFAULT("cc.debug"), |
1472 state, | 1472 state, |
1473 "cc::LayerImpl", | 1473 "cc::LayerImpl", |
1474 LayerTypeAsString(), | 1474 LayerTypeAsString(), |
1475 this); | 1475 this); |
1476 state->SetInteger("layer_id", id()); | 1476 state->SetInteger("layer_id", id()); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 gfx::Transform scaled_draw_transform = | 1641 gfx::Transform scaled_draw_transform = |
1642 draw_properties_.target_space_transform; | 1642 draw_properties_.target_space_transform; |
1643 scaled_draw_transform.Scale(SK_MScalar1 / scale, SK_MScalar1 / scale); | 1643 scaled_draw_transform.Scale(SK_MScalar1 / scale, SK_MScalar1 / scale); |
1644 gfx::Size scaled_content_bounds = | 1644 gfx::Size scaled_content_bounds = |
1645 gfx::ToCeiledSize(gfx::ScaleSize(content_bounds(), scale)); | 1645 gfx::ToCeiledSize(gfx::ScaleSize(content_bounds(), scale)); |
1646 return MathUtil::MapEnclosingClippedRect(scaled_draw_transform, | 1646 return MathUtil::MapEnclosingClippedRect(scaled_draw_transform, |
1647 gfx::Rect(scaled_content_bounds)); | 1647 gfx::Rect(scaled_content_bounds)); |
1648 } | 1648 } |
1649 | 1649 |
1650 } // namespace cc | 1650 } // namespace cc |
OLD | NEW |