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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 , m_debugBorderColor(0) | 58 , m_debugBorderColor(0) |
59 , m_debugBorderWidth(0) | 59 , m_debugBorderWidth(0) |
60 , m_filter(0) | 60 , m_filter(0) |
61 , m_drawTransformIsAnimating(false) | 61 , m_drawTransformIsAnimating(false) |
62 , m_screenSpaceTransformIsAnimating(false) | 62 , m_screenSpaceTransformIsAnimating(false) |
63 #ifndef NDEBUG | 63 #ifndef NDEBUG |
64 , m_betweenWillDrawAndDidDraw(false) | 64 , m_betweenWillDrawAndDidDraw(false) |
65 #endif | 65 #endif |
66 , m_layerAnimationController(LayerAnimationController::create(this)) | 66 , m_layerAnimationController(LayerAnimationController::create(this)) |
67 { | 67 { |
| 68 DCHECK(Proxy::isImplThread()); |
68 DCHECK(m_layerId > 0); | 69 DCHECK(m_layerId > 0); |
69 } | 70 } |
70 | 71 |
71 LayerImpl::~LayerImpl() | 72 LayerImpl::~LayerImpl() |
72 { | 73 { |
| 74 DCHECK(Proxy::isImplThread()); |
73 #ifndef NDEBUG | 75 #ifndef NDEBUG |
74 DCHECK(!m_betweenWillDrawAndDidDraw); | 76 DCHECK(!m_betweenWillDrawAndDidDraw); |
75 #endif | 77 #endif |
76 SkSafeUnref(m_filter); | 78 SkSafeUnref(m_filter); |
77 } | 79 } |
78 | 80 |
79 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) | 81 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) |
80 { | 82 { |
81 child->setParent(this); | 83 child->setParent(this); |
82 m_children.append(child.Pass()); | 84 m_children.append(child.Pass()); |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 | 699 |
698 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 700 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
699 { | 701 { |
700 if (!m_scrollbarAnimationController) | 702 if (!m_scrollbarAnimationController) |
701 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 703 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
702 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 704 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
703 m_scrollbarAnimationController->updateScrollOffset(this); | 705 m_scrollbarAnimationController->updateScrollOffset(this); |
704 } | 706 } |
705 | 707 |
706 } | 708 } |
OLD | NEW |