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

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h

Issue 1030323005: Simplify application of perspective origin. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add three more test expectation changes (added since earlier) Created 5 years, 8 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, 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 bool hasMaskLayer() const { return m_maskLayer; } 103 bool hasMaskLayer() const { return m_maskLayer; }
104 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); } 104 GraphicsLayer* maskLayer() const { return m_maskLayer.get(); }
105 105
106 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; } 106 bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer; }
107 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa yer.get(); } 107 GraphicsLayer* childClippingMaskLayer() const { return m_childClippingMaskLa yer.get(); }
108 108
109 GraphicsLayer* parentForSublayers() const; 109 GraphicsLayer* parentForSublayers() const;
110 GraphicsLayer* childForSuperlayers() const; 110 GraphicsLayer* childForSuperlayers() const;
111 111
112 bool hasChildTransformLayer() const { return m_childTransformLayer; }
112 GraphicsLayer* childTransformLayer() const { return m_childTransformLayer.ge t(); } 113 GraphicsLayer* childTransformLayer() const { return m_childTransformLayer.ge t(); }
113 114
114 GraphicsLayer* squashingContainmentLayer() const { return m_squashingContain mentLayer.get(); } 115 GraphicsLayer* squashingContainmentLayer() const { return m_squashingContain mentLayer.get(); }
115 GraphicsLayer* squashingLayer() const { return m_squashingLayer.get(); } 116 GraphicsLayer* squashingLayer() const { return m_squashingLayer.get(); }
116 // Contains the bottommost layer in the hierarchy that can contain the child ren transform.
117 GraphicsLayer* layerForChildrenTransform() const;
118 117
119 void setSquashingContentsNeedDisplay(); 118 void setSquashingContentsNeedDisplay();
120 void setContentsNeedDisplay(); 119 void setContentsNeedDisplay();
121 // r is in the coordinate space of the layer's render object 120 // r is in the coordinate space of the layer's render object
122 void setContentsNeedDisplayInRect(const LayoutRect&, PaintInvalidationReason ); 121 void setContentsNeedDisplayInRect(const LayoutRect&, PaintInvalidationReason );
123 122
124 void invalidateDisplayItemClient(const DisplayItemClientWrapper&); 123 void invalidateDisplayItemClient(const DisplayItemClientWrapper&);
125 124
126 // Notification from the renderer that its content changed. 125 // Notification from the renderer that its content changed.
127 void contentChanged(ContentChangeType); 126 void contentChanged(ContentChangeType);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 292
294 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the 293 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the
295 // clipping container for |m_owningLayer|. 294 // clipping container for |m_owningLayer|.
296 bool owningLayerClippedByLayerNotAboveCompositedAncestor(); 295 bool owningLayerClippedByLayerNotAboveCompositedAncestor();
297 296
298 DeprecatedPaintLayer& m_owningLayer; 297 DeprecatedPaintLayer& m_owningLayer;
299 298
300 // The hierarchy of layers that is maintained by the CompositedDeprecatedPai ntLayerMapping looks like this: 299 // The hierarchy of layers that is maintained by the CompositedDeprecatedPai ntLayerMapping looks like this:
301 // 300 //
302 // + m_ancestorClippingLayer [OPTIONAL] 301 // + m_ancestorClippingLayer [OPTIONAL]
303 // + m_graphicsLayer 302 // + m_graphicsLayer
304 // + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI ONAL] <-OR-> m_childTransformLayer 303 // + m_childTransformLayer [OPTIONAL]
305 // | + m_scrollingContents Layer [Present iff m_scrollingLayer is present] 304 // | + m_childContainmentLayer [OPTIONAL] <-OR-> m_scrollingLayer [OPTI ONAL]
306 // | + m_scrollingBlock SelectionLayer [Present iff m_scrollingLayer is present] 305 // | + m_scrollingContentsL ayer [Present iff m_scrollingLayer is present]
307 // | 306 // | + m_scrollingBlockSe lectionLayer [Present iff m_scrollingLayer is present]
308 // + m_overflowControlsClippingLayer [OPTIONAL] // *The overflow cont rols may need to be repositioned in the 307 // + m_overflowControlsClippingLayer [OPTIONAL] // *The overflow contro ls may need to be repositioned in the
309 // + m_overflowControlsHostLayer // graphics layer tr ee by the RLC to ensure that they stack 308 // + m_overflowControlsHostLayer [OPTIONAL] // graphics layer tree by the RLC to ensure that they stack
310 // + m_layerForVerticalScrollbar // above scrolling c ontent. 309 // + m_layerForVerticalScrollbar [OPTIONAL] // above scrolling con tent.
311 // + m_layerForHorizontalScrollbar 310 // + m_layerForHorizontalScrollbar [OPTIONAL]
312 // + m_layerForScrollCorner 311 // + m_layerForScrollCorner [OPTIONAL]
313 // 312 //
314 // We need an ancestor clipping layer if our clipping ancestor is not our an cestor in the 313 // We need an ancestor clipping layer if our clipping ancestor is not our an cestor in the
315 // clipping tree. Here's what that might look like. 314 // clipping tree. Here's what that might look like.
316 // 315 //
317 // Let A = the clipping ancestor, 316 // Let A = the clipping ancestor,
318 // B = the clip descendant, and 317 // B = the clip descendant, and
319 // SC = the stacking context that is the ancestor of A and B in the stac king tree. 318 // SC = the stacking context that is the ancestor of A and B in the stac king tree.
320 // 319 //
321 // SC 320 // SC
322 // + A = m_graphicsLayer 321 // + A = m_graphicsLayer
323 // | + m_childContainmentLayer 322 // | + m_childContainmentLayer
324 // | + ... 323 // | + ...
325 // ... 324 // ...
326 // | 325 // |
327 // + B = m_ancestorClippingLayer [+] 326 // + B = m_ancestorClippingLayer [+]
328 // + m_graphicsLayer 327 // + m_graphicsLayer
329 // + ... 328 // + ...
330 // 329 //
331 // In this case B is clipped by another layer that doesn't happen to be its ancestor: A. 330 // In this case B is clipped by another layer that doesn't happen to be its ancestor: A.
332 // So we create an ancestor clipping layer for B, [+], which ensures that B is clipped 331 // So we create an ancestor clipping layer for B, [+], which ensures that B is clipped
333 // as if it had been A's descendant. 332 // as if it had been A's descendant.
334 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe d by an ancestor which is not a stacking context. 333 OwnPtr<GraphicsLayer> m_ancestorClippingLayer; // Only used if we are clippe d by an ancestor which is not a stacking context.
335 OwnPtr<GraphicsLayer> m_graphicsLayer; 334 OwnPtr<GraphicsLayer> m_graphicsLayer;
336 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp ing on a stacking context with compositing children. 335 OwnPtr<GraphicsLayer> m_childContainmentLayer; // Only used if we have clipp ing on a stacking context with compositing children.
337 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec tive and no m_childContainmentLayer. 336 OwnPtr<GraphicsLayer> m_childTransformLayer; // Only used if we have perspec tive.
338 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c omposited scrolling. 337 OwnPtr<GraphicsLayer> m_scrollingLayer; // Only used if the layer is using c omposited scrolling.
339 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is using composited scrolling. 338 OwnPtr<GraphicsLayer> m_scrollingContentsLayer; // Only used if the layer is using composited scrolling.
340 OwnPtr<GraphicsLayer> m_scrollingBlockSelectionLayer; // Only used if the la yer is using composited scrolling, but has no scrolling contents apart from bloc k selection gaps. 339 OwnPtr<GraphicsLayer> m_scrollingBlockSelectionLayer; // Only used if the la yer is using composited scrolling, but has no scrolling contents apart from bloc k selection gaps.
341 340
342 // This layer is also added to the hierarchy by the RLB, but in a different way than 341 // This layer is also added to the hierarchy by the RLB, but in a different way than
343 // the layers above. It's added to m_graphicsLayer as its mask layer (natura lly) if 342 // the layers above. It's added to m_graphicsLayer as its mask layer (natura lly) if
344 // we have a mask, and isn't part of the typical hierarchy (it has no childr en). 343 // we have a mask, and isn't part of the typical hierarchy (it has no childr en).
345 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask. 344 OwnPtr<GraphicsLayer> m_maskLayer; // Only used if we have a mask.
346 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c lip child layers or accelerated contents with border radius or clip-path. 345 OwnPtr<GraphicsLayer> m_childClippingMaskLayer; // Only used if we have to c lip child layers or accelerated contents with border radius or clip-path.
347 346
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 unsigned m_pendingUpdateScope : 2; 414 unsigned m_pendingUpdateScope : 2;
416 unsigned m_isMainFrameLayoutViewLayer : 1; 415 unsigned m_isMainFrameLayoutViewLayer : 1;
417 416
418 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; 417 unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
419 unsigned m_scrollingContentsAreEmpty : 1; 418 unsigned m_scrollingContentsAreEmpty : 1;
420 }; 419 };
421 420
422 } // namespace blink 421 } // namespace blink
423 422
424 #endif // CompositedDeprecatedPaintLayerMapping_h 423 #endif // CompositedDeprecatedPaintLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698