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

Side by Side Diff: Source/core/rendering/RenderLayer.h

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed bogus asserts Created 7 years 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 | « Source/core/rendering/CompositingState.h ('k') | Source/core/rendering/RenderLayer.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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@web.de> 10 * Christian Biesinger <cbiesinger@web.de>
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 347
348 CompositedLayerMappingPtr compositedLayerMapping() const { return m_composit edLayerMapping.get(); } 348 CompositedLayerMappingPtr compositedLayerMapping() const { return m_composit edLayerMapping.get(); }
349 CompositedLayerMappingPtr ensureCompositedLayerMapping(); 349 CompositedLayerMappingPtr ensureCompositedLayerMapping();
350 350
351 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer, 351 // NOTE: If you are using hasCompositedLayerMapping to determine the state o f compositing for this layer,
352 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping), 352 // (and not just to do bookkeeping related to the mapping like, say, allocat ing or deallocating a mapping),
353 // then you may have incorrect logic. Use compositingState() instead. 353 // then you may have incorrect logic. Use compositingState() instead.
354 bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get (); } 354 bool hasCompositedLayerMapping() const { return m_compositedLayerMapping.get (); }
355 void clearCompositedLayerMapping(bool layerBeingDestroyed = false); 355 void clearCompositedLayerMapping(bool layerBeingDestroyed = false);
356 356
357 CompositedLayerMapping* groupedMapping() const { return m_groupedMapping; }
358 void setGroupedMapping(CompositedLayerMapping* groupedMapping) { m_groupedMa pping = groupedMapping; }
359
357 bool hasCompositedMask() const; 360 bool hasCompositedMask() const;
358 bool hasCompositedClippingMask() const; 361 bool hasCompositedClippingMask() const;
359 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); } 362 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); }
360 363
361 RenderLayer* scrollParent() const; 364 RenderLayer* scrollParent() const;
362 RenderLayer* clipParent() const; 365 RenderLayer* clipParent() const;
363 366
364 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const; 367 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const;
365 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const; 368 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const;
366 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const; 369 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // RenderObject::canContainFixedPositionedObject() should probably be us ed 440 // RenderObject::canContainFixedPositionedObject() should probably be us ed
438 // instead. 441 // instead.
439 RenderLayerModelObject* layerRenderer = renderer(); 442 RenderLayerModelObject* layerRenderer = renderer();
440 return isRootLayer() || layerRenderer->isPositioned() || hasTransform(); 443 return isRootLayer() || layerRenderer->isPositioned() || hasTransform();
441 } 444 }
442 445
443 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ; 446 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ;
444 447
445 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const; 448 PassOwnPtr<Vector<FloatRect> > collectTrackedRepaintRects() const;
446 449
450 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_compositingProper ties.offsetFromSquashingLayerOrigin = offset; }
451 IntSize offsetFromSquashingLayerOrigin() const { return m_compositingPropert ies.offsetFromSquashingLayerOrigin; }
452
447 private: 453 private:
448 bool hasOverflowControls() const; 454 bool hasOverflowControls() const;
449 455
450 void setIsUnclippedDescendant(bool isUnclippedDescendant) { m_isUnclippedDes cendant = isUnclippedDescendant; } 456 void setIsUnclippedDescendant(bool isUnclippedDescendant) { m_isUnclippedDes cendant = isUnclippedDescendant; }
451 457
452 void setAncestorChainHasSelfPaintingLayerDescendant(); 458 void setAncestorChainHasSelfPaintingLayerDescendant();
453 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus(); 459 void dirtyAncestorChainHasSelfPaintingLayerDescendantStatus();
454 460
455 void setAncestorChainHasOutOfFlowPositionedDescendant(); 461 void setAncestorChainHasOutOfFlowPositionedDescendant();
456 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); 462 void dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus();
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 bool hasNonCompositedChild : 1; 716 bool hasNonCompositedChild : 1;
711 717
712 // Should be for stacking contexts having unisolated blending descendant s. 718 // Should be for stacking contexts having unisolated blending descendant s.
713 bool shouldIsolateCompositedDescendants : 1; 719 bool shouldIsolateCompositedDescendants : 1;
714 720
715 // The reason, if any exists, that a fixed-position layer is chosen not to be composited. 721 // The reason, if any exists, that a fixed-position layer is chosen not to be composited.
716 unsigned viewportConstrainedNotCompositedReason : 2; 722 unsigned viewportConstrainedNotCompositedReason : 2;
717 723
718 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield. 724 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
719 CompositingReasons compositingReasons; 725 CompositingReasons compositingReasons;
726
727 // Used for invalidating this layer's contents on the squashing Graphics Layer.
728 IntSize offsetFromSquashingLayerOrigin;
720 }; 729 };
721 730
722 CompositingProperties m_compositingProperties; 731 CompositingProperties m_compositingProperties;
723 732
724 private: 733 private:
725 enum CompositedScrollingHistogramBuckets { 734 enum CompositedScrollingHistogramBuckets {
726 IsScrollableAreaBucket = 0, 735 IsScrollableAreaBucket = 0,
727 NeedsToBeStackingContainerBucket = 1, 736 NeedsToBeStackingContainerBucket = 1,
728 WillUseCompositedScrollingBucket = 2, 737 WillUseCompositedScrollingBucket = 2,
729 CompositedScrollingHistogramMax = 3 738 CompositedScrollingHistogramMax = 3
730 }; 739 };
731 740
732 IntRect m_blockSelectionGapsBounds; 741 IntRect m_blockSelectionGapsBounds;
733 742
734 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 743 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
735 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; 744 OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
736 745
746 CompositedLayerMapping* m_groupedMapping;
747
737 RenderLayerRepainter m_repainter; 748 RenderLayerRepainter m_repainter;
738 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? 749 RenderLayerClipper m_clipper; // FIXME: Lazily allocate?
739 OwnPtr<RenderLayerStackingNode> m_stackingNode; 750 OwnPtr<RenderLayerStackingNode> m_stackingNode;
740 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; 751 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo;
741 }; 752 };
742 753
743 } // namespace WebCore 754 } // namespace WebCore
744 755
745 #ifndef NDEBUG 756 #ifndef NDEBUG
746 // Outside the WebCore namespace for ease of invocation from gdb. 757 // Outside the WebCore namespace for ease of invocation from gdb.
747 void showLayerTree(const WebCore::RenderLayer*); 758 void showLayerTree(const WebCore::RenderLayer*);
748 void showLayerTree(const WebCore::RenderObject*); 759 void showLayerTree(const WebCore::RenderObject*);
749 #endif 760 #endif
750 761
751 #endif // RenderLayer_h 762 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/CompositingState.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698