refactor: rename the atom directory to shell
This commit is contained in:
parent
4575a4aae3
commit
d7f07e8a80
631 changed files with 0 additions and 0 deletions
60
shell/browser/api/gpu_info_enumerator.h
Normal file
60
shell/browser/api/gpu_info_enumerator.h
Normal file
|
@ -0,0 +1,60 @@
|
|||
// Copyright (c) 2018 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_API_GPU_INFO_ENUMERATOR_H_
|
||||
#define ATOM_BROWSER_API_GPU_INFO_ENUMERATOR_H_
|
||||
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
|
||||
#include "base/values.h"
|
||||
#include "gpu/config/gpu_info.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
// This class implements the enumerator for reading all the attributes in
|
||||
// GPUInfo into a dictionary.
|
||||
class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator {
|
||||
const char* kGPUDeviceKey = "gpuDevice";
|
||||
const char* kVideoDecodeAcceleratorSupportedProfileKey =
|
||||
"videoDecodeAcceleratorSupportedProfile";
|
||||
const char* kVideoEncodeAcceleratorSupportedProfileKey =
|
||||
"videoEncodeAcceleratorSupportedProfile";
|
||||
const char* kImageDecodeAcceleratorSupportedProfileKey =
|
||||
"imageDecodeAcceleratorSupportedProfile";
|
||||
const char* kAuxAttributesKey = "auxAttributes";
|
||||
const char* kDx12VulkanVersionInfoKey = "dx12VulkanVersionInfo";
|
||||
|
||||
public:
|
||||
GPUInfoEnumerator();
|
||||
~GPUInfoEnumerator() override;
|
||||
void AddInt64(const char* name, int64_t value) override;
|
||||
void AddInt(const char* name, int value) override;
|
||||
void AddString(const char* name, const std::string& value) override;
|
||||
void AddBool(const char* name, bool value) override;
|
||||
void AddTimeDeltaInSecondsF(const char* name,
|
||||
const base::TimeDelta& value) override;
|
||||
void BeginGPUDevice() override;
|
||||
void EndGPUDevice() override;
|
||||
void BeginVideoDecodeAcceleratorSupportedProfile() override;
|
||||
void EndVideoDecodeAcceleratorSupportedProfile() override;
|
||||
void BeginVideoEncodeAcceleratorSupportedProfile() override;
|
||||
void EndVideoEncodeAcceleratorSupportedProfile() override;
|
||||
void BeginImageDecodeAcceleratorSupportedProfile() override;
|
||||
void EndImageDecodeAcceleratorSupportedProfile() override;
|
||||
void BeginAuxAttributes() override;
|
||||
void EndAuxAttributes() override;
|
||||
void BeginDx12VulkanVersionInfo() override;
|
||||
void EndDx12VulkanVersionInfo() override;
|
||||
std::unique_ptr<base::DictionaryValue> GetDictionary();
|
||||
|
||||
private:
|
||||
// The stack is used to manage nested values
|
||||
std::stack<std::unique_ptr<base::DictionaryValue>> value_stack;
|
||||
std::unique_ptr<base::DictionaryValue> current;
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
#endif // ATOM_BROWSER_API_GPU_INFO_ENUMERATOR_H_
|
Loading…
Add table
Add a link
Reference in a new issue