diff --git a/atom/browser/api/gpu_info_enumerator.cc b/atom/browser/api/gpu_info_enumerator.cc index c6d0288f0e51..ab5ba41d25dd 100644 --- a/atom/browser/api/gpu_info_enumerator.cc +++ b/atom/browser/api/gpu_info_enumerator.cc @@ -83,6 +83,19 @@ void GPUInfoEnumerator::EndVideoEncodeAcceleratorSupportedProfile() { value_stack.pop(); } +void GPUInfoEnumerator::BeginImageDecodeAcceleratorSupportedProfile() { + value_stack.push(std::move(current)); + current = std::make_unique(); +} + +void GPUInfoEnumerator::EndImageDecodeAcceleratorSupportedProfile() { + auto& top_value = value_stack.top(); + top_value->SetDictionary(kImageDecodeAcceleratorSupportedProfileKey, + std::move(current)); + current = std::move(top_value); + value_stack.pop(); +} + void GPUInfoEnumerator::BeginAuxAttributes() { value_stack.push(std::move(current)); current = std::make_unique(); diff --git a/atom/browser/api/gpu_info_enumerator.h b/atom/browser/api/gpu_info_enumerator.h index 9d7655a30299..645815a2d0c7 100644 --- a/atom/browser/api/gpu_info_enumerator.h +++ b/atom/browser/api/gpu_info_enumerator.h @@ -22,6 +22,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { "videoDecodeAcceleratorSupportedProfile"; const char* kVideoEncodeAcceleratorSupportedProfileKey = "videoEncodeAcceleratorSupportedProfile"; + const char* kImageDecodeAcceleratorSupportedProfileKey = + "imageDecodeAcceleratorSupportedProfile"; const char* kAuxAttributesKey = "auxAttributes"; const char* kOverlayCapabilityKey = "overlayCapability"; const char* kDx12VulkanVersionInfoKey = "dx12VulkanVersionInfo"; @@ -41,6 +43,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { void EndVideoDecodeAcceleratorSupportedProfile() override; void BeginVideoEncodeAcceleratorSupportedProfile() override; void EndVideoEncodeAcceleratorSupportedProfile() override; + void BeginImageDecodeAcceleratorSupportedProfile() override; + void EndImageDecodeAcceleratorSupportedProfile() override; void BeginAuxAttributes() override; void EndAuxAttributes() override; void BeginOverlayCapability() override;