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

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

Issue 23511004: mix-blend-mode implementation for accelerated layers - blink part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed a failing reftest dependent on render-compositor bindings 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
« no previous file with comments | « Source/core/rendering/CompositingReasons.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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 bool hasCompositedMask() const; 357 bool hasCompositedMask() const;
358 bool hasCompositedClippingMask() const; 358 bool hasCompositedClippingMask() const;
359 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); } 359 bool needsCompositedScrolling() const { return m_scrollableArea && m_scrolla bleArea->needsCompositedScrolling(); }
360 360
361 RenderLayer* scrollParent() const; 361 RenderLayer* scrollParent() const;
362 RenderLayer* clipParent() const; 362 RenderLayer* clipParent() const;
363 363
364 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const; 364 bool needsCompositingLayersRebuiltForClip(const RenderStyle* oldStyle, const RenderStyle* newStyle) const;
365 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const; 365 bool needsCompositingLayersRebuiltForOverflow(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const;
366 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const; 366 bool needsCompositingLayersRebuiltForFilters(const RenderStyle* oldStyle, co nst RenderStyle* newStyle, bool didPaintWithFilters) const;
367 bool needsCompositingLayersRebuiltForBlending(const RenderStyle* oldStyle, c onst RenderStyle* newStyle) const;
367 368
368 bool paintsWithTransparency(PaintBehavior paintBehavior) const 369 bool paintsWithTransparency(PaintBehavior paintBehavior) const
369 { 370 {
370 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit ingLayers) || compositingState() != PaintsIntoOwnBacking); 371 return isTransparent() && ((paintBehavior & PaintBehaviorFlattenComposit ingLayers) || compositingState() != PaintsIntoOwnBacking);
371 } 372 }
372 373
373 bool paintsWithTransform(PaintBehavior) const; 374 bool paintsWithTransform(PaintBehavior) const;
374 375
375 // Returns true if background phase is painted opaque in the given rect. 376 // Returns true if background phase is painted opaque in the given rect.
376 // The query rect is given in local coordinates. 377 // The query rect is given in local coordinates.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 595
595 // FIXME: Temporary. Remove when new columns come online. 596 // FIXME: Temporary. Remove when new columns come online.
596 bool useRegionBasedColumns() const; 597 bool useRegionBasedColumns() const;
597 598
598 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo mpositingDescendant; } 599 bool hasCompositingDescendant() const { return m_compositingProperties.hasCo mpositingDescendant; }
599 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo sitingDescendant = b; } 600 void setHasCompositingDescendant(bool b) { m_compositingProperties.hasCompo sitingDescendant = b; }
600 601
601 bool hasNonCompositedChild() const { return m_compositingProperties.hasNonCo mpositedChild; } 602 bool hasNonCompositedChild() const { return m_compositingProperties.hasNonCo mpositedChild; }
602 void setHasNonCompositedChild(bool b) { m_compositingProperties.hasNonCompo sitedChild = b; } 603 void setHasNonCompositedChild(bool b) { m_compositingProperties.hasNonCompo sitedChild = b; }
603 604
605 bool shouldIsolateCompositedDescendants() const { return m_compositingProper ties.shouldIsolateCompositedDescendants; }
606 void setShouldIsolateCompositedDescendants(bool b) { m_compositingPropertie s.shouldIsolateCompositedDescendants = b; }
607
604 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper ties.compositingReasons = reasons; } 608 void setCompositingReasons(CompositingReasons reasons) { m_compositingProper ties.compositingReasons = reasons; }
605 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; } 609 CompositingReasons compositingReasons() const { return m_compositingProperti es.compositingReasons; }
606 610
607 friend class CompositedLayerMapping; 611 friend class CompositedLayerMapping;
608 friend class RenderLayerCompositor; 612 friend class RenderLayerCompositor;
609 friend class RenderLayerModelObject; 613 friend class RenderLayerModelObject;
610 614
611 protected: 615 protected:
612 unsigned m_isSelfPaintingLayer : 1; 616 unsigned m_isSelfPaintingLayer : 1;
613 617
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 690
687 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i s 0 if we are not paginated. 691 // Pointer to the enclosing RenderLayer that caused us to be paginated. It i s 0 if we are not paginated.
688 RenderLayer* m_enclosingPaginationLayer; 692 RenderLayer* m_enclosingPaginationLayer;
689 693
690 // Properties that are computed while updating compositing layers. These val ues may be dirty/invalid if 694 // Properties that are computed while updating compositing layers. These val ues may be dirty/invalid if
691 // compositing status is not up-to-date before using them. 695 // compositing status is not up-to-date before using them.
692 struct CompositingProperties { 696 struct CompositingProperties {
693 CompositingProperties() 697 CompositingProperties()
694 : hasCompositingDescendant(false) 698 : hasCompositingDescendant(false)
695 , hasNonCompositedChild(false) 699 , hasNonCompositedChild(false)
700 , shouldIsolateCompositedDescendants(false)
696 , viewportConstrainedNotCompositedReason(NoNotCompositedReason) 701 , viewportConstrainedNotCompositedReason(NoNotCompositedReason)
697 , compositingReasons(CompositingReasonNone) 702 , compositingReasons(CompositingReasonNone)
698 { } 703 { }
699 704
700 // Used only while determining what layers should be composited. Applies to the tree of z-order lists. 705 // Used only while determining what layers should be composited. Applies to the tree of z-order lists.
701 bool hasCompositingDescendant : 1; 706 bool hasCompositingDescendant : 1;
702 707
703 // Applies to the real render layer tree (i.e., the tree determined by t he layer's parent and children and 708 // Applies to the real render layer tree (i.e., the tree determined by t he layer's parent and children and
704 // as opposed to the tree formed by the z-order and normal flow lists). 709 // as opposed to the tree formed by the z-order and normal flow lists).
705 bool hasNonCompositedChild : 1; 710 bool hasNonCompositedChild : 1;
706 711
712 // Should be for stacking contexts having unisolated blending descendant s.
713 bool shouldIsolateCompositedDescendants : 1;
714
707 // The reason, if any exists, that a fixed-position layer is chosen not to be composited. 715 // The reason, if any exists, that a fixed-position layer is chosen not to be composited.
708 unsigned viewportConstrainedNotCompositedReason : 2; 716 unsigned viewportConstrainedNotCompositedReason : 2;
709 717
710 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield. 718 // Once computed, indicates all that a layer needs to become composited using the CompositingReasons enum bitfield.
711 CompositingReasons compositingReasons; 719 CompositingReasons compositingReasons;
712 }; 720 };
713 721
714 CompositingProperties m_compositingProperties; 722 CompositingProperties m_compositingProperties;
715 723
716 private: 724 private:
(...skipping 17 matching lines...) Expand all
734 742
735 } // namespace WebCore 743 } // namespace WebCore
736 744
737 #ifndef NDEBUG 745 #ifndef NDEBUG
738 // Outside the WebCore namespace for ease of invocation from gdb. 746 // Outside the WebCore namespace for ease of invocation from gdb.
739 void showLayerTree(const WebCore::RenderLayer*); 747 void showLayerTree(const WebCore::RenderLayer*);
740 void showLayerTree(const WebCore::RenderObject*); 748 void showLayerTree(const WebCore::RenderObject*);
741 #endif 749 #endif
742 750
743 #endif // RenderLayer_h 751 #endif // RenderLayer_h
OLDNEW
« no previous file with comments | « Source/core/rendering/CompositingReasons.h ('k') | Source/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698