Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[CSS Blending] Compositing requirements for blending are not computed…
… correctly https://bugs.webkit.org/show_bug.cgi?id=130664 Patch by Ion Rosca <rosca@adobe.com> on 2014-04-02 Reviewed by Dean Jackson. Source/WebCore: Tests: css3/compositing/blend-mode-accelerated-with-multiple-stacking-contexts.html css3/compositing/blend-mode-with-accelerated-sibling.html Compositing requirements for blending: if a layer having blend mode other than normal is composited for any reason, its closest stacking context ancestor should be composited as well. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): * rendering/RenderLayer.h: added a new field, m_hasUnisolatedCompositedBlendingDescendants, which is true if the layer has composited blending descendants not isolated by any stacking context child; added a new method: isolatesCompositedBlending(), which is true if we should accelerate that layer in order to perform isolation correctly. * rendering/RenderLayerCompositor.cpp: (WebCore::CompositingState::CompositingState): m_subtreeHasBlending was renamed m_hasUnisolatedCompositedBlendingDescendants in order to be more self-explanatory. (WebCore::RenderLayerCompositor::computeCompositingRequirements): computes the isolation requirements for composited blending by (re)setting RenderLayer::m_hasUnisolatedCompositedBlendingDescendants flag. (WebCore::RenderLayerCompositor::reasonsForCompositing): fixed the reason of compositing: isolation instead of blending. (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): * rendering/RenderLayerCompositor.h: LayoutTests: * css3/compositing/blend-mode-accelerated-with-multiple-stacking-contexts-expected.txt: Added. * css3/compositing/blend-mode-accelerated-with-multiple-stacking-contexts.html: Added. * css3/compositing/blend-mode-with-accelerated-sibling-expected.txt: Added. * css3/compositing/blend-mode-with-accelerated-sibling.html: Added. Canonical link: https://commits.webkit.org/149138@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
760eb76
commit 0c2ccf6e282bece98ac254cfa6dc988449e6f411
Showing
10 changed files
with
197 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(GraphicsLayer | ||
(bounds 800.00 600.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 800.00 600.00) | ||
(contentsOpaque 1) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 8.00 8.00) | ||
(bounds 784.00 10.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 10.00 10.00) | ||
(blendMode multiply) | ||
(contentsOpaque 1) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE HTML> | ||
<!-- This test will check that only the direct parent of blending element gets accelerated --> | ||
<style> | ||
.accelerated { | ||
-webkit-transform: rotateX(0deg); | ||
} | ||
.blended { | ||
-webkit-mix-blend-mode: multiply; | ||
} | ||
.child { | ||
width: 10px; | ||
height: 10px; | ||
background-color: green; | ||
} | ||
.parent { | ||
-webkit-isolation: isolate; | ||
} | ||
</style> | ||
|
||
<div class="parent"> | ||
<div class="parent"> | ||
<div class="accelerated blended child"></div> | ||
</div> | ||
</div> | ||
<pre id="layerTree"></pre> | ||
<script> | ||
if (window.testRunner) | ||
window.testRunner.dumpAsText(); | ||
|
||
var text = document.getElementById("layerTree"); | ||
text.innerHTML = window.internals.layerTreeAsText(document); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
(GraphicsLayer | ||
(bounds 800.00 600.00) | ||
(children 1 | ||
(GraphicsLayer | ||
(bounds 800.00 600.00) | ||
(contentsOpaque 1) | ||
(children 1 | ||
(GraphicsLayer | ||
(position 8.00 8.00) | ||
(bounds 10.00 10.00) | ||
(contentsOpaque 1) | ||
) | ||
) | ||
) | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE HTML> | ||
<!-- This test will check that parent is not accelerated when it has non-accelerated blended children --> | ||
<style> | ||
.accelerated { | ||
-webkit-transform: rotateX(0deg); | ||
} | ||
.blended { | ||
-webkit-mix-blend-mode: multiply; | ||
} | ||
.child { | ||
width: 10px; | ||
height: 10px; | ||
background-color: green; | ||
} | ||
.parent { | ||
-webkit-isolation: isolate; | ||
} | ||
</style> | ||
|
||
<div class="parent"> | ||
<div class="accelerated child"></div> | ||
<div class="blended child"></div> | ||
</div> | ||
<pre id="layerTree"></pre> | ||
<script> | ||
if (window.testRunner) | ||
window.testRunner.dumpAsText(); | ||
|
||
var text = document.getElementById("layerTree"); | ||
text.innerHTML = window.internals.layerTreeAsText(document); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters