From fefd3ed6545d8ac0ff8e87160db6b1085d2511f3 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Fri, 13 Oct 2023 12:59:19 +0000 Subject: [PATCH] Update to use GrDirectContexts::MakeVulkan --- shell/common/shell_test_platform_view_vulkan.cc | 3 ++- shell/platform/embedder/embedder_surface_vulkan.cc | 3 ++- shell/platform/fuchsia/flutter/vulkan_surface_producer.cc | 3 ++- testing/test_vulkan_context.cc | 3 ++- vulkan/vulkan_window.cc | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/shell/common/shell_test_platform_view_vulkan.cc b/shell/common/shell_test_platform_view_vulkan.cc index d19e5cb2bcaff..d8ce19114f140 100644 --- a/shell/common/shell_test_platform_view_vulkan.cc +++ b/shell/common/shell_test_platform_view_vulkan.cc @@ -14,6 +14,7 @@ #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #if OS_FUCHSIA #define VULKAN_SO_PATH "libvulkan.so" @@ -138,7 +139,7 @@ bool ShellTestPlatformViewVulkan::OffScreenSurface::CreateSkiaGrContext() { MakeDefaultContextOptions(ContextType::kRender, GrBackendApi::kVulkan); sk_sp context = - GrDirectContext::MakeVulkan(backend_context, options); + GrDirectContexts::MakeVulkan(backend_context, options); if (context == nullptr) { FML_DLOG(ERROR) << "Failed to create GrDirectContext"; diff --git a/shell/platform/embedder/embedder_surface_vulkan.cc b/shell/platform/embedder/embedder_surface_vulkan.cc index d7191770025de..1ab4ca92942c3 100644 --- a/shell/platform/embedder/embedder_surface_vulkan.cc +++ b/shell/platform/embedder/embedder_surface_vulkan.cc @@ -14,6 +14,7 @@ #include "include/gpu/GrDirectContext.h" #include "include/gpu/vk/GrVkBackendContext.h" #include "include/gpu/vk/GrVkExtensions.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" namespace flutter { @@ -171,7 +172,7 @@ sk_sp EmbedderSurfaceVulkan::CreateGrContext( GrContextOptions options = MakeDefaultContextOptions(context_type, GrBackendApi::kVulkan); options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - return GrDirectContext::MakeVulkan(backend_context, options); + return GrDirectContexts::MakeVulkan(backend_context, options); } } // namespace flutter diff --git a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc index 24394e4cfc0fe..f99c39a4d095e 100644 --- a/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc +++ b/shell/platform/fuchsia/flutter/vulkan_surface_producer.cc @@ -20,6 +20,7 @@ #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h" #include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #include "third_party/skia/include/gpu/vk/GrVkBackendContext.h" #include "third_party/skia/include/gpu/vk/GrVkExtensions.h" #include "third_party/skia/include/gpu/vk/GrVkTypes.h" @@ -153,7 +154,7 @@ bool VulkanSurfaceProducer::Initialize() { GrContextOptions options; options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - context_ = GrDirectContext::MakeVulkan(backend_context, options); + context_ = GrDirectContexts::MakeVulkan(backend_context, options); if (context_ == nullptr) { FML_LOG(ERROR) diff --git a/testing/test_vulkan_context.cc b/testing/test_vulkan_context.cc index 5652431a800ad..d7472303f111a 100644 --- a/testing/test_vulkan_context.cc +++ b/testing/test_vulkan_context.cc @@ -17,6 +17,7 @@ #include "flutter/vulkan/swiftshader_path.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" #include "third_party/skia/include/gpu/vk/GrVkExtensions.h" #include "vulkan/vulkan_core.h" @@ -106,7 +107,7 @@ TestVulkanContext::TestVulkanContext() { GrContextOptions options = MakeDefaultContextOptions(ContextType::kRender, GrBackendApi::kVulkan); options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; - context_ = GrDirectContext::MakeVulkan(backend_context, options); + context_ = GrDirectContexts::MakeVulkan(backend_context, options); } TestVulkanContext::~TestVulkanContext() { diff --git a/vulkan/vulkan_window.cc b/vulkan/vulkan_window.cc index 345919b83d8c1..95bd227dde462 100644 --- a/vulkan/vulkan_window.cc +++ b/vulkan/vulkan_window.cc @@ -19,6 +19,7 @@ #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/ganesh/vk/GrVkDirectContext.h" namespace vulkan { @@ -128,7 +129,7 @@ bool VulkanWindow::CreateSkiaGrContext() { GrContextOptions options; options.fReduceOpsTaskSplitting = GrContextOptions::Enable::kNo; sk_sp context = - GrDirectContext::MakeVulkan(backend_context, options); + GrDirectContexts::MakeVulkan(backend_context, options); if (context == nullptr) { return false;