Hash :
34cbc544
Author :
Date :
2019-04-05T11:30:10
Use ANGLE's gpu_info_util libraries for test expectations 3. Remove gpu_info.h and gpu_info.cc and use ANGLE's own gpu_info_util to to gather device info instead. - Support collecting info for and parsing expectations of specific Android devices such as Nexus 5X and Pixel 2. - Change parser behavior to more closely follow: bit.ly/chromium-test-list-format Bug: angleproject:2677 Change-Id: I4c0b9342142b718e884484a6bcaac2dff3ac575a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1553822 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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
//
// Copyright 2019 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.
//
// GPUTestConfig_mac.mm:
// Helper functions for GPUTestConfig that have to be compiled in ObjectiveC++
#include "GPUTestConfig_mac.h"
#import <Cocoa/Cocoa.h>
// OSX 10.8 deprecates Gestalt but doesn't make the operatingSystemVersion property part of the
// public interface of NSProcessInfo until 10.10. Add a forward declaration.
#if !defined(MAC_OS_X_VERSION_10_10) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10
@interface NSProcessInfo (YosemiteSDK)
@property(readonly) NSOperatingSystemVersion operatingSystemVersion;
@end
#endif
namespace angle
{
void GetOperatingSystemVersionNumbers(int32_t *majorVersion, int32_t *minorVersion)
{
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
Gestalt(gestaltSystemVersionMajor, reinterpret_cast<SInt32 *>(majorVersion));
Gestalt(gestaltSystemVersionMinor, reinterpret_cast<SInt32 *>(minorVersion));
#else
if (@available(macOS 10.10, *))
{
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
*majorVersion = version.majorVersion;
*minorVersion = version.minorVersion;
}
else
{
// This can only happen on 10.9
*majorVersion = 10;
*minorVersion = 9;
}
#endif
}
} // namespace angle