diff --git a/atom/browser/api/gpu_info_enumerator.cc b/atom/browser/api/gpu_info_enumerator.cc index c34152a813c5..d3bd9247f725 100644 --- a/atom/browser/api/gpu_info_enumerator.cc +++ b/atom/browser/api/gpu_info_enumerator.cc @@ -95,6 +95,18 @@ void GPUInfoEnumerator::EndAuxAttributes() { value_stack.pop(); } +void GPUInfoEnumerator::BeginOverlayCapability() { + value_stack.push(std::move(current)); + current = std::make_unique(); +} + +void GPUInfoEnumerator::EndOverlayCapability() { + auto& top_value = value_stack.top(); + top_value->SetDictionary(kOverlayCapabilityKey, std::move(current)); + current = std::move(top_value); + value_stack.pop(); +} + std::unique_ptr GPUInfoEnumerator::GetDictionary() { return std::move(current); } diff --git a/atom/browser/api/gpu_info_enumerator.h b/atom/browser/api/gpu_info_enumerator.h index c4d80fa8d3b3..b0ab7a9212a4 100644 --- a/atom/browser/api/gpu_info_enumerator.h +++ b/atom/browser/api/gpu_info_enumerator.h @@ -23,6 +23,7 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { const char* kVideoEncodeAcceleratorSupportedProfileKey = "videoEncodeAcceleratorSupportedProfile"; const char* kAuxAttributesKey = "auxAttributes"; + const char* kOverlayCapabilityKey = "overlayCapability"; public: GPUInfoEnumerator(); @@ -41,6 +42,8 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { void EndVideoEncodeAcceleratorSupportedProfile() override; void BeginAuxAttributes() override; void EndAuxAttributes() override; + void BeginOverlayCapability() override; + void EndOverlayCapability() override; std::unique_ptr GetDictionary(); private: