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 "cc/layer_impl.h" | 5 #include "cc/layer_impl.h" |
6 | 6 |
7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/animation_registrar.h" | 10 #include "cc/animation_registrar.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 , m_drawCheckerboardForMissingTiles(false) | 46 , m_drawCheckerboardForMissingTiles(false) |
47 , m_drawsContent(false) | 47 , m_drawsContent(false) |
48 , m_forceRenderSurface(false) | 48 , m_forceRenderSurface(false) |
49 , m_isContainerForFixedPositionLayers(false) | 49 , m_isContainerForFixedPositionLayers(false) |
50 , m_fixedToContainerLayer(false) | 50 , m_fixedToContainerLayer(false) |
51 , m_drawDepth(0) | 51 , m_drawDepth(0) |
52 #ifndef NDEBUG | 52 #ifndef NDEBUG |
53 , m_betweenWillDrawAndDidDraw(false) | 53 , m_betweenWillDrawAndDidDraw(false) |
54 #endif | 54 #endif |
55 { | 55 { |
56 DCHECK(m_layerId > 0); | 56 DCHECK(m_layerId > 0 || m_layerId == -1 || m_layerId == -2); |
Ian Vollick
2013/01/15 20:33:48
Same here and anywhere else this may crop up.
| |
57 DCHECK(m_layerTreeImpl); | 57 DCHECK(m_layerTreeImpl); |
58 m_layerTreeImpl->RegisterLayer(this); | 58 m_layerTreeImpl->RegisterLayer(this); |
59 AnimationRegistrar* registrar = m_layerTreeImpl->animationRegistrar(); | 59 AnimationRegistrar* registrar = m_layerTreeImpl->animationRegistrar(); |
60 m_layerAnimationController = registrar->GetAnimationControllerForId(m_layerI d); | 60 m_layerAnimationController = registrar->GetAnimationControllerForId(m_layerI d); |
61 m_layerAnimationController->addObserver(this); | 61 m_layerAnimationController->addObserver(this); |
62 } | 62 } |
63 | 63 |
64 LayerImpl::~LayerImpl() | 64 LayerImpl::~LayerImpl() |
65 { | 65 { |
66 #ifndef NDEBUG | 66 #ifndef NDEBUG |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
857 if (m_layerTreeImpl->settings().useLinearFadeScrollbarAnimator) | 857 if (m_layerTreeImpl->settings().useLinearFadeScrollbarAnimator) |
858 m_scrollbarAnimationController = createScrollbarAnimationControllerW ithFade(this); | 858 m_scrollbarAnimationController = createScrollbarAnimationControllerW ithFade(this); |
859 else | 859 else |
860 m_scrollbarAnimationController = ScrollbarAnimationController::creat e(this); | 860 m_scrollbarAnimationController = ScrollbarAnimationController::creat e(this); |
861 } | 861 } |
862 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); | 862 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); |
863 m_scrollbarAnimationController->updateScrollOffset(this); | 863 m_scrollbarAnimationController->updateScrollOffset(this); |
864 } | 864 } |
865 | 865 |
866 } // namespace cc | 866 } // namespace cc |
OLD | NEW |