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