| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "cc/layer_impl.h" | 7 #include "cc/layer_impl.h" |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 , m_debugBorderColor(0) | 59 , m_debugBorderColor(0) |
| 60 , m_debugBorderWidth(0) | 60 , m_debugBorderWidth(0) |
| 61 , m_filter(0) | 61 , m_filter(0) |
| 62 , m_drawTransformIsAnimating(false) | 62 , m_drawTransformIsAnimating(false) |
| 63 , m_screenSpaceTransformIsAnimating(false) | 63 , m_screenSpaceTransformIsAnimating(false) |
| 64 #ifndef NDEBUG | 64 #ifndef NDEBUG |
| 65 , m_betweenWillDrawAndDidDraw(false) | 65 , m_betweenWillDrawAndDidDraw(false) |
| 66 #endif | 66 #endif |
| 67 , m_layerAnimationController(LayerAnimationController::create(this)) | 67 , m_layerAnimationController(LayerAnimationController::create(this)) |
| 68 { | 68 { |
| 69 DCHECK(Proxy::isImplThread()); | |
| 70 DCHECK(m_layerId > 0); | 69 DCHECK(m_layerId > 0); |
| 71 } | 70 } |
| 72 | 71 |
| 73 LayerImpl::~LayerImpl() | 72 LayerImpl::~LayerImpl() |
| 74 { | 73 { |
| 75 DCHECK(Proxy::isImplThread()); | |
| 76 #ifndef NDEBUG | 74 #ifndef NDEBUG |
| 77 DCHECK(!m_betweenWillDrawAndDidDraw); | 75 DCHECK(!m_betweenWillDrawAndDidDraw); |
| 78 #endif | 76 #endif |
| 79 SkSafeUnref(m_filter); | 77 SkSafeUnref(m_filter); |
| 80 } | 78 } |
| 81 | 79 |
| 82 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) | 80 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) |
| 83 { | 81 { |
| 84 child->setParent(this); | 82 child->setParent(this); |
| 85 m_children.append(child.Pass()); | 83 m_children.append(child.Pass()); |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 | 701 |
| 704 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
| 705 { | 703 { |
| 706 if (!m_scrollbarAnimationController) | 704 if (!m_scrollbarAnimationController) |
| 707 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
| 708 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 709 m_scrollbarAnimationController->updateScrollOffset(this); | 707 m_scrollbarAnimationController->updateScrollOffset(this); |
| 710 } | 708 } |
| 711 | 709 |
| 712 } // namespace cc | 710 } // namespace cc |
| OLD | NEW |