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

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

Issue 565793003: [Invalidation Tracking] Add trace events for compositor based invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use containerForPaintInvalidation Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // but this is likely to evolve soon. 68 // but this is likely to evolve soon.
69 class CompositedLayerMapping FINAL : public GraphicsLayerClient { 69 class CompositedLayerMapping FINAL : public GraphicsLayerClient {
70 WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); WTF_MAKE_FAST_ALLOCATED; 70 WTF_MAKE_NONCOPYABLE(CompositedLayerMapping); WTF_MAKE_FAST_ALLOCATED;
71 public: 71 public:
72 explicit CompositedLayerMapping(RenderLayer&); 72 explicit CompositedLayerMapping(RenderLayer&);
73 virtual ~CompositedLayerMapping(); 73 virtual ~CompositedLayerMapping();
74 74
75 RenderLayer& owningLayer() const { return m_owningLayer; } 75 RenderLayer& owningLayer() const { return m_owningLayer; }
76 76
77 bool updateGraphicsLayerConfiguration(); 77 bool updateGraphicsLayerConfiguration();
78 void updateGraphicsLayerGeometry(const RenderLayer* compositingContainer, co nst RenderLayer* compositingStackingContext, Vector<RenderLayer*>& layersNeeding PaintInvalidation); 78 void updateGraphicsLayerGeometry(const RenderLayer* compositingContainer, co nst RenderLayer* compositingStackingContext, LayersNeedingPaintInvalidation&);
79 79
80 // Update whether layer needs blending. 80 // Update whether layer needs blending.
81 void updateContentsOpaque(); 81 void updateContentsOpaque();
82 82
83 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); } 83 GraphicsLayer* mainGraphicsLayer() const { return m_graphicsLayer.get(); }
84 84
85 // Layer to clip children 85 // Layer to clip children
86 bool hasClippingLayer() const { return m_childContainmentLayer; } 86 bool hasClippingLayer() const { return m_childContainmentLayer; }
87 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get(); } 87 GraphicsLayer* clippingLayer() const { return m_childContainmentLayer.get(); }
88 88
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // If there is a squashed layer painting into this CLM that is an ancestor o f the given RenderObject, return it. Otherwise return 0. 204 // If there is a squashed layer painting into this CLM that is an ancestor o f the given RenderObject, return it. Otherwise return 0.
205 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*); 205 const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObject*);
206 206
207 void updateScrollingBlockSelection(); 207 void updateScrollingBlockSelection();
208 208
209 private: 209 private:
210 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj ect*, const Vector<GraphicsLayerPaintInfo>& layers); 210 static const GraphicsLayerPaintInfo* containingSquashedLayer(const RenderObj ect*, const Vector<GraphicsLayerPaintInfo>& layers);
211 211
212 // Helper methods to updateGraphicsLayerGeometry: 212 // Helper methods to updateGraphicsLayerGeometry:
213 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca tion); 213 void computeGraphicsLayerParentLocation(const RenderLayer* compositingContai ner, const IntRect& ancestorCompositingBounds, IntPoint& graphicsLayerParentLoca tion);
214 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs etFromTransformedAncestor, Vector<RenderLayer*>& layersNeedingPaintInvalidation) ; 214 void updateSquashingLayerGeometry(const LayoutPoint& offsetFromCompositedAnc estor, const IntPoint& graphicsLayerParentLocation, const RenderLayer& reference Layer, Vector<GraphicsLayerPaintInfo>& layers, GraphicsLayer*, LayoutPoint* offs etFromTransformedAncestor, LayersNeedingPaintInvalidation&);
215 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc ation); 215 void updateMainGraphicsLayerGeometry(const IntRect& relativeCompositingBound s, const IntRect& localCompositingBounds, const IntPoint& graphicsLayerParentLoc ation);
216 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay erParentLocation); 216 void updateAncestorClippingLayerGeometry(const RenderLayer* compositingConta iner, const IntPoint& snappedOffsetFromCompositedAncestor, IntPoint& graphicsLay erParentLocation);
217 void updateOverflowControlsHostLayerGeometry(const RenderLayer* compositingS tackingContext); 217 void updateOverflowControlsHostLayerGeometry(const RenderLayer* compositingS tackingContext);
218 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I ntRect& localCompositingBounds); 218 void updateChildContainmentLayerGeometry(const IntRect& clippingBox, const I ntRect& localCompositingBounds);
219 void updateChildTransformLayerGeometry(); 219 void updateChildTransformLayerGeometry();
220 void updateMaskLayerGeometry(); 220 void updateMaskLayerGeometry();
221 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce stor, const IntRect& relativeCompositingBounds); 221 void updateTransformGeometry(const IntPoint& snappedOffsetFromCompositedAnce stor, const IntRect& relativeCompositingBounds);
222 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound sSize, const IntRect& clippingBox); 222 void updateForegroundLayerGeometry(const FloatSize& relativeCompositingBound sSize, const IntRect& clippingBox);
223 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound sSize); 223 void updateBackgroundLayerGeometry(const FloatSize& relativeCompositingBound sSize);
224 void updateReflectionLayerGeometry(Vector<RenderLayer*>& layersNeedingPaintI nvalidation); 224 void updateReflectionLayerGeometry(LayersNeedingPaintInvalidation&);
225 void updateScrollingLayerGeometry(const IntRect& localCompositingBounds); 225 void updateScrollingLayerGeometry(const IntRect& localCompositingBounds);
226 void updateChildClippingMaskLayerGeometry(); 226 void updateChildClippingMaskLayerGeometry();
227 227
228 void createPrimaryGraphicsLayer(); 228 void createPrimaryGraphicsLayer();
229 void destroyGraphicsLayers(); 229 void destroyGraphicsLayers();
230 230
231 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons); 231 PassOwnPtr<GraphicsLayer> createGraphicsLayer(CompositingReasons);
232 bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, C ompositingReasons); 232 bool toggleScrollbarLayerIfNeeded(OwnPtr<GraphicsLayer>&, bool needsLayer, C ompositingReasons);
233 233
234 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer(); } 234 RenderLayerModelObject* renderer() const { return m_owningLayer.renderer(); }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 unsigned m_isMainFrameRenderViewLayer : 1; 423 unsigned m_isMainFrameRenderViewLayer : 1;
424 unsigned m_requiresOwnBackingStoreForIntrinsicReasons : 1; 424 unsigned m_requiresOwnBackingStoreForIntrinsicReasons : 1;
425 unsigned m_requiresOwnBackingStoreForAncestorReasons : 1; 425 unsigned m_requiresOwnBackingStoreForAncestorReasons : 1;
426 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; 426 unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
427 unsigned m_scrollingContentsAreEmpty : 1; 427 unsigned m_scrollingContentsAreEmpty : 1;
428 }; 428 };
429 429
430 } // namespace blink 430 } // namespace blink
431 431
432 #endif // CompositedLayerMapping_h 432 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698