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

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: Apply code review comments 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
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | cc/layer_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 , m_debugBorderColor(0) 59 , m_debugBorderColor(0)
60 , m_debugBorderWidth(0) 60 , m_debugBorderWidth(0)
61 , m_filter(0) 61 , m_filter(0)
62 , m_drawTransformIsAnimating(false) 62 , m_drawTransformIsAnimating(false)
63 , m_screenSpaceTransformIsAnimating(false) 63 , m_screenSpaceTransformIsAnimating(false)
64 #ifndef NDEBUG 64 #ifndef NDEBUG
65 , m_betweenWillDrawAndDidDraw(false) 65 , m_betweenWillDrawAndDidDraw(false)
66 #endif 66 #endif
67 , m_layerAnimationController(LayerAnimationController::create(this)) 67 , m_layerAnimationController(LayerAnimationController::create(this))
68 { 68 {
69 DCHECK(Proxy::isImplThread());
70 DCHECK(m_layerId > 0); 69 DCHECK(m_layerId > 0);
71 } 70 }
72 71
73 LayerImpl::~LayerImpl() 72 LayerImpl::~LayerImpl()
74 { 73 {
75 DCHECK(Proxy::isImplThread());
76 #ifndef NDEBUG 74 #ifndef NDEBUG
77 DCHECK(!m_betweenWillDrawAndDidDraw); 75 DCHECK(!m_betweenWillDrawAndDidDraw);
78 #endif 76 #endif
79 SkSafeUnref(m_filter); 77 SkSafeUnref(m_filter);
80 } 78 }
81 79
82 void LayerImpl::addChild(scoped_ptr<LayerImpl> child) 80 void LayerImpl::addChild(scoped_ptr<LayerImpl> child)
83 { 81 {
84 child->setParent(this); 82 child->setParent(this);
85 m_children.append(child.Pass()); 83 m_children.append(child.Pass());
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 701
704 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer) 702 void LayerImpl::setVerticalScrollbarLayer(ScrollbarLayerImpl* scrollbarLayer)
705 { 703 {
706 if (!m_scrollbarAnimationController) 704 if (!m_scrollbarAnimationController)
707 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is); 705 m_scrollbarAnimationController = ScrollbarAnimationController::create(th is);
708 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer); 706 m_scrollbarAnimationController->setVerticalScrollbarLayer(scrollbarLayer);
709 m_scrollbarAnimationController->updateScrollOffset(this); 707 m_scrollbarAnimationController->updateScrollOffset(this);
710 } 708 }
711 709
712 } // namespace cc 710 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer_unittest.cc ('k') | cc/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698