| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 DCHECK(!scroll_offset_delegate_); | 168 DCHECK(!scroll_offset_delegate_); |
| 169 | 169 |
| 170 if (parent) | 170 if (parent) |
| 171 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent); | 171 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent); |
| 172 | 172 |
| 173 scroll_parent_ = parent; | 173 scroll_parent_ = parent; |
| 174 SetNeedsPushProperties(); | 174 SetNeedsPushProperties(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void LayerImpl::SetDebugInfo( | 177 void LayerImpl::SetDebugInfo( |
| 178 scoped_refptr<base::debug::ConvertableToTraceFormat> other) { | 178 scoped_refptr<base::trace_event::ConvertableToTraceFormat> other) { |
| 179 debug_info_ = other; | 179 debug_info_ = other; |
| 180 SetNeedsPushProperties(); | 180 SetNeedsPushProperties(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) { | 183 void LayerImpl::SetScrollChildren(std::set<LayerImpl*>* children) { |
| 184 if (scroll_children_.get() == children) | 184 if (scroll_children_.get() == children) |
| 185 return; | 185 return; |
| 186 scroll_children_.reset(children); | 186 scroll_children_.reset(children); |
| 187 SetNeedsPushProperties(); | 187 SetNeedsPushProperties(); |
| 188 } | 188 } |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 num_dependents_need_push_properties_--; | 1394 num_dependents_need_push_properties_--; |
| 1395 DCHECK_GE(num_dependents_need_push_properties_, 0); | 1395 DCHECK_GE(num_dependents_need_push_properties_, 0); |
| 1396 | 1396 |
| 1397 if (!parent_should_know_need_push_properties() && parent_) | 1397 if (!parent_should_know_need_push_properties() && parent_) |
| 1398 parent_->RemoveDependentNeedsPushProperties(); | 1398 parent_->RemoveDependentNeedsPushProperties(); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 void LayerImpl::GetAllTilesForTracing(std::set<const Tile*>* tiles) const { | 1401 void LayerImpl::GetAllTilesForTracing(std::set<const Tile*>* tiles) const { |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 void LayerImpl::AsValueInto(base::debug::TracedValue* state) const { | 1404 void LayerImpl::AsValueInto(base::trace_event::TracedValue* state) const { |
| 1405 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( | 1405 TracedValue::MakeDictIntoImplicitSnapshotWithCategory( |
| 1406 TRACE_DISABLED_BY_DEFAULT("cc.debug"), | 1406 TRACE_DISABLED_BY_DEFAULT("cc.debug"), |
| 1407 state, | 1407 state, |
| 1408 "cc::LayerImpl", | 1408 "cc::LayerImpl", |
| 1409 LayerTypeAsString(), | 1409 LayerTypeAsString(), |
| 1410 this); | 1410 this); |
| 1411 state->SetInteger("layer_id", id()); | 1411 state->SetInteger("layer_id", id()); |
| 1412 MathUtil::AddToTracedValue("bounds", bounds_, state); | 1412 MathUtil::AddToTracedValue("bounds", bounds_, state); |
| 1413 | 1413 |
| 1414 state->SetDouble("opacity", opacity()); | 1414 state->SetDouble("opacity", opacity()); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 SetNeedsPushProperties(); | 1556 SetNeedsPushProperties(); |
| 1557 layer_tree_impl()->set_needs_update_draw_properties(); | 1557 layer_tree_impl()->set_needs_update_draw_properties(); |
| 1558 if (should_have_render_surface) { | 1558 if (should_have_render_surface) { |
| 1559 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); | 1559 render_surface_ = make_scoped_ptr(new RenderSurfaceImpl(this)); |
| 1560 return; | 1560 return; |
| 1561 } | 1561 } |
| 1562 render_surface_.reset(); | 1562 render_surface_.reset(); |
| 1563 } | 1563 } |
| 1564 | 1564 |
| 1565 } // namespace cc | 1565 } // namespace cc |
| OLD | NEW |