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

Side by Side Diff: third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.h

Issue 1636563003: Put rare PaintLayer fields into PaintLayerRareData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 bool updateChildTransformLayer(bool needsChildTransformLayer); 246 bool updateChildTransformLayer(bool needsChildTransformLayer);
247 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n eedsVerticalScrollbarLayer, bool needsScrollCornerLayer, bool needsAncestorClip) ; 247 bool updateOverflowControlsLayers(bool needsHorizontalScrollbarLayer, bool n eedsVerticalScrollbarLayer, bool needsScrollCornerLayer, bool needsAncestorClip) ;
248 bool updateForegroundLayer(bool needsForegroundLayer); 248 bool updateForegroundLayer(bool needsForegroundLayer);
249 bool updateBackgroundLayer(bool needsBackgroundLayer); 249 bool updateBackgroundLayer(bool needsBackgroundLayer);
250 bool updateMaskLayer(bool needsMaskLayer); 250 bool updateMaskLayer(bool needsMaskLayer);
251 void updateChildClippingMaskLayer(bool needsChildClippingMaskLayer); 251 void updateChildClippingMaskLayer(bool needsChildClippingMaskLayer);
252 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer.scrolla bleArea() && m_owningLayer.scrollableArea()->horizontalScrollbar(); } 252 bool requiresHorizontalScrollbarLayer() const { return m_owningLayer.scrolla bleArea() && m_owningLayer.scrollableArea()->horizontalScrollbar(); }
253 bool requiresVerticalScrollbarLayer() const { return m_owningLayer.scrollabl eArea() && m_owningLayer.scrollableArea()->verticalScrollbar(); } 253 bool requiresVerticalScrollbarLayer() const { return m_owningLayer.scrollabl eArea() && m_owningLayer.scrollableArea()->verticalScrollbar(); }
254 bool requiresScrollCornerLayer() const { return m_owningLayer.scrollableArea () && !m_owningLayer.scrollableArea()->scrollCornerAndResizerRect().isEmpty(); } 254 bool requiresScrollCornerLayer() const { return m_owningLayer.scrollableArea () && !m_owningLayer.scrollableArea()->scrollCornerAndResizerRect().isEmpty(); }
255 bool updateScrollingLayers(bool scrollingLayers); 255 bool updateScrollingLayers(bool scrollingLayers);
256 void updateScrollParent(PaintLayer*); 256 void updateScrollParent(const PaintLayer*);
257 void updateClipParent(PaintLayer* scrollParent); 257 void updateClipParent(const PaintLayer* scrollParent);
258 bool updateSquashingLayers(bool needsSquashingLayers); 258 bool updateSquashingLayers(bool needsSquashingLayers);
259 void updateDrawsContent(); 259 void updateDrawsContent();
260 void updateChildrenTransform(); 260 void updateChildrenTransform();
261 void updateCompositedBounds(); 261 void updateCompositedBounds();
262 void registerScrollingLayers(); 262 void registerScrollingLayers();
263 263
264 // Also sets subpixelAccumulation on the layer. 264 // Also sets subpixelAccumulation on the layer.
265 void computeBoundsOfOwningLayer(const PaintLayer* compositedAncestor, IntRec t& localCompositingBounds, IntRect& compositingBoundsRelativeToCompositedAncesto r, LayoutPoint& offsetFromCompositedAncestor, IntPoint& snappedOffsetFromComposi tedAncestor); 265 void computeBoundsOfOwningLayer(const PaintLayer* compositedAncestor, IntRec t& localCompositingBounds, IntRect& compositingBoundsRelativeToCompositedAncesto r, LayoutPoint& offsetFromCompositedAncestor, IntPoint& snappedOffsetFromComposi tedAncestor);
266 266
267 void setBackgroundLayerPaintsFixedRootBackground(bool); 267 void setBackgroundLayerPaintsFixedRootBackground(bool);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 // Computes the background clip rect for the given squashed layer, up to any containing layer that is squashed into the 300 // Computes the background clip rect for the given squashed layer, up to any containing layer that is squashed into the
301 // same squashing layer and contains this squashed layer's clipping ancestor . 301 // same squashing layer and contains this squashed layer's clipping ancestor .
302 // The clip rect is returned in the coordinate space of the given squashed l ayer. 302 // The clip rect is returned in the coordinate space of the given squashed l ayer.
303 // If there is no such containing layer, returns the infinite rect. 303 // If there is no such containing layer, returns the infinite rect.
304 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer . They are doing very similar things. 304 // FIXME: unify this code with the code that sets up m_ancestorClippingLayer . They are doing very similar things.
305 static IntRect localClipRectForSquashedLayer(const PaintLayer& referenceLaye r, const GraphicsLayerPaintInfo&, const Vector<GraphicsLayerPaintInfo>& layers) ; 305 static IntRect localClipRectForSquashedLayer(const PaintLayer& referenceLaye r, const GraphicsLayerPaintInfo&, const Vector<GraphicsLayerPaintInfo>& layers) ;
306 306
307 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the 307 // Return true if |m_owningLayer|'s compositing ancestor is not a descendant (inclusive) of the
308 // clipping container for |m_owningLayer|. 308 // clipping container for |m_owningLayer|.
309 bool owningLayerClippedByLayerNotAboveCompositedAncestor(PaintLayer* scrollP arent); 309 bool owningLayerClippedByLayerNotAboveCompositedAncestor(const PaintLayer* s crollParent);
310 310
311 PaintLayer* scrollParent(); 311 const PaintLayer* scrollParent();
312 312
313 // Clear the groupedMapping entry on the layer at the given index, only if t hat layer does 313 // Clear the groupedMapping entry on the layer at the given index, only if t hat layer does
314 // not appear earlier in the set of layers for this object. 314 // not appear earlier in the set of layers for this object.
315 bool invalidateLayerIfNoPrecedingEntry(size_t); 315 bool invalidateLayerIfNoPrecedingEntry(size_t);
316 316
317 PaintLayer& m_owningLayer; 317 PaintLayer& m_owningLayer;
318 318
319 // The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this: 319 // The hierarchy of layers that is maintained by the CompositedLayerMapping looks like this:
320 // 320 //
321 // + m_ancestorClippingLayer [OPTIONAL] 321 // + m_ancestorClippingLayer [OPTIONAL]
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 unsigned m_backgroundLayerPaintsFixedRootBackground : 1; 438 unsigned m_backgroundLayerPaintsFixedRootBackground : 1;
439 unsigned m_scrollingContentsAreEmpty : 1; 439 unsigned m_scrollingContentsAreEmpty : 1;
440 440
441 friend class CompositedLayerMappingTest; 441 friend class CompositedLayerMappingTest;
442 }; 442 };
443 443
444 } // namespace blink 444 } // namespace blink
445 445
446 #endif // CompositedLayerMapping_h 446 #endif // CompositedLayerMapping_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698