Bug 232555 - [WinCairo] Enable gpu_process_canvas_rendering and gpu_process_webgl by default
Summary: [WinCairo] Enable gpu_process_canvas_rendering and gpu_process_webgl by default
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-31 22:34 PDT by Fujii Hironori
Modified: 2021-11-01 15:09 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.95 KB, patch)
2021-10-31 22:38 PDT, 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-10-31 22:34:13 PDT
[WinCairo] Enable gpu_process_canvas_rendering and gpu_process_webgl by default
Comment 1 Fujii Hironori 2021-10-31 22:38:37 PDT
Created attachment 442959 [details]
Patch
Comment 2 Don Olmstead 2021-11-01 12:36:56 PDT
Comment on attachment 442959 [details]
Patch

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

Think there's a better way to address this.

As an aside it would be nice to be able to set these registry values through the MiniBrowser.

> Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:164
> -#if ENABLE(GPU_PROCESS_BY_DEFAULT)
> +#if ENABLE(GPU_PROCESS_BY_DEFAULT) || PLATFORM(WIN)

Can't we just add `ENABLE_GPU_PROCESS_BY_DEFAULT` in the CMake code?

> Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:196
> -    return isFeatureFlagEnabled("gpu_process_webgl", false);
> +#if PLATFORM(WIN)
> +    bool defaultValue = true;
> +#else
> +    bool defaultValue = false;
> +#endif
> +    return isFeatureFlagEnabled("gpu_process_webgl", defaultValue);

Couldn't this be written in terms of `ENABLE(GPU_PROCESS_BY_DEFAULT)`?

Maybe need to ask the Apple folks if this is ok.

> Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp:46
> -        return false;
> +        return defaultValue;
>      if (keyType != REG_DWORD)
> -        return false;
> +        return defaultValue;
>      if (dataSize != sizeof data)
> -        return false;
> +        return defaultValue;

Whoops! This is a good catch here.
Comment 3 Simon Fraser (smfr) 2021-11-01 12:56:40 PDT
Comment on attachment 442959 [details]
Patch

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

>> Source/WebKit/Shared/WebPreferencesDefaultValues.cpp:196
>> +    return isFeatureFlagEnabled("gpu_process_webgl", defaultValue);
> 
> Couldn't this be written in terms of `ENABLE(GPU_PROCESS_BY_DEFAULT)`?
> 
> Maybe need to ask the Apple folks if this is ok.

I don't think we want the default to be true if ENABLE(GPU_PROCESS_BY_DEFAULT) is defined. We switch WebGL independently from the other GPU Process things.
Comment 4 Don Olmstead 2021-11-01 13:07:10 PDT
Comment on attachment 442959 [details]
Patch

After getting more info on what Apple is up to with that ENABLE_GPU_PROCESS_BY_DEFAULT I agree that wee should just use PLATFORM(WIN) here. Changing my review
Comment 5 EWS 2021-11-01 13:32:58 PDT
Committed r285127 (243766@main): <https://commits.webkit.org/243766@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442959 [details].
Comment 6 Radar WebKit Bug Importer 2021-11-01 13:33:37 PDT
<rdar://problem/84896922>
Comment 7 Fujii Hironori 2021-11-01 13:35:48 PDT
Thank you for the review.

(In reply to Don Olmstead from comment #2)
> As an aside it would be nice to be able to set these registry values through
> the MiniBrowser.

I'd like to remove WinCairo WK2 non-GPU process mode support.
WinCairo supports WK1 that supports only non-GPU process mode.
Comment 8 Don Olmstead 2021-11-01 15:09:20 PDT
(In reply to Fujii Hironori from comment #7)
> Thank you for the review.
> 
> (In reply to Don Olmstead from comment #2)
> > As an aside it would be nice to be able to set these registry values through
> > the MiniBrowser.
> 
> I'd like to remove WinCairo WK2 non-GPU process mode support.
> WinCairo supports WK1 that supports only non-GPU process mode.

Agreed to removing non-GPU Process mode support.

The comment was not just about GPU Process feature flags it was about not having a good way to set any feature flags in MiniBrowser.