Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Remove work queues. #40429

Merged
merged 2 commits into from
Mar 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,6 @@ ORIGIN: ../../../flutter/impeller/base/backend_cast.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/comparable.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/comparable.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/config.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/platform/darwin/work_queue_darwin.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/platform/darwin/work_queue_darwin.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/promise.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/promise.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/strings.cc + ../../../flutter/LICENSE
Expand All @@ -1055,10 +1053,6 @@ ORIGIN: ../../../flutter/impeller/base/validation.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/validation.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/version.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/version.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/work_queue.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/work_queue.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/work_queue_common.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/base/work_queue_common.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/blobcat/blob.fbs + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/blobcat/blob_library.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/impeller/blobcat/blob_library.h + ../../../flutter/LICENSE
Expand Down Expand Up @@ -3575,8 +3569,6 @@ FILE: ../../../flutter/impeller/base/backend_cast.h
FILE: ../../../flutter/impeller/base/comparable.cc
FILE: ../../../flutter/impeller/base/comparable.h
FILE: ../../../flutter/impeller/base/config.h
FILE: ../../../flutter/impeller/base/platform/darwin/work_queue_darwin.cc
FILE: ../../../flutter/impeller/base/platform/darwin/work_queue_darwin.h
FILE: ../../../flutter/impeller/base/promise.cc
FILE: ../../../flutter/impeller/base/promise.h
FILE: ../../../flutter/impeller/base/strings.cc
Expand All @@ -3590,10 +3582,6 @@ FILE: ../../../flutter/impeller/base/validation.cc
FILE: ../../../flutter/impeller/base/validation.h
FILE: ../../../flutter/impeller/base/version.cc
FILE: ../../../flutter/impeller/base/version.h
FILE: ../../../flutter/impeller/base/work_queue.cc
FILE: ../../../flutter/impeller/base/work_queue.h
FILE: ../../../flutter/impeller/base/work_queue_common.cc
FILE: ../../../flutter/impeller/base/work_queue_common.h
FILE: ../../../flutter/impeller/blobcat/blob.fbs
FILE: ../../../flutter/impeller/blobcat/blob_library.cc
FILE: ../../../flutter/impeller/blobcat/blob_library.h
Expand Down
11 changes: 0 additions & 11 deletions impeller/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@ impeller_component("base") {
"validation.h",
"version.cc",
"version.h",
"work_queue.cc",
"work_queue.h",
"work_queue_common.cc",
"work_queue_common.h",
]

if (is_ios || is_mac) {
sources += [
"platform/darwin/work_queue_darwin.cc",
"platform/darwin/work_queue_darwin.h",
]
}

deps = [ "//flutter/fml" ]
}

Expand Down
38 changes: 0 additions & 38 deletions impeller/base/platform/darwin/work_queue_darwin.cc

This file was deleted.

36 changes: 0 additions & 36 deletions impeller/base/platform/darwin/work_queue_darwin.h

This file was deleted.

13 changes: 0 additions & 13 deletions impeller/base/work_queue.cc

This file was deleted.

27 changes: 0 additions & 27 deletions impeller/base/work_queue.h

This file was deleted.

25 changes: 0 additions & 25 deletions impeller/base/work_queue_common.cc

This file was deleted.

33 changes: 0 additions & 33 deletions impeller/base/work_queue_common.h

This file was deleted.

15 changes: 0 additions & 15 deletions impeller/renderer/backend/gles/context_gles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "impeller/base/config.h"
#include "impeller/base/validation.h"
#include "impeller/base/work_queue_common.h"
#include "impeller/renderer/device_capabilities.h"

namespace impeller {
Expand Down Expand Up @@ -60,15 +59,6 @@ ContextGLES::ContextGLES(std::unique_ptr<ProcTableGLES> gl,
std::shared_ptr<SamplerLibraryGLES>(new SamplerLibraryGLES());
}

// Create the work queue.
{
work_queue_ = WorkQueueCommon::Create();
if (!work_queue_) {
VALIDATION_LOG << "Could not create work queue.";
return;
}
}

// Create the device capabilities.
{
device_capabilities_ =
Expand Down Expand Up @@ -139,11 +129,6 @@ std::shared_ptr<CommandBuffer> ContextGLES::CreateCommandBuffer() const {
new CommandBufferGLES(weak_from_this(), reactor_));
}

// |Context|
std::shared_ptr<WorkQueue> ContextGLES::GetWorkQueue() const {
return work_queue_;
}

// |Context|
const IDeviceCapabilities& ContextGLES::GetDeviceCapabilities() const {
return *device_capabilities_;
Expand Down
4 changes: 0 additions & 4 deletions impeller/renderer/backend/gles/context_gles.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class ContextGLES final : public Context,
std::shared_ptr<ShaderLibraryGLES> shader_library_;
std::shared_ptr<PipelineLibraryGLES> pipeline_library_;
std::shared_ptr<SamplerLibraryGLES> sampler_library_;
std::shared_ptr<WorkQueue> work_queue_;
std::shared_ptr<AllocatorGLES> resource_allocator_;
std::unique_ptr<IDeviceCapabilities> device_capabilities_;
bool is_valid_ = false;
Expand All @@ -66,9 +65,6 @@ class ContextGLES final : public Context,
// |Context|
std::shared_ptr<CommandBuffer> CreateCommandBuffer() const override;

// |Context|
std::shared_ptr<WorkQueue> GetWorkQueue() const override;

// |Context|
const IDeviceCapabilities& GetDeviceCapabilities() const override;

Expand Down
4 changes: 0 additions & 4 deletions impeller/renderer/backend/metal/context_mtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ContextMTL final : public Context,
std::shared_ptr<PipelineLibraryMTL> pipeline_library_;
std::shared_ptr<SamplerLibrary> sampler_library_;
std::shared_ptr<AllocatorMTL> resource_allocator_;
std::shared_ptr<WorkQueue> work_queue_;
std::shared_ptr<GPUTracerMTL> gpu_tracer_;
std::unique_ptr<IDeviceCapabilities> device_capabilities_;
bool is_valid_ = false;
Expand All @@ -71,9 +70,6 @@ class ContextMTL final : public Context,
// |Context|
std::shared_ptr<CommandBuffer> CreateCommandBuffer() const override;

// |Context|
std::shared_ptr<WorkQueue> GetWorkQueue() const override;

// |Context|
std::shared_ptr<GPUTracer> GetGPUTracer() const override;

Expand Down
15 changes: 0 additions & 15 deletions impeller/renderer/backend/metal/context_mtl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "flutter/fml/file.h"
#include "flutter/fml/logging.h"
#include "flutter/fml/paths.h"
#include "impeller/base/platform/darwin/work_queue_darwin.h"
#include "impeller/renderer/backend/metal/sampler_library_mtl.h"
#include "impeller/renderer/device_capabilities.h"
#include "impeller/renderer/sampler_descriptor.h"
Expand Down Expand Up @@ -74,15 +73,6 @@
}
}

// Setup the work queue.
{
work_queue_ = WorkQueueDarwin::Create();
if (!work_queue_) {
VALIDATION_LOG << "Could not setup the work queue.";
return;
}
}

#if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) || \
(FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE)
// Setup the gpu tracer.
Expand Down Expand Up @@ -256,11 +246,6 @@
return CreateCommandBufferInQueue(command_queue_);
}

// |Context|
std::shared_ptr<WorkQueue> ContextMTL::GetWorkQueue() const {
return work_queue_;
}

std::shared_ptr<GPUTracer> ContextMTL::GetGPUTracer() const {
return gpu_tracer_;
}
Expand Down
14 changes: 0 additions & 14 deletions impeller/renderer/backend/vulkan/context_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "flutter/fml/string_conversion.h"
#include "flutter/fml/trace_event.h"
#include "impeller/base/validation.h"
#include "impeller/base/work_queue_common.h"
#include "impeller/renderer/backend/vulkan/allocator_vk.h"
#include "impeller/renderer/backend/vulkan/capabilities_vk.h"
#include "impeller/renderer/backend/vulkan/command_buffer_vk.h"
Expand Down Expand Up @@ -479,13 +478,6 @@ ContextVK::ContextVK(
return;
}

auto work_queue = WorkQueueCommon::Create();

if (!work_queue) {
VALIDATION_LOG << "Could not create workqueue.";
return;
}

//----------------------------------------------------------------------------
/// Setup the command pool.
///
Expand Down Expand Up @@ -541,7 +533,6 @@ ContextVK::ContextVK(
shader_library_ = std::move(shader_library);
sampler_library_ = std::move(sampler_library);
pipeline_library_ = std::move(pipeline_library);
work_queue_ = std::move(work_queue);
graphics_queue_ =
device_->getQueue(graphics_queue->family, graphics_queue->index);
compute_queue_ =
Expand Down Expand Up @@ -591,11 +582,6 @@ std::shared_ptr<PipelineLibrary> ContextVK::GetPipelineLibrary() const {
return pipeline_library_;
}

// |Context|
std::shared_ptr<WorkQueue> ContextVK::GetWorkQueue() const {
return work_queue_;
}

std::shared_ptr<CommandBuffer> ContextVK::CreateCommandBuffer() const {
return std::shared_ptr<CommandBufferVK>(
new CommandBufferVK(shared_from_this(), //
Expand Down
Loading