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
TextureMapper: mask should be applied after filter is applied
https://bugs.webkit.org/show_bug.cgi?id=241772 Reviewed by Don Olmstead. If an element has both a mask-image and filters, the mask should be applied after the filters. BitmapTextureGL::applyFilters didn't actually apply the last filter. It stored the last filter information in it, and applied the last filter when blitting onto the target. If the element has a mask, applyFilters should apply all filters before applying the mask. * LayoutTests/compositing/masks/mask-and-drop-shadow-expected.html: Added. * LayoutTests/compositing/masks/mask-and-drop-shadow.html: Added. * Source/WebCore/platform/graphics/texmap/BitmapTexture.h: (WebCore::BitmapTexture::applyFilters): * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::applyFilters): * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h: * Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp: (WebCore::TextureMapperLayer::computeOverlapRegions): (WebCore::TextureMapperLayer::paintIntoSurface): Canonical link: https://commits.webkit.org/251722@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
48 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
div { | ||
width: 200px; | ||
height: 200px; | ||
background: green; | ||
will-change: transform; | ||
position: absolute; | ||
-webkit-mask-image: linear-gradient(45deg, black, transparent); | ||
} | ||
</style> | ||
|
||
You should see no red. | ||
|
||
<div></div> |
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,16 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
div { | ||
width: 200px; | ||
height: 200px; | ||
background: green; | ||
filter: drop-shadow(50px 50px 0px red); | ||
will-change: transform; | ||
position: absolute; | ||
-webkit-mask-image: linear-gradient(45deg, black, transparent); | ||
} | ||
</style> | ||
|
||
You should see no red. | ||
|
||
<div></div> |
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