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

Side by Side Diff: Source/core/rendering/compositing/GraphicsLayerUpdater.cpp

Issue 208313004: Cache the absolute bounding box rect on RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add fixme Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2014 Google Inc. All rights reserved. 3 * Copyright (C) 2014 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 CompositedLayerMappingPtr currentCompositedLayerMapping = layer.compositedLa yerMapping(); 72 CompositedLayerMappingPtr currentCompositedLayerMapping = layer.compositedLa yerMapping();
73 73
74 updateType = update(layer, updateType); 74 updateType = update(layer, updateType);
75 75
76 // Grab some stats for histograms. 76 // Grab some stats for histograms.
77 if (hasCompositedLayerMapping) { 77 if (hasCompositedLayerMapping) {
78 m_pixelsWithoutPromotingAllTransitions += layer.size().height() * layer. size().width(); 78 m_pixelsWithoutPromotingAllTransitions += layer.size().height() * layer. size().width();
79 } else { 79 } else {
80 if ((layer.renderer()->style()->transitionForProperty(CSSPropertyOpacity ) || 80 if ((layer.renderer()->style()->transitionForProperty(CSSPropertyOpacity ) ||
81 layer.renderer()->style()->transitionForProperty(CSSPropertyWebkitT ransform)) && 81 layer.renderer()->style()->transitionForProperty(CSSPropertyWebkitT ransform)) &&
82 m_renderView.viewRect().intersects(layer.absoluteBoundingBox())) 82 m_renderView.viewRect().intersects(layer.cachedAbsoluteBoundingBox() ))
83 m_pixelsAddedByPromotingAllTransitions += layer.size().height() * la yer.size().width(); 83 m_pixelsAddedByPromotingAllTransitions += layer.size().height() * la yer.size().width();
84 } 84 }
85 85
86 // If this layer has a compositedLayerMapping, then that is where we place s ubsequent children GraphicsLayers. 86 // If this layer has a compositedLayerMapping, then that is where we place s ubsequent children GraphicsLayers.
87 // Otherwise children continue to append to the child list of the enclosing layer. 87 // Otherwise children continue to append to the child list of the enclosing layer.
88 GraphicsLayerVector layerChildren; 88 GraphicsLayerVector layerChildren;
89 GraphicsLayerVector& childList = hasCompositedLayerMapping ? layerChildren : childLayersOfEnclosingLayer; 89 GraphicsLayerVector& childList = hasCompositedLayerMapping ? layerChildren : childLayersOfEnclosingLayer;
90 90
91 #if !ASSERT_DISABLED 91 #if !ASSERT_DISABLED
92 LayerListMutationDetector mutationChecker(layer.stackingNode()); 92 LayerListMutationDetector mutationChecker(layer.stackingNode());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 if (!layer.parent()) 180 if (!layer.parent())
181 layer.compositor()->updateRootLayerPosition(); 181 layer.compositor()->updateRootLayerPosition();
182 182
183 if (mapping->hasUnpositionedOverflowControlsLayers()) 183 if (mapping->hasUnpositionedOverflowControlsLayers())
184 layer.scrollableArea()->positionOverflowControls(); 184 layer.scrollableArea()->positionOverflowControls();
185 185
186 return updateType; 186 return updateType;
187 } 187 }
188 188
189 } // namespace WebCore 189 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698