diff --git a/engine/src/flutter/impeller/core/allocator.cc b/engine/src/flutter/impeller/core/allocator.cc index 1785534a73..d9cedbe9ee 100644 --- a/engine/src/flutter/impeller/core/allocator.cc +++ b/engine/src/flutter/impeller/core/allocator.cc @@ -58,8 +58,6 @@ std::shared_ptr Allocator::CreateTexture( return OnCreateTexture(desc); } -void Allocator::DidAcquireSurfaceFrame() {} - uint16_t Allocator::MinimumBytesPerRow(PixelFormat format) const { return BytesPerPixelForPixelFormat(format); } diff --git a/engine/src/flutter/impeller/core/allocator.h b/engine/src/flutter/impeller/core/allocator.h index adcbc65670..794de1656e 100644 --- a/engine/src/flutter/impeller/core/allocator.h +++ b/engine/src/flutter/impeller/core/allocator.h @@ -44,10 +44,6 @@ class Allocator { virtual ISize GetMaxTextureSizeSupported() const = 0; - /// @brief Increment an internal frame used to cycle through a ring buffer of - /// allocation pools. - virtual void DidAcquireSurfaceFrame(); - protected: Allocator(); diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.cc b/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.cc index f6e2bf67e4..1eb01e54f2 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.cc +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.cc @@ -424,11 +424,6 @@ std::shared_ptr AllocatorVK::OnCreateTexture( return std::make_shared(context_, std::move(source)); } -void AllocatorVK::DidAcquireSurfaceFrame() { - frame_count_++; - raster_thread_id_ = std::this_thread::get_id(); -} - // |Allocator| std::shared_ptr AllocatorVK::OnCreateBuffer( const DeviceBufferDescriptor& desc) { @@ -449,8 +444,7 @@ std::shared_ptr AllocatorVK::OnCreateBuffer( allocation_info.preferredFlags = static_cast( ToVKBufferMemoryPropertyFlags(desc.storage_mode)); allocation_info.flags = ToVmaAllocationBufferCreateFlags(desc.storage_mode); - if (created_buffer_pool_ && desc.storage_mode == StorageMode::kHostVisible && - raster_thread_id_ == std::this_thread::get_id()) { + if (created_buffer_pool_ && desc.storage_mode == StorageMode::kHostVisible) { allocation_info.pool = staging_buffer_pool_.get().pool; } diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.h b/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.h index 51be4d8eb9..c1489abe7c 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.h +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/allocator_vk.h @@ -37,8 +37,6 @@ class AllocatorVK final : public Allocator { bool supports_framebuffer_fetch_ = false; // TODO(jonahwilliams): figure out why CI can't create these buffer pools. bool created_buffer_pool_ = true; - uint32_t frame_count_ = 0; - std::thread::id raster_thread_id_; AllocatorVK(std::weak_ptr context, uint32_t vulkan_api_version, @@ -50,9 +48,6 @@ class AllocatorVK final : public Allocator { // |Allocator| bool IsValid() const; - // |Allocator| - void DidAcquireSurfaceFrame() override; - // |Allocator| std::shared_ptr OnCreateBuffer( const DeviceBufferDescriptor& desc) override; diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.cc b/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.cc index c0ef312fec..646d8a8d15 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.cc +++ b/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.cc @@ -81,9 +81,6 @@ std::unique_ptr SurfaceContextVK::AcquireNextSurface() { impeller::PipelineLibraryVK::Cast(*pipeline_library) .DidAcquireSurfaceFrame(); } - if (auto allocator = parent_->GetResourceAllocator()) { - allocator->DidAcquireSurfaceFrame(); - } parent_->GetCommandPoolRecycler()->Dispose(); return surface; }