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

Side by Side Diff: cc/layer.cc

Issue 11567034: Changes subtreeShouldRenderToSeparateSurface logic to account for explicit clipping (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: very minor change 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_impl.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::canClipSelf() const
133 {
134 return false;
135 }
136
132 void Layer::setParent(Layer* layer) 137 void Layer::setParent(Layer* layer)
133 { 138 {
134 DCHECK(!layer || !layer->hasAncestor(this)); 139 DCHECK(!layer || !layer->hasAncestor(this));
135 m_parent = layer; 140 m_parent = layer;
136 setLayerTreeHost(m_parent ? m_parent->layerTreeHost() : 0); 141 setLayerTreeHost(m_parent ? m_parent->layerTreeHost() : 0);
137 142
138 forceAutomaticRasterScaleToBeRecomputed(); 143 forceAutomaticRasterScaleToBeRecomputed();
139 } 144 }
140 145
141 bool Layer::hasAncestor(Layer* ancestor) const 146 bool Layer::hasAncestor(Layer* ancestor) const
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 { 866 {
862 return 0; 867 return 0;
863 } 868 }
864 869
865 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 870 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
866 { 871 {
867 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 872 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
868 } 873 }
869 874
870 } // namespace cc 875 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698