From c853d53156b6f699aa4eba517bd01625ae2f91c2 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Mon, 4 Jun 2018 15:46:24 -0400 Subject: [PATCH] Remove uses of ReleaseOwnership from vulkan backend (flutter/engine#5458) * Remove uses of ReleaseOwnership from vulkan backend. Flutter no longer needs to release ownership of objects to skia so this change removes the api calls. * Remove Release call from vulkan_device.cc * Update vulkan_application.h * Update vulkan_application.cc * Update vulkan_handle.h --- engine/src/flutter/vulkan/vulkan_application.cc | 4 ---- engine/src/flutter/vulkan/vulkan_application.h | 2 -- engine/src/flutter/vulkan/vulkan_device.cc | 4 ---- engine/src/flutter/vulkan/vulkan_device.h | 2 -- engine/src/flutter/vulkan/vulkan_handle.h | 5 ----- 5 files changed, 17 deletions(-) diff --git a/engine/src/flutter/vulkan/vulkan_application.cc b/engine/src/flutter/vulkan/vulkan_application.cc index eaba000274c..7ba881b8431 100644 --- a/engine/src/flutter/vulkan/vulkan_application.cc +++ b/engine/src/flutter/vulkan/vulkan_application.cc @@ -129,10 +129,6 @@ const VulkanHandle& VulkanApplication::GetInstance() const { return instance_; } -void VulkanApplication::ReleaseInstanceOwnership() { - instance_.ReleaseOwnership(); -} - std::vector VulkanApplication::GetPhysicalDevices() const { if (!IsValid()) { return {}; diff --git a/engine/src/flutter/vulkan/vulkan_application.h b/engine/src/flutter/vulkan/vulkan_application.h index a5f20c07f63..9274701f958 100644 --- a/engine/src/flutter/vulkan/vulkan_application.h +++ b/engine/src/flutter/vulkan/vulkan_application.h @@ -38,8 +38,6 @@ class VulkanApplication { const VulkanHandle& GetInstance() const; - void ReleaseInstanceOwnership(); - std::unique_ptr AcquireFirstCompatibleLogicalDevice() const; private: diff --git a/engine/src/flutter/vulkan/vulkan_device.cc b/engine/src/flutter/vulkan/vulkan_device.cc index bb6c2e8a143..745110ed70f 100644 --- a/engine/src/flutter/vulkan/vulkan_device.cc +++ b/engine/src/flutter/vulkan/vulkan_device.cc @@ -153,10 +153,6 @@ const VulkanHandle& VulkanDevice::GetHandle() const { return device_; } -void VulkanDevice::ReleaseDeviceOwnership() { - device_.ReleaseOwnership(); -} - const VulkanHandle& VulkanDevice::GetPhysicalDeviceHandle() const { return physical_device_; diff --git a/engine/src/flutter/vulkan/vulkan_device.h b/engine/src/flutter/vulkan/vulkan_device.h index e9abf757f6a..e32f37d7ed5 100644 --- a/engine/src/flutter/vulkan/vulkan_device.h +++ b/engine/src/flutter/vulkan/vulkan_device.h @@ -35,8 +35,6 @@ class VulkanDevice { uint32_t GetGraphicsQueueIndex() const; - void ReleaseDeviceOwnership(); - FXL_WARN_UNUSED_RESULT bool GetSurfaceCapabilities(const VulkanSurface& surface, VkSurfaceCapabilitiesKHR* capabilities) const; diff --git a/engine/src/flutter/vulkan/vulkan_handle.h b/engine/src/flutter/vulkan/vulkan_handle.h index 87f535e9b91..32f1f938e25 100644 --- a/engine/src/flutter/vulkan/vulkan_handle.h +++ b/engine/src/flutter/vulkan/vulkan_handle.h @@ -50,11 +50,6 @@ class VulkanHandle { operator Handle() const { return handle_; } - /// Relinquish responsibility of collecting the underlying handle when this - /// object is collected. It is the responsibility of the caller to ensure that - /// the lifetime of the handle extends past the lifetime of this object. - void ReleaseOwnership() { disposer_ = nullptr; } - void Reset() { DisposeIfNecessary(); } private: