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

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

Issue 233063004: Suppress layer creation for descendants of GPU-rasterized layers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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) 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; } 498 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; }
499 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll); 499 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com positingReasonAll);
500 500
501 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo mpositingDescendant; } 501 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo mpositingDescendant; }
502 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo sitingDescendant = b; } 502 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo sitingDescendant = b; }
503 503
504 bool shouldIsolateCompositedDescendants() const { return m_compositingProper ties.shouldIsolateCompositedDescendants; } 504 bool shouldIsolateCompositedDescendants() const { return m_compositingProper ties.shouldIsolateCompositedDescendants; }
505 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie s.shouldIsolateCompositedDescendants = b; } 505 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie s.shouldIsolateCompositedDescendants = b; }
506 506
507 bool suppressingCompositedLayerCreation() const { return m_compositingProper ties.suppressingCompositedLayerCreation; }
508 void setSuppressingCompositedLayerCreation(bool b) { m_compositingProperties .suppressingCompositedLayerCreation = b; }
abarth-chromium 2014/04/14 20:25:53 Please add an ASSERT that we're allowed to query c
ajuma 2014/04/15 19:11:34 Added a getter for m_compositingProperties with an
509
507 void updateDescendantDependentFlags(); 510 void updateDescendantDependentFlags();
508 511
509 void updateOrRemoveFilterEffectRenderer(); 512 void updateOrRemoveFilterEffectRenderer();
510 513
511 void updateSelfPaintingLayer(); 514 void updateSelfPaintingLayer();
512 515
513 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags); 516 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
514 517
515 RenderLayer* enclosingTransformedAncestor() const; 518 RenderLayer* enclosingTransformedAncestor() const;
516 519
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 // Properties that are computed while updating compositing layers. These val ues may be dirty/invalid if 724 // Properties that are computed while updating compositing layers. These val ues may be dirty/invalid if
722 // compositing status is not up-to-date before using them. 725 // compositing status is not up-to-date before using them.
723 struct CompositingProperties { 726 struct CompositingProperties {
724 CompositingProperties() 727 CompositingProperties()
725 : hasCompositingDescendant(false) 728 : hasCompositingDescendant(false)
726 , hasNonCompositedChild(false) 729 , hasNonCompositedChild(false)
727 , shouldIsolateCompositedDescendants(false) 730 , shouldIsolateCompositedDescendants(false)
728 , lostGroupedMapping(false) 731 , lostGroupedMapping(false)
729 , viewportConstrainedNotCompositedReason(NoNotCompositedReason) 732 , viewportConstrainedNotCompositedReason(NoNotCompositedReason)
730 , compositingReasons(CompositingReasonNone) 733 , compositingReasons(CompositingReasonNone)
734 , suppressingCompositedLayerCreation(false)
731 { } 735 { }
732 736
733 // Used only while determining what layers should be composited. Applies to the tree of z-order lists. 737 // Used only while determining what layers should be composited. Applies to the tree of z-order lists.
734 bool hasCompositingDescendant : 1; 738 bool hasCompositingDescendant : 1;
735 739
736 // Applies to the real render layer tree (i.e., the tree determined by t he layer's parent and children and 740 // Applies to the real render layer tree (i.e., the tree determined by t he layer's parent and children and
737 // as opposed to the tree formed by the z-order and normal flow lists). 741 // as opposed to the tree formed by the z-order and normal flow lists).
738 bool hasNonCompositedChild : 1; 742 bool hasNonCompositedChild : 1;
739 743
740 // Should be for stacking contexts having unisolated blending descendant s. 744 // Should be for stacking contexts having unisolated blending descendant s.
741 bool shouldIsolateCompositedDescendants : 1; 745 bool shouldIsolateCompositedDescendants : 1;
742 746
743 // True if this render layer just lost its grouped mapping due to the Co mpositedLayerMapping being destroyed, 747 // True if this render layer just lost its grouped mapping due to the Co mpositedLayerMapping being destroyed,
744 // and we don't yet know to what graphics layer this RenderLayer will be assigned. 748 // and we don't yet know to what graphics layer this RenderLayer will be assigned.
745 bool lostGroupedMapping : 1; 749 bool lostGroupedMapping : 1;
746 750
747 // The reason, if any exists, that a fixed-position layer is chosen not to be composited. 751 // The reason, if any exists, that a fixed-position layer is chosen not to be composited.
748 unsigned viewportConstrainedNotCompositedReason : ViewportConstrainedNot CompositedReasonBits; 752 unsigned viewportConstrainedNotCompositedReason : ViewportConstrainedNot CompositedReasonBits;
749 753
750 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield. 754 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
751 CompositingReasons compositingReasons; 755 CompositingReasons compositingReasons;
752 756
753 // Used for invalidating this layer's contents on the squashing Graphics Layer. 757 // Used for invalidating this layer's contents on the squashing Graphics Layer.
754 IntSize offsetFromSquashingLayerOrigin; 758 IntSize offsetFromSquashingLayerOrigin;
759
760 // Whether this render layer is trying to avoid becoming composited, if possible.
761 bool suppressingCompositedLayerCreation : 1;
abarth-chromium 2014/04/14 20:25:53 Please move this earlier in the struct so that it
ajuma 2014/04/15 19:11:34 Done.
755 }; 762 };
756 763
757 AncestorDependentProperties m_ancestorDependentProperties; 764 AncestorDependentProperties m_ancestorDependentProperties;
758 765
759 CompositingProperties m_compositingProperties; 766 CompositingProperties m_compositingProperties;
760 767
761 IntRect m_blockSelectionGapsBounds; 768 IntRect m_blockSelectionGapsBounds;
762 769
763 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; 770 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping;
764 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; 771 OwnPtr<RenderLayerScrollableArea> m_scrollableArea;
(...skipping 11 matching lines...) Expand all
776 783
777 } // namespace WebCore 784 } // namespace WebCore
778 785
779 #ifndef NDEBUG 786 #ifndef NDEBUG
780 // Outside the WebCore namespace for ease of invocation from gdb. 787 // Outside the WebCore namespace for ease of invocation from gdb.
781 void showLayerTree(const WebCore::RenderLayer*); 788 void showLayerTree(const WebCore::RenderLayer*);
782 void showLayerTree(const WebCore::RenderObject*); 789 void showLayerTree(const WebCore::RenderObject*);
783 #endif 790 #endif
784 791
785 #endif // RenderLayer_h 792 #endif // RenderLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698