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

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, 3 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 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 if (layer->isRootLayer() 1579 if (layer->isRootLayer()
1580 || layer->transform() // note: excludes perspective and transformStyle3D . 1580 || layer->transform() // note: excludes perspective and transformStyle3D .
1581 || requiresCompositingForVideo(renderer) 1581 || requiresCompositingForVideo(renderer)
1582 || requiresCompositingForCanvas(renderer) 1582 || requiresCompositingForCanvas(renderer)
1583 || requiresCompositingForPlugin(renderer) 1583 || requiresCompositingForPlugin(renderer)
1584 || requiresCompositingForFrame(renderer) 1584 || requiresCompositingForFrame(renderer)
1585 || requiresCompositingForBackfaceVisibilityHidden(renderer) 1585 || requiresCompositingForBackfaceVisibilityHidden(renderer)
1586 || requiresCompositingForAnimation(renderer) 1586 || requiresCompositingForAnimation(renderer)
1587 || requiresCompositingForTransition(renderer) 1587 || requiresCompositingForTransition(renderer)
1588 || requiresCompositingForFilters(renderer) 1588 || requiresCompositingForFilters(renderer)
1589 || requiresCompositingForBlending(renderer)
1590 || requiresCompositingForPosition(renderer, layer) 1589 || requiresCompositingForPosition(renderer, layer)
1591 || requiresCompositingForOverflowScrolling(layer) 1590 || requiresCompositingForOverflowScrolling(layer)
1592 || requiresCompositingForOverflowScrollingParent(layer) 1591 || requiresCompositingForOverflowScrollingParent(layer)
1593 || requiresCompositingForOutOfFlowClipping(layer) 1592 || requiresCompositingForOutOfFlowClipping(layer)
1594 || renderer->isTransparent() 1593 || renderer->isTransparent()
1595 || renderer->hasMask() 1594 || renderer->hasMask()
1596 || renderer->hasReflection() 1595 || renderer->hasReflection()
1597 || renderer->hasFilter()) 1596 || renderer->hasFilter())
1598 return true; 1597 return true;
1599 1598
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 1637
1639 if (requiresCompositingForFilters(renderer)) 1638 if (requiresCompositingForFilters(renderer))
1640 directReasons |= CompositingReasonFilters; 1639 directReasons |= CompositingReasonFilters;
1641 1640
1642 if (requiresCompositingForPosition(renderer, layer)) 1641 if (requiresCompositingForPosition(renderer, layer))
1643 directReasons |= renderer->style()->position() == FixedPosition ? Compos itingReasonPositionFixed : CompositingReasonPositionSticky; 1642 directReasons |= renderer->style()->position() == FixedPosition ? Compos itingReasonPositionFixed : CompositingReasonPositionSticky;
1644 1643
1645 if (requiresCompositingForOverflowScrolling(layer)) 1644 if (requiresCompositingForOverflowScrolling(layer))
1646 directReasons |= CompositingReasonOverflowScrollingTouch; 1645 directReasons |= CompositingReasonOverflowScrollingTouch;
1647 1646
1648 if (requiresCompositingForBlending(renderer))
1649 directReasons |= CompositingReasonBlending;
1650
1651 if (requiresCompositingForOverflowScrollingParent(layer)) 1647 if (requiresCompositingForOverflowScrollingParent(layer))
1652 directReasons |= CompositingReasonOverflowScrollingParent; 1648 directReasons |= CompositingReasonOverflowScrollingParent;
1653 1649
1654 if (requiresCompositingForOutOfFlowClipping(layer)) 1650 if (requiresCompositingForOutOfFlowClipping(layer))
1655 directReasons |= CompositingReasonOutOfFlowClipping; 1651 directReasons |= CompositingReasonOutOfFlowClipping;
1656 1652
1657 return directReasons; 1653 return directReasons;
1658 } 1654 }
1659 1655
1660 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye r* layer) const 1656 CompositingReasons RenderLayerCompositor::reasonsForCompositing(const RenderLaye r* layer) const
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 } 1959 }
1964 1960
1965 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer ) const 1961 bool RenderLayerCompositor::requiresCompositingForFilters(RenderObject* renderer ) const
1966 { 1962 {
1967 if (!(m_compositingTriggers & ChromeClient::FilterTrigger)) 1963 if (!(m_compositingTriggers & ChromeClient::FilterTrigger))
1968 return false; 1964 return false;
1969 1965
1970 return renderer->hasFilter(); 1966 return renderer->hasFilter();
1971 } 1967 }
1972 1968
1973 bool RenderLayerCompositor::requiresCompositingForBlending(RenderObject* rendere r) const
1974 {
1975 return renderer->hasBlendMode();
1976 }
1977
1978 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const RenderLayer* layer) const 1969 bool RenderLayerCompositor::requiresCompositingForOverflowScrollingParent(const RenderLayer* layer) const
1979 { 1970 {
1980 if (!layer->compositorDrivenAcceleratedScrollingEnabled()) 1971 if (!layer->compositorDrivenAcceleratedScrollingEnabled())
1981 return false; 1972 return false;
1982 1973
1983 // A layer scrolls with its containing block. So to find the overflow scroll ing layer 1974 // A layer scrolls with its containing block. So to find the overflow scroll ing layer
1984 // that we scroll with respect to, we must ascend the layer tree until we re ach the 1975 // that we scroll with respect to, we must ascend the layer tree until we re ach the
1985 // first overflow scrolling div at or above our containing block. I will ref er to this 1976 // first overflow scrolling div at or above our containing block. I will ref er to this
1986 // layer as our 'scrolling ancestor'. 1977 // layer as our 'scrolling ancestor'.
1987 // 1978 //
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 } else if (graphicsLayer == m_scrollLayer.get()) { 2725 } else if (graphicsLayer == m_scrollLayer.get()) {
2735 name = "Frame Scrolling Layer"; 2726 name = "Frame Scrolling Layer";
2736 } else { 2727 } else {
2737 ASSERT_NOT_REACHED(); 2728 ASSERT_NOT_REACHED();
2738 } 2729 }
2739 2730
2740 return name; 2731 return name;
2741 } 2732 }
2742 2733
2743 } // namespace WebCore 2734 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698