<commit_before>// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#pragma once

#include <string>

#include "flutter/fml/build_config.h"
#include "flutter/fml/logging.h"

#if FML_OS_ANDROID
#ifndef VK_USE_PLATFORM_ANDROID_KHR
#define VK_USE_PLATFORM_ANDROID_KHR 1
#endif  // VK_USE_PLATFORM_ANDROID_KHR
#endif  // FML_OS_ANDROID

#if OS_FUCHSIA
#ifndef VK_USE_PLATFORM_MAGMA_KHR
#define VK_USE_PLATFORM_MAGMA_KHR 1
#endif  // VK_USE_PLATFORM_MAGMA_KHR
#ifndef VK_USE_PLATFORM_FUCHSIA
#define VK_USE_PLATFORM_FUCHSIA 1
#endif  // VK_USE_PLATFORM_FUCHSIA
#endif  // OS_FUCHSIA

// TODO(dnfield): vulkan_metal.h has some unguarded availability checks for
// macOS 10.13. We can remove this if we bump to 10.14 or if that gets fixed
// upstream, but fixing it upstream will take some time to flow through to
// ANGLE's DEPS.
#ifdef VK_USE_PLATFORM_METAL_EXT
#undef VK_USE_PLATFORM_METAL_EXT
#endif  // VK_USE_PLATFORM_METAL_EXT

#include <vulkan/vulkan.h>

#define VK_CALL_LOG_ERROR(expression)                     \
  ({                                                      \
    __typeof__(expression) _rc = (expression);            \
    if (_rc != VK_SUCCESS) {                              \
      FML_LOG(INFO) << "Vulkan call '" << #expression     \
                    << "' failed with error "             \
                    << vulkan::VulkanResultToString(_rc); \
    }                                                     \
    _rc;                                                  \
  })
<commit_msg>[macOS] Eliminate Vulkan hack for macOS < 10.14 (#37498)<commit_after>// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#pragma once

#include <string>

#include "flutter/fml/build_config.h"
#include "flutter/fml/logging.h"

#if FML_OS_ANDROID
#ifndef VK_USE_PLATFORM_ANDROID_KHR
#define VK_USE_PLATFORM_ANDROID_KHR 1
#endif  // VK_USE_PLATFORM_ANDROID_KHR
#endif  // FML_OS_ANDROID

#if OS_FUCHSIA
#ifndef VK_USE_PLATFORM_MAGMA_KHR
#define VK_USE_PLATFORM_MAGMA_KHR 1
#endif  // VK_USE_PLATFORM_MAGMA_KHR
#ifndef VK_USE_PLATFORM_FUCHSIA
#define VK_USE_PLATFORM_FUCHSIA 1
#endif  // VK_USE_PLATFORM_FUCHSIA
#endif  // OS_FUCHSIA

#include <vulkan/vulkan.h>

#define VK_CALL_LOG_ERROR(expression)                     \
  ({                                                      \
    __typeof__(expression) _rc = (expression);            \
    if (_rc != VK_SUCCESS) {                              \
      FML_LOG(INFO) << "Vulkan call '" << #expression     \
                    << "' failed with error "             \
                    << vulkan::VulkanResultToString(_rc); \
    }                                                     \
    _rc;                                                  \
  })

{'fraction_non_alphanumeric': 0.08361658735554045, 'fraction_numerical': 0.01053704962610469, 'mean_word_length': 1.9637462235649548, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3929160', 'n_tokens_mistral': 1039, 'n_tokens_neox': 984, 'n_words': 220}