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 "CCDebugBorderDrawQuad.h" | 9 #include "CCDebugBorderDrawQuad.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 , m_debugBorderColor(0) | 54 , m_debugBorderColor(0) |
55 , m_debugBorderWidth(0) | 55 , m_debugBorderWidth(0) |
56 , m_filter(0) | 56 , m_filter(0) |
57 , m_drawTransformIsAnimating(false) | 57 , m_drawTransformIsAnimating(false) |
58 , m_screenSpaceTransformIsAnimating(false) | 58 , m_screenSpaceTransformIsAnimating(false) |
59 #ifndef NDEBUG | 59 #ifndef NDEBUG |
60 , m_betweenWillDrawAndDidDraw(false) | 60 , m_betweenWillDrawAndDidDraw(false) |
61 #endif | 61 #endif |
62 , m_layerAnimationController(LayerAnimationController::create(this)) | 62 , m_layerAnimationController(LayerAnimationController::create(this)) |
63 { | 63 { |
64 DCHECK(Proxy::isImplThread()); | |
65 DCHECK(m_layerId > 0); | 64 DCHECK(m_layerId > 0); |
66 } | 65 } |
67 | 66 |
68 LayerImpl::~LayerImpl() | 67 LayerImpl::~LayerImpl() |
69 { | 68 { |
70 DCHECK(Proxy::isImplThread()); | |
71 #ifndef NDEBUG | 69 #ifndef NDEBUG |
72 DCHECK(!m_betweenWillDrawAndDidDraw); | 70 DCHECK(!m_betweenWillDrawAndDidDraw); |
73 #endif | 71 #endif |
74 SkSafeUnref(m_filter); | 72 SkSafeUnref(m_filter); |
75 } | 73 } |
76 | 74 |
77 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) | 75 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) |
78 { | 76 { |
79 child->setParent(this); | 77 child->setParent(this); |
80 m_children.append(child.Pass()); | 78 m_children.append(child.Pass()); |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 | 683 |
686 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) | 684 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) |
687 { | 685 { |
688 if (!m_scrollbarAnimationController) | 686 if (!m_scrollbarAnimationController) |
689 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); | 687 m_scrollbarAnimationController = ScrollbarAnimationController::create(th
is); |
690 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 688 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
691 m_scrollbarAnimationController->updateScrollOffset(this); | 689 m_scrollbarAnimationController->updateScrollOffset(this); |
692 } | 690 } |
693 | 691 |
694 } | 692 } |
OLD | NEW |