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

Side by Side Diff: Source/core/rendering/compositing/RenderLayerCompositor.h

Issue 209703002: Shrink RenderLayerCompositor by 5% by removing unused code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « no previous file | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 RootLayerAttachedViaChromeClient, 159 RootLayerAttachedViaChromeClient,
160 RootLayerAttachedViaEnclosingFrame 160 RootLayerAttachedViaEnclosingFrame
161 }; 161 };
162 162
163 RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachme nt; } 163 RootLayerAttachment rootLayerAttachment() const { return m_rootLayerAttachme nt; }
164 void updateRootLayerAttachment(); 164 void updateRootLayerAttachment();
165 void updateRootLayerPosition(); 165 void updateRootLayerPosition();
166 166
167 void setIsInWindow(bool); 167 void setIsInWindow(bool);
168 168
169 void clearMappingForAllRenderLayers();
170
171 // Walk the tree looking for layers with 3d transforms. Useful in case you n eed
172 // to know if there is non-affine content, e.g. for drawing into an image.
173 bool has3DContent() const;
174
175 static RenderLayerCompositor* frameContentsCompositor(RenderPart*); 169 static RenderLayerCompositor* frameContentsCompositor(RenderPart*);
176 // Return true if the layers changed. 170 // Return true if the layers changed.
177 static bool parentFrameContentLayers(RenderPart*); 171 static bool parentFrameContentLayers(RenderPart*);
178 172
179 // Update the geometry of the layers used for clipping and scrolling in fram es. 173 // Update the geometry of the layers used for clipping and scrolling in fram es.
180 void frameViewDidChangeLocation(const IntPoint& contentsOffset); 174 void frameViewDidChangeLocation(const IntPoint& contentsOffset);
181 void frameViewDidChangeSize(); 175 void frameViewDidChangeSize();
182 void frameViewDidScroll(); 176 void frameViewDidScroll();
183 void frameViewScrollbarsExistenceDidChange(); 177 void frameViewScrollbarsExistenceDidChange();
184 void rootFixedBackgroundsChanged(); 178 void rootFixedBackgroundsChanged();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 260
267 void updateCompositingLayersInternal(); 261 void updateCompositingLayersInternal();
268 262
269 // Returns indirect reasons that a layer should be composited because of som ething in its subtree. 263 // Returns indirect reasons that a layer should be composited because of som ething in its subtree.
270 CompositingReasons subtreeReasonsForCompositing(RenderObject*, bool hasCompo sitedDescendants, bool has3DTransformedDescendants) const; 264 CompositingReasons subtreeReasonsForCompositing(RenderObject*, bool hasCompo sitedDescendants, bool has3DTransformedDescendants) const;
271 265
272 // Make or destroy the CompositedLayerMapping for this layer; returns true i f the compositedLayerMapping changed. 266 // Make or destroy the CompositedLayerMapping for this layer; returns true i f the compositedLayerMapping changed.
273 bool allocateOrClearCompositedLayerMapping(RenderLayer*, CompositingStateTra nsitionType compositedLayerUpdate); 267 bool allocateOrClearCompositedLayerMapping(RenderLayer*, CompositingStateTra nsitionType compositedLayerUpdate);
274 bool updateSquashingAssignment(RenderLayer*, SquashingState&, CompositingSta teTransitionType compositedLayerUpdate); 268 bool updateSquashingAssignment(RenderLayer*, SquashingState&, CompositingSta teTransitionType compositedLayerUpdate);
275 269
276 void clearMappingForRenderLayerIncludingDescendants(RenderLayer*);
277
278 void recursiveRepaintLayer(RenderLayer*); 270 void recursiveRepaintLayer(RenderLayer*);
279 271
280 void addToOverlapMap(OverlapMap&, RenderLayer*, const IntRect& layerBounds); 272 void addToOverlapMap(OverlapMap&, RenderLayer*, const IntRect& layerBounds);
281 273
282 // Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to 274 // Forces an update for all frames of frame tree recursively. Used only when the mainFrame compositor is ready to
283 // finish all deferred work. 275 // finish all deferred work.
284 static void finishCompositingUpdateForFrameTree(LocalFrame*); 276 static void finishCompositingUpdateForFrameTree(LocalFrame*);
285 277
286 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer* , OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants, IntRect& absoluteDecendantBoundingB ox); 278 void computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer* , OverlapMap*, struct CompositingRecursionData&, bool& descendantHas3DTransform, Vector<RenderLayer*>& unclippedDescendants, IntRect& absoluteDecendantBoundingB ox);
287 279
288 // Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed. 280 // Defines which RenderLayers will paint into which composited backings, by allocating and destroying CompositedLayerMappings as needed.
289 void assignLayersToBackings(RenderLayer*, bool& layersChanged); 281 void assignLayersToBackings(RenderLayer*, bool& layersChanged);
290 void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& lay ersChanged, RenderLayer* clippingAncestor); 282 void assignLayersToBackingsInternal(RenderLayer*, SquashingState&, bool& lay ersChanged, RenderLayer* clippingAncestor);
291 283
292 // Allocates, sets up hierarchy, and sets appropriate properties for the Gra phicsLayers that correspond to a given
293 // composited RenderLayer. Does nothing if the given RenderLayer does not ha ve a CompositedLayerMapping.
294 void updateGraphicsLayersMappedToRenderLayer(RenderLayer*);
295
296 // Recurses down the tree, updating layer geometry only.
297 void updateLayerTreeGeometry(RenderLayer*);
298
299 // Hook compositing layers together 284 // Hook compositing layers together
300 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ; 285 void setCompositingParent(RenderLayer* childLayer, RenderLayer* parentLayer) ;
301 void removeCompositedChildren(RenderLayer*); 286 void removeCompositedChildren(RenderLayer*);
302 287
303 bool layerHas3DContent(const RenderLayer*) const;
304 bool isRunningAcceleratedTransformAnimation(RenderObject*) const; 288 bool isRunningAcceleratedTransformAnimation(RenderObject*) const;
305 289
306 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const; 290 bool hasAnyAdditionalCompositedLayers(const RenderLayer* rootLayer) const;
307 291
308 void ensureRootLayer(); 292 void ensureRootLayer();
309 void destroyRootLayer(); 293 void destroyRootLayer();
310 294
311 void attachRootLayer(RootLayerAttachment); 295 void attachRootLayer(RootLayerAttachment);
312 void detachRootLayer(); 296 void detachRootLayer();
313 297
314 bool isMainFrame() const; 298 bool isMainFrame() const;
315 299
316 void updateOverflowControlsLayers(); 300 void updateOverflowControlsLayers();
317 301
318 void notifyIFramesOfCompositingChange(); 302 void notifyIFramesOfCompositingChange();
319 303
320 Page* page() const; 304 Page* page() const;
321 305
322 GraphicsLayerFactory* graphicsLayerFactory() const; 306 GraphicsLayerFactory* graphicsLayerFactory() const;
323 ScrollingCoordinator* scrollingCoordinator() const; 307 ScrollingCoordinator* scrollingCoordinator() const;
324 308
325 void addViewportConstrainedLayer(RenderLayer*); 309 void addViewportConstrainedLayer(RenderLayer*);
326 310
327 FixedPositionViewportConstraints computeFixedViewportConstraints(RenderLayer *) const;
328 StickyPositionViewportConstraints computeStickyViewportConstraints(RenderLay er*) const;
329
330 bool requiresHorizontalScrollbarLayer() const; 311 bool requiresHorizontalScrollbarLayer() const;
331 bool requiresVerticalScrollbarLayer() const; 312 bool requiresVerticalScrollbarLayer() const;
332 bool requiresScrollCornerLayer() const; 313 bool requiresScrollCornerLayer() const;
333 #if USE(RUBBER_BANDING) 314 #if USE(RUBBER_BANDING)
334 bool requiresOverhangLayers() const; 315 bool requiresOverhangLayers() const;
335 #endif 316 #endif
336 317
337 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi ngStateTransitionType compositedLayerUpdate); 318 void applyUpdateLayerCompositingStateChickenEggHacks(RenderLayer*, Compositi ngStateTransitionType compositedLayerUpdate);
338 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, bool& layersChanged); 319 void assignLayersToBackingsForReflectionLayer(RenderLayer* reflectionLayer, bool& layersChanged);
339 320
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 OwnPtr<GraphicsLayer> m_layerForScrollCorner; 366 OwnPtr<GraphicsLayer> m_layerForScrollCorner;
386 #if USE(RUBBER_BANDING) 367 #if USE(RUBBER_BANDING)
387 OwnPtr<GraphicsLayer> m_layerForOverhangShadow; 368 OwnPtr<GraphicsLayer> m_layerForOverhangShadow;
388 #endif 369 #endif
389 }; 370 };
390 371
391 372
392 } // namespace WebCore 373 } // namespace WebCore
393 374
394 #endif // RenderLayerCompositor_h 375 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/compositing/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698