| 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 "CCLayerImpl.h" | 7 #include "CCLayerImpl.h" |
| 8 | 8 |
| 9 #include "CCDebugBorderDrawQuad.h" | 9 #include "CCDebugBorderDrawQuad.h" |
| 10 #include "CCLayerSorter.h" | 10 #include "CCLayerSorter.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 , m_drawOpacityIsAnimating(false) | 52 , m_drawOpacityIsAnimating(false) |
| 53 , m_debugBorderColor(0) | 53 , m_debugBorderColor(0) |
| 54 , m_debugBorderWidth(0) | 54 , m_debugBorderWidth(0) |
| 55 , m_drawTransformIsAnimating(false) | 55 , m_drawTransformIsAnimating(false) |
| 56 , m_screenSpaceTransformIsAnimating(false) | 56 , m_screenSpaceTransformIsAnimating(false) |
| 57 #ifndef NDEBUG | 57 #ifndef NDEBUG |
| 58 , m_betweenWillDrawAndDidDraw(false) | 58 , m_betweenWillDrawAndDidDraw(false) |
| 59 #endif | 59 #endif |
| 60 , m_layerAnimationController(CCLayerAnimationController::create(this)) | 60 , m_layerAnimationController(CCLayerAnimationController::create(this)) |
| 61 { | 61 { |
| 62 DCHECK(CCProxy::isImplThread()); | |
| 63 DCHECK(m_layerId > 0); | 62 DCHECK(m_layerId > 0); |
| 64 } | 63 } |
| 65 | 64 |
| 66 CCLayerImpl::~CCLayerImpl() | 65 CCLayerImpl::~CCLayerImpl() |
| 67 { | 66 { |
| 68 DCHECK(CCProxy::isImplThread()); | |
| 69 #ifndef NDEBUG | 67 #ifndef NDEBUG |
| 70 DCHECK(!m_betweenWillDrawAndDidDraw); | 68 DCHECK(!m_betweenWillDrawAndDidDraw); |
| 71 #endif | 69 #endif |
| 72 } | 70 } |
| 73 | 71 |
| 74 void CCLayerImpl::addChild(scoped_ptr<CCLayerImpl> child) | 72 void CCLayerImpl::addChild(scoped_ptr<CCLayerImpl> child) |
| 75 { | 73 { |
| 76 child->setParent(this); | 74 child->setParent(this); |
| 77 m_children.append(child.Pass()); | 75 m_children.append(child.Pass()); |
| 78 } | 76 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 669 |
| 672 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer
) | 670 void CCLayerImpl::setVerticalScrollbarLayer(CCScrollbarLayerImpl* scrollbarLayer
) |
| 673 { | 671 { |
| 674 if (!m_scrollbarAnimationController) | 672 if (!m_scrollbarAnimationController) |
| 675 m_scrollbarAnimationController = CCScrollbarAnimationController::create(
this); | 673 m_scrollbarAnimationController = CCScrollbarAnimationController::create(
this); |
| 676 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 674 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
| 677 m_scrollbarAnimationController->updateScrollOffset(this); | 675 m_scrollbarAnimationController->updateScrollOffset(this); |
| 678 } | 676 } |
| 679 | 677 |
| 680 } | 678 } |
| OLD | NEW |