Commit e2c201c
committed
Cherry-pick 276876@main (5e49350). https://bugs.webkit.org/show_bug.cgi?id=271653
[WPE] Holepunch doesn't work when the video element has rounded corners
https://bugs.webkit.org/show_bug.cgi?id=271653
Reviewed by Carlos Garcia Campos.
Modify the rounded rectangle clipping in the TextureMapper so it can work
when blending is disabled. To do this, the fragments that are out of rounded
rectangle are discarded by the fragment shader, instead of painting them
transparent.
When blending is enabled, we can do some antialiasing of the pixels on the
rounded corners by reducing their opacity depending on how much they are
inside the rect.
When blending is disabled we can't do antialiasing of the rounded corners,
so the visual result is a bit worse. The good thing is that blending is
only disabled when we're rendering a holepunch buffer, so it's not a big
problem.
* Source/WebCore/platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::drawSolidColor):
* Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:
Canonical link: https://commits.webkit.org/276876@main1 parent e32bce9 commit e2c201c
2 files changed
Lines changed: 21 additions & 4 deletions
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
| 715 | + | |
716 | 716 | | |
717 | | - | |
| 717 | + | |
| 718 | + | |
718 | 719 | | |
719 | 720 | | |
720 | 721 | | |
721 | 722 | | |
722 | 723 | | |
723 | | - | |
| 724 | + | |
724 | 725 | | |
725 | 726 | | |
726 | 727 | | |
| |||
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
478 | 494 | | |
479 | 495 | | |
480 | 496 | | |
| |||
0 commit comments