Bug 233244 - [TextureMapper][GraphicsLayerTextureMapper][GraphicsLayerWC] setBackgroundColor support
Summary: [TextureMapper][GraphicsLayerTextureMapper][GraphicsLayerWC] setBackgroundCol...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Compositing (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-16 23:57 PST by Fujii Hironori
Modified: 2022-01-12 13:51 PST (History)
12 users (show)

See Also:


Attachments
Patch (19.06 KB, patch)
2021-11-17 00:03 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (19.55 KB, patch)
2021-11-17 23:41 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2021-11-16 23:57:47 PST
[TextureMapper][GraphicsLayerTextureMapper][GraphicsLayerWC] setBackgroundColor support

TextureMapper, GraphicsLayerTextureMapper and GraphicsLayerWC don't support setBackgroundColor now.
setBackgroundColor is used for "painting flush" of Web Inspector Elements tab.

1. Start WinCairo MiniBrowser
2. Open Web Inspector
3. Push "Enable painting flush" brush icon button
4. Browsing some web sites

No repaint rect is painted with semi-transparent red.
Comment 1 Fujii Hironori 2021-11-17 00:03:39 PST
Created attachment 444488 [details]
Patch
Comment 2 Don Olmstead 2021-11-17 14:30:01 PST
Comment on attachment 444488 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444488&action=review

> Source/WebCore/platform/graphics/texmap/TextureMapperSolidColorLayer.h:36
> +    static Color blendWithOpacity(const Color& color, float opacity)

This seems more like a utility method for Color. Anything like this already exist?
Comment 3 Carlos Alberto Lopez Perez 2021-11-17 16:25:39 PST
Comment on attachment 444488 [details]
Patch

This patch causes 161 unexpected failures on GTK.

This was reported by the GTK EWS Layout Test bot (still not public, is in testing phase)

I tested it locally and I confirm the failures are new.

Results here: https://people.igalia.com/clopez/wkbug/233244/layout-test-results/results.html
Comment 4 Fujii Hironori 2021-11-17 16:39:16 PST
(In reply to Carlos Alberto Lopez Perez from comment #3)

Thank you very much! I will test it and fix.
Comment 5 Fujii Hironori 2021-11-17 16:49:06 PST
Comment on attachment 444488 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444488&action=review

>> Source/WebCore/platform/graphics/texmap/TextureMapperSolidColorLayer.h:36
>> +    static Color blendWithOpacity(const Color& color, float opacity)
> 
> This seems more like a utility method for Color. Anything like this already exist?

Color::colorWithAlphaMultipliedBy is the one.
By grepping WebKit source with colorWithAlphaMultipliedBy, some code use colorWithAlphaMultipliedBy directly.
I think this color calculation for solid color layers isn't performance critical.
I think we can simply use Color::colorWithAlphaMultipliedBy here. Will fix.
Comment 6 Fujii Hironori 2021-11-17 23:41:27 PST
Created attachment 444643 [details]
Patch
Comment 7 Carlos Alberto Lopez Perez 2021-11-18 08:20:28 PST
(In reply to Fujii Hironori from comment #6)
> Created attachment 444643 [details]
> Patch

This last version of the patch passed just fine on the beta GTK EWS. Thanks!
Comment 8 Fujii Hironori 2021-11-18 22:26:59 PST
Comment on attachment 444643 [details]
Patch

Clearing flags on attachment: 444643

Committed r286046 (244433@main): <https://commits.webkit.org/244433@main>
Comment 9 Fujii Hironori 2021-11-18 22:27:04 PST
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2021-11-18 22:28:22 PST
<rdar://problem/85587165>
Comment 11 Fujii Hironori 2022-01-12 13:51:23 PST
It introduced a bug.
Filed: Bug 235152 – [WinCairo] REGRESSION(r286046): WebInspector doesn't render element highlight