OLD | NEW |
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 RenderLayerBlendInfo& blendInfo() { return m_blendInfo; } | 432 RenderLayerBlendInfo& blendInfo() { return m_blendInfo; } |
433 | 433 |
434 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_offsetFromSquashi
ngLayerOrigin = offset; } | 434 void setOffsetFromSquashingLayerOrigin(IntSize offset) { m_offsetFromSquashi
ngLayerOrigin = offset; } |
435 IntSize offsetFromSquashingLayerOrigin() const { ASSERT(isAllowedToQueryComp
ositingState()); return m_offsetFromSquashingLayerOrigin; } | 435 IntSize offsetFromSquashingLayerOrigin() const { ASSERT(isAllowedToQueryComp
ositingState()); return m_offsetFromSquashingLayerOrigin; } |
436 | 436 |
437 bool scrollsOverflow() const; | 437 bool scrollsOverflow() const; |
438 | 438 |
439 CompositingReasons styleDeterminedCompositingReasons() const { return m_styl
eDeterminedCompositingReasons; } | 439 CompositingReasons styleDeterminedCompositingReasons() const { return m_styl
eDeterminedCompositingReasons; } |
440 void setStyleDeterminedCompositingReasons(CompositingReasons reasons) { ASSE
RT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m_st
yleDeterminedCompositingReasons = reasons; } | 440 void setStyleDeterminedCompositingReasons(CompositingReasons reasons) { ASSE
RT(reasons == (reasons & CompositingReasonComboAllStyleDeterminedReasons)); m_st
yleDeterminedCompositingReasons = reasons; } |
441 | 441 |
442 class AncestorDependentProperties { | 442 class CompositingInputs { |
443 public: | 443 public: |
444 AncestorDependentProperties() | 444 CompositingInputs() |
445 : opacityAncestor(0) | 445 : opacityAncestor(0) |
446 , transformAncestor(0) | 446 , transformAncestor(0) |
447 , filterAncestor(0) | 447 , filterAncestor(0) |
448 , isUnclippedDescendant(false) | 448 , isUnclippedDescendant(false) |
449 { } | 449 { } |
450 | 450 |
451 IntRect clippedAbsoluteBoundingBox; | 451 IntRect clippedAbsoluteBoundingBox; |
452 const RenderLayer* opacityAncestor; | 452 const RenderLayer* opacityAncestor; |
453 const RenderLayer* transformAncestor; | 453 const RenderLayer* transformAncestor; |
454 const RenderLayer* filterAncestor; | 454 const RenderLayer* filterAncestor; |
455 unsigned isUnclippedDescendant : 1; | 455 unsigned isUnclippedDescendant : 1; |
456 }; | 456 }; |
457 | 457 |
458 void setNeedsToUpdateAncestorDependentProperties(); | 458 void setNeedsCompositingInputsUpdate(); |
459 bool childNeedsToUpdateAncestorDependantProperties() const { return m_childN
eedsToUpdateAncestorDependantProperties; } | 459 bool childNeedsCompositingInputsUpdate() const { return m_childNeedsComposit
ingInputsUpdate; } |
460 bool needsToUpdateAncestorDependentProperties() const { return m_needsToUpda
teAncestorDependentProperties; } | 460 bool needsCompositingInputsUpdate() const { return m_needsCompositingInputsU
pdate; } |
461 | 461 |
462 void updateAncestorDependentProperties(const AncestorDependentProperties&); | 462 void updateCompositingInputs(const CompositingInputs&); |
463 void clearChildNeedsToUpdateAncestorDependantProperties(); | 463 void clearChildNeedsCompositingInputsUpdate(); |
464 | 464 |
465 const AncestorDependentProperties& ancestorDependentProperties() const { ASS
ERT(!m_needsToUpdateAncestorDependentProperties); return m_ancestorDependentProp
erties; } | 465 const CompositingInputs& compositingInputs() const { ASSERT(!m_needsComposit
ingInputsUpdate); return m_compositingInputs; } |
466 | 466 |
467 // FIXME: Remove this function. | 467 // FIXME: Remove this function. |
468 bool potentiallyStaleIsUnclippedDescendant() const { return m_ancestorDepend
entProperties.isUnclippedDescendant; } | 468 bool potentiallyStaleIsUnclippedDescendant() const { return m_compositingInp
uts.isUnclippedDescendant; } |
469 | 469 |
470 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } | 470 bool lostGroupedMapping() const { ASSERT(isAllowedToQueryCompositingState())
; return m_lostGroupedMapping; } |
471 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } | 471 void setLostGroupedMapping(bool b) { m_lostGroupedMapping = b; } |
472 | 472 |
473 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_compositingReasons; } | 473 CompositingReasons compositingReasons() const { ASSERT(isAllowedToQueryCompo
sitingState()); return m_compositingReasons; } |
474 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); | 474 void setCompositingReasons(CompositingReasons, CompositingReasons mask = Com
positingReasonAll); |
475 | 475 |
476 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt
ate()); return m_hasCompositingDescendant; } | 476 bool hasCompositingDescendant() const { ASSERT(isAllowedToQueryCompositingSt
ate()); return m_hasCompositingDescendant; } |
477 void setHasCompositingDescendant(bool b) { m_hasCompositingDescendant = b;
} | 477 void setHasCompositingDescendant(bool b) { m_hasCompositingDescendant = b;
} |
478 | 478 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 unsigned m_has3DTransformedDescendant : 1; | 640 unsigned m_has3DTransformedDescendant : 1; |
641 | 641 |
642 unsigned m_containsDirtyOverlayScrollbars : 1; | 642 unsigned m_containsDirtyOverlayScrollbars : 1; |
643 | 643 |
644 // This is an optimization added for <table>. | 644 // This is an optimization added for <table>. |
645 // Currently cells do not need to update their repaint rectangles when scrol
ling. This also | 645 // Currently cells do not need to update their repaint rectangles when scrol
ling. This also |
646 // saves a lot of time when scrolling on a table. | 646 // saves a lot of time when scrolling on a table. |
647 const unsigned m_canSkipRepaintRectsUpdateOnScroll : 1; | 647 const unsigned m_canSkipRepaintRectsUpdateOnScroll : 1; |
648 | 648 |
649 unsigned m_hasFilterInfo : 1; | 649 unsigned m_hasFilterInfo : 1; |
650 unsigned m_needsToUpdateAncestorDependentProperties : 1; | 650 unsigned m_needsCompositingInputsUpdate : 1; |
651 unsigned m_childNeedsToUpdateAncestorDependantProperties : 1; | 651 unsigned m_childNeedsCompositingInputsUpdate : 1; |
652 | 652 |
653 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. | 653 // Used only while determining what layers should be composited. Applies to
the tree of z-order lists. |
654 unsigned m_hasCompositingDescendant : 1; | 654 unsigned m_hasCompositingDescendant : 1; |
655 | 655 |
656 // Applies to the real render layer tree (i.e., the tree determined by the l
ayer's parent and children and | 656 // Applies to the real render layer tree (i.e., the tree determined by the l
ayer's parent and children and |
657 // as opposed to the tree formed by the z-order and normal flow lists). | 657 // as opposed to the tree formed by the z-order and normal flow lists). |
658 unsigned m_hasNonCompositedChild : 1; | 658 unsigned m_hasNonCompositedChild : 1; |
659 | 659 |
660 // Should be for stacking contexts having unisolated blending descendants. | 660 // Should be for stacking contexts having unisolated blending descendants. |
661 unsigned m_shouldIsolateCompositedDescendants : 1; | 661 unsigned m_shouldIsolateCompositedDescendants : 1; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. | 696 // These compositing reasons are updated whenever style changes, not while u
pdating compositing layers. |
697 // They should not be used to infer the compositing state of this layer. | 697 // They should not be used to infer the compositing state of this layer. |
698 CompositingReasons m_styleDeterminedCompositingReasons; | 698 CompositingReasons m_styleDeterminedCompositingReasons; |
699 | 699 |
700 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. | 700 // Once computed, indicates all that a layer needs to become composited usin
g the CompositingReasons enum bitfield. |
701 CompositingReasons m_compositingReasons; | 701 CompositingReasons m_compositingReasons; |
702 | 702 |
703 // Used for invalidating this layer's contents on the squashing GraphicsLaye
r. | 703 // Used for invalidating this layer's contents on the squashing GraphicsLaye
r. |
704 IntSize m_offsetFromSquashingLayerOrigin; | 704 IntSize m_offsetFromSquashingLayerOrigin; |
705 | 705 |
706 AncestorDependentProperties m_ancestorDependentProperties; | 706 CompositingInputs m_compositingInputs; |
707 | 707 |
708 IntRect m_blockSelectionGapsBounds; | 708 IntRect m_blockSelectionGapsBounds; |
709 | 709 |
710 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; | 710 OwnPtr<CompositedLayerMapping> m_compositedLayerMapping; |
711 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; | 711 OwnPtr<RenderLayerScrollableArea> m_scrollableArea; |
712 | 712 |
713 CompositedLayerMapping* m_groupedMapping; | 713 CompositedLayerMapping* m_groupedMapping; |
714 | 714 |
715 RenderLayerRepainter m_repainter; | 715 RenderLayerRepainter m_repainter; |
716 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? | 716 RenderLayerClipper m_clipper; // FIXME: Lazily allocate? |
717 OwnPtr<RenderLayerStackingNode> m_stackingNode; | 717 OwnPtr<RenderLayerStackingNode> m_stackingNode; |
718 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; | 718 OwnPtr<RenderLayerReflectionInfo> m_reflectionInfo; |
719 RenderLayerBlendInfo m_blendInfo; | 719 RenderLayerBlendInfo m_blendInfo; |
720 | 720 |
721 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. | 721 LayoutSize m_subpixelAccumulation; // The accumulated subpixel offset of a c
omposited layer's composited bounds compared to absolute coordinates. |
722 }; | 722 }; |
723 | 723 |
724 } // namespace WebCore | 724 } // namespace WebCore |
725 | 725 |
726 #ifndef NDEBUG | 726 #ifndef NDEBUG |
727 // Outside the WebCore namespace for ease of invocation from gdb. | 727 // Outside the WebCore namespace for ease of invocation from gdb. |
728 void showLayerTree(const WebCore::RenderLayer*); | 728 void showLayerTree(const WebCore::RenderLayer*); |
729 void showLayerTree(const WebCore::RenderObject*); | 729 void showLayerTree(const WebCore::RenderObject*); |
730 #endif | 730 #endif |
731 | 731 |
732 #endif // RenderLayer_h | 732 #endif // RenderLayer_h |
OLD | NEW |