| Differences between
and this patch
- a/Source/WebCore/ChangeLog +15 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2019-08-14  Justin Fan  <justin_fan@apple.com>
2
3
        [WebGPU] Use of WebGPU should not force discrete GPU
4
        https://bugs.webkit.org/show_bug.cgi?id=200740
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Request a low-power device from Metal by default.
9
10
        No change in testable behavior.
11
12
        * platform/graphics/gpu/GPURequestAdapterOptions.h:
13
        * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
14
        (WebCore::GPUDevice::tryCreate):
15
1
2019-08-14  Zalan Bujtas  <zalan@apple.com>
16
2019-08-14  Zalan Bujtas  <zalan@apple.com>
2
17
3
        [ContentChangeObserver] Stop content change observation explicitly.
18
        [ContentChangeObserver] Stop content change observation explicitly.
- a/Source/WebCore/platform/graphics/gpu/GPURequestAdapterOptions.h -1 / +1 lines
Lines 37-43 enum class GPUPowerPreference { a/Source/WebCore/platform/graphics/gpu/GPURequestAdapterOptions.h_sec1
37
};
37
};
38
38
39
struct GPURequestAdapterOptions {
39
struct GPURequestAdapterOptions {
40
    Optional<GPUPowerPreference> powerPreference;
40
    Optional<GPUPowerPreference> powerPreference { GPUPowerPreference::LowPower };
41
};
41
};
42
    
42
    
43
} // namespace WebCore
43
} // namespace WebCore
- a/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm -1 / +1 lines
Lines 58-64 RefPtr<GPUDevice> GPUDevice::tryCreate(const Optional<GPURequestAdapterOptions>& a/Source/WebCore/platform/graphics/gpu/cocoa/GPUDeviceMetal.mm_sec1
58
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
58
    BEGIN_BLOCK_OBJC_EXCEPTIONS;
59
    
59
    
60
#if PLATFORM(MAC)
60
#if PLATFORM(MAC)
61
    if (options && options->powerPreference == GPUPowerPreference::LowPower) {
61
    if (!options || !options->powerPreference || options->powerPreference == GPUPowerPreference::LowPower) {
62
        auto devices = adoptNS(MTLCopyAllDevices());
62
        auto devices = adoptNS(MTLCopyAllDevices());
63
        
63
        
64
        for (id <MTLDevice> device : devices.get()) {
64
        for (id <MTLDevice> device : devices.get()) {

Return to Bug 200740