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

Side by Side Diff: cc/layer.cc

Issue 11710004: cc: Block the main thread for texture layers during impl-side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TRACE_EVENT_INSTANT Created 7 years, 11 months 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 | Annotate | Revision Log
« no previous file with comments | « cc/layer.h ('k') | cc/layer_tree_host.h » ('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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layer.h"
6 6
7 #include "cc/animation.h" 7 #include "cc/animation.h"
8 #include "cc/animation_events.h" 8 #include "cc/animation_events.h"
9 #include "cc/layer_animation_controller.h" 9 #include "cc/layer_animation_controller.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // values x and y, ceil((x / y) * y) may be x + 1. 122 // values x and y, ceil((x / y) * y) may be x + 1.
123 contentRect.Intersect(gfx::Rect(gfx::Point(), contentBounds())); 123 contentRect.Intersect(gfx::Rect(gfx::Point(), contentBounds()));
124 return gfx::ToEnclosingRect(contentRect); 124 return gfx::ToEnclosingRect(contentRect);
125 } 125 }
126 126
127 bool Layer::blocksPendingCommit() const 127 bool Layer::blocksPendingCommit() const
128 { 128 {
129 return false; 129 return false;
130 } 130 }
131 131
132 bool Layer::blocksPendingCommitRecursive() const
133 {
134 if (blocksPendingCommit())
135 return true;
136 if (maskLayer() && maskLayer()->blocksPendingCommitRecursive())
137 return true;
138 if (replicaLayer() && replicaLayer()->blocksPendingCommitRecursive())
139 return true;
140 for (size_t i = 0; i < m_children.size(); ++i)
141 {
142 if (m_children[i]->blocksPendingCommitRecursive())
143 return true;
144 }
145 return false;
146 }
147
132 void Layer::setParent(Layer* layer) 148 void Layer::setParent(Layer* layer)
133 { 149 {
134 DCHECK(!layer || !layer->hasAncestor(this)); 150 DCHECK(!layer || !layer->hasAncestor(this));
135 m_parent = layer; 151 m_parent = layer;
136 setLayerTreeHost(m_parent ? m_parent->layerTreeHost() : 0); 152 setLayerTreeHost(m_parent ? m_parent->layerTreeHost() : 0);
137 153
138 forceAutomaticRasterScaleToBeRecomputed(); 154 forceAutomaticRasterScaleToBeRecomputed();
139 } 155 }
140 156
141 bool Layer::hasAncestor(Layer* ancestor) const 157 bool Layer::hasAncestor(Layer* ancestor) const
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 { 877 {
862 return 0; 878 return 0;
863 } 879 }
864 880
865 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 881 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
866 { 882 {
867 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 883 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
868 } 884 }
869 885
870 } // namespace cc 886 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698