Hash :
74b7ec03
Author :
Date :
2023-09-08T14:26:18
GL: Don't use system info for Android SDK queries. It can be queried directly from the system property without fully gathering system info. System info often uses Vulkan which is known to be unstable on some older devices. Bug: chromium:1479277 Change-Id: Ic6ee1d0182b047b0a3210dd1067f6b7250e3da02 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4851775 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SystemInfo_android.cpp: implementation of the Android-specific parts of SystemInfo.h
#include "gpu_info_util/SystemInfo_internal.h"
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <string>
#include "common/android_util.h"
#include "common/angleutils.h"
#include "common/debug.h"
namespace angle
{
bool GetSystemInfo(SystemInfo *info)
{
bool isFullyPopulated = true;
isFullyPopulated = android::GetSystemProperty(android::kManufacturerSystemPropertyName,
&info->machineManufacturer) &&
isFullyPopulated;
isFullyPopulated =
android::GetSystemProperty(android::kModelSystemPropertyName, &info->machineModelName) &&
isFullyPopulated;
std::string androidSdkLevel;
if (android::GetSystemProperty(android::kSDKSystemPropertyName, &androidSdkLevel))
{
info->androidSdkLevel = std::atoi(androidSdkLevel.c_str());
}
else
{
isFullyPopulated = false;
}
return GetSystemInfoVulkan(info) && isFullyPopulated;
}
} // namespace angle