Ensure Vulkan when including Skia Vulkan headers (flutter/engine#55126)

Skia is changing how it handles its internal copy of Vulkan headers to
prevent them from accidentally leaking to users and potentially
overriding the user's Vulkan headers. Users of Skia are responsible for
providing the Vulkan headers when including Skia's public Vk headers.
This change only includes Skia's public Vk headers when Flutter is
providing the Vulkan headers.
This commit is contained in:
bungeman 2024-09-12 08:55:07 -04:00 committed by GitHub
parent f469f967d8
commit 2289895234
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,6 @@
#include "third_party/skia/include/gpu/GpuTypes.h"
#include "third_party/skia/include/gpu/ganesh/GrBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
#if !defined(FLUTTER_NO_EXPORT)
#if FML_OS_WIN
@ -101,6 +100,7 @@ extern const intptr_t kPlatformStrongDillSize;
#ifdef SHELL_ENABLE_VULKAN
#include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
#endif // SHELL_ENABLE_VULKAN
const int32_t kFlutterSemanticsNodeIdBatchEnd = -1;

View File

@ -14,9 +14,6 @@
#include "third_party/skia/include/gpu/GpuTypes.h"
#include "third_party/skia/include/gpu/ganesh/GrBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
#include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/gl/GrGLTypes.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
#include <cstdlib>
#include <memory>
@ -24,6 +21,7 @@
#ifdef SHELL_ENABLE_VULKAN
#include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
#endif // SHELL_ENABLE_VULKAN
#ifdef SHELL_ENABLE_METAL
@ -33,6 +31,8 @@
#ifdef SHELL_ENABLE_GL
#include "flutter/testing/test_gl_surface.h"
#include "third_party/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h"
#include "third_party/skia/include/gpu/ganesh/gl/GrGLTypes.h"
#endif // SHELL_ENABLE_GL
// TODO(zanderso): https://github.com/flutter/flutter/issues/127701