Edit

kc3-lang/angle/src/common/apple_platform_utils.h

Branch :

  • Show log

    Commit

  • Author : Le Quyen
    Date : 2019-10-29 18:38:53
    Hash : fe26bae4
    Message : Metal backend implementation pt 2 This is without Metal specific shader translator implemented yet. Bug: angleproject:2634 Change-Id: I95d589442251c9ba111bd05a2dc379a36739046c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1855069 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>

  • src/common/apple_platform_utils.h
  • //
    // 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.
    //
    
    // apple_platform_utils.h: Common utilities for Apple platforms.
    
    #ifndef COMMON_APPLE_PLATFORM_UTILS_H_
    #define COMMON_APPLE_PLATFORM_UTILS_H_
    
    #include <TargetConditionals.h>
    
    // These are macros for substitution of Apple specific directive @available:
    
    // TARGET_OS_MACCATALYST only available in MacSDK 10.15
    
    // ANGLE_APPLE_AVAILABLE_XCI: check if either of the 3 platforms (OSX/Catalyst/iOS) min verions is
    // available:
    #if TARGET_OS_MACCATALYST
    #    define ANGLE_APPLE_AVAILABLE_XCI(macVer, macCatalystVer, iOSVer) \
            @available(macOS macVer, macCatalyst macCatalystVer, iOS iOSVer, *)
    // ANGLE_APPLE_AVAILABLE_XC: check if either of the 2 platforms (OSX/Catalyst) min verions is
    // available:
    #    define ANGLE_APPLE_AVAILABLE_XC(macVer, macCatalystVer) \
            @available(macOS macVer, macCatalyst macCatalystVer, *)
    #else
    #    define ANGLE_APPLE_AVAILABLE_XCI(macVer, macCatalystVer, iOSVer) \
            ANGLE_APPLE_AVAILABLE_XI(macVer, iOSVer)
    // ANGLE_APPLE_AVAILABLE_XC: check if either of the 2 platforms (OSX/Catalyst) min verions is
    // available:
    #    define ANGLE_APPLE_AVAILABLE_XC(macVer, macCatalystVer) @available(macOS macVer, *)
    #endif
    
    // ANGLE_APPLE_AVAILABLE_XI: check if either of the 2 platforms (OSX/iOS) min verions is available:
    #define ANGLE_APPLE_AVAILABLE_XI(macVer, iOSVer) @available(macOS macVer, iOS iOSVer, *)
    
    #endif