Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: cc/layer_impl.cc

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698