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

Side by Side Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 23503046: [CSS Blending] Implement mix-blend-mode in software. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 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 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 if (layer->isRootLayer() 1650 if (layer->isRootLayer()
1651 || layer->transform() // note: excludes perspective and transformStyle3D . 1651 || layer->transform() // note: excludes perspective and transformStyle3D .
1652 || requiresCompositingForVideo(renderer) 1652 || requiresCompositingForVideo(renderer)
1653 || requiresCompositingForCanvas(renderer) 1653 || requiresCompositingForCanvas(renderer)
1654 || requiresCompositingForPlugin(renderer) 1654 || requiresCompositingForPlugin(renderer)
1655 || requiresCompositingForFrame(renderer) 1655 || requiresCompositingForFrame(renderer)
1656 || requiresCompositingForBackfaceVisibilityHidden(renderer) 1656 || requiresCompositingForBackfaceVisibilityHidden(renderer)
1657 || requiresCompositingForAnimation(renderer) 1657 || requiresCompositingForAnimation(renderer)
1658 || requiresCompositingForTransition(renderer) 1658 || requiresCompositingForTransition(renderer)
1659 || requiresCompositingForFilters(renderer) 1659 || requiresCompositingForFilters(renderer)
1660 || requiresCompositingForBlending(renderer)
1661 || requiresCompositingForPosition(renderer, layer) 1660 || requiresCompositingForPosition(renderer, layer)
1662 || requiresCompositingForOverflowScrolling(layer) 1661 || requiresCompositingForOverflowScrolling(layer)
1663 || requiresCompositingForOverflowScrollingParent(layer) 1662 || requiresCompositingForOverflowScrollingParent(layer)
1664 || requiresCompositingForOutOfFlowClipping(layer) 1663 || requiresCompositingForOutOfFlowClipping(layer)
1665 || renderer->isTransparent() 1664 || renderer->isTransparent()
1666 || renderer->hasMask() 1665 || renderer->hasMask()
1667 || renderer->hasReflection() 1666 || renderer->hasReflection()
1668 || renderer->hasFilter()) 1667 || renderer->hasFilter())
1669 return true; 1668 return true;
1670 1669
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1708
1710 if (requiresCompositingForFilters(renderer)) 1709 if (requiresCompositingForFilters(renderer))
1711 directReasons |= CompositingReasonFilters; 1710 directReasons |= CompositingReasonFilters;
1712 1711
1713 if (requiresCompositingForPosition(renderer, layer)) 1712 if (requiresCompositingForPosition(renderer, layer))
1714 directReasons |= renderer->style()->position() == FixedPosition ? Compos itingReasonPositionFixed : CompositingReasonPositionSticky; 1713 directReasons |= renderer->style()->position() == FixedPosition ? Compos itingReasonPositionFixed : CompositingReasonPositionSticky;
1715 1714
1716 if (requiresCompositingForOverflowScrolling(layer)) 1715 if (requiresCompositingForOverflowScrolling(layer))
1717 directReasons |= CompositingReasonOverflowScrollingTouch; 1716 directReasons |= CompositingReasonOverflowScrollingTouch;
1718 1717
1719 if (requiresCompositingForBlending(renderer))
1720 directReasons |= CompositingReasonBlending;
1721
1722 if (requiresCompositingForOverflowScrollingParent(layer)) 1718 if (requiresCompositingForOverflowScrollingParent(layer))
1723 directReasons |= CompositingReasonOverflowScrollingParent; 1719 directReasons |= CompositingReasonOverflowScrollingParent;
1724 1720
1725 if (requiresCompositingForOutOfFlowClipping(layer)) 1721 if (requiresCompositingForOutOfFlowClipping(layer))
1726 directReasons |= CompositingReasonOutOfFlowClipping; 1722 directReasons |= CompositingReasonOutOfFlowClipping;
1727 1723
1728 return directReasons; 1724 return directReasons;
1729 } 1725 }
1730 1726
1731 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye r* layer) const 1727 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye r* layer) const
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 } 2036 }
2041 2037
2042 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer ) const 2038 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer ) const
2043 { 2039 {
2044 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) 2040 if (!(m_compositingTriggers & ChromeClient::FilterTrigger))
2045 return false; 2041 return false;
2046 2042
2047 return renderer->hasFilter(); 2043 return renderer->hasFilter();
2048 } 2044 }
2049 2045
2050 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere r) const
2051 {
2052 return renderer->hasBlendMode();
2053 }
2054
2055 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const RenderLayer* layer) const 2046 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const RenderLayer* layer) const
2056 { 2047 {
2057 return !!layer->scrollParent(); 2048 return !!layer->scrollParent();
2058 } 2049 }
2059 2050
2060 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render Layer* layer) const 2051 bool RenderLayerCompositor::requiresCompositingForOutOfFlowClipping(const Render Layer* layer) const
2061 { 2052 {
2062 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl ippedDescendant(); 2053 return layer->compositorDrivenAcceleratedScrollingEnabled() && layer->isUncl ippedDescendant();
2063 } 2054 }
2064 2055
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 } else if (graphicsLayer == m_scrollLayer.get()) { 2778 } else if (graphicsLayer == m_scrollLayer.get()) {
2788 name = "Frame Scrolling Layer"; 2779 name = "Frame Scrolling Layer";
2789 } else { 2780 } else {
2790 ASSERT_NOT_REACHED(); 2781 ASSERT_NOT_REACHED();
2791 } 2782 }
2792 2783
2793 return name; 2784 return name;
2794 } 2785 }
2795 2786
2796 } // namespace WebCore 2787 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698