chromium/gpu/command_buffer/service/external_semaphore_pool.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gpu/command_buffer/service/external_semaphore_pool.h"

#include "build/build_config.h"
#include "components/viz/common/gpu/vulkan_context_provider.h"
#include "gpu/command_buffer/service/shared_context_state.h"
#include "gpu/vulkan/vulkan_device_queue.h"
#include "gpu/vulkan/vulkan_fence_helper.h"
#include "gpu/vulkan/vulkan_implementation.h"
#include "ui/gl/gl_context.h"

namespace gpu {
namespace {

#if BUILDFLAG(IS_FUCHSIA)
// On Fuchsia semaphores are passed to scenic as zx::event. Scenic doesn't reset
// them after waiting, so they would have to be reset explicitly to be reused.
// OTOH new semaphores are cheap, so reuse doesn't provide significant benefits.
constexpr size_t kMaxSemaphoresInPool = 0;
#else
constexpr size_t kMaxSemaphoresInPool =;
#endif

}  // namespace

ExternalSemaphorePool::ExternalSemaphorePool(
    SharedContextState* shared_context_state)
    :{}

ExternalSemaphorePool::~ExternalSemaphorePool() = default;

ExternalSemaphore ExternalSemaphorePool::GetOrCreateSemaphore() {}

void ExternalSemaphorePool::ReturnSemaphore(ExternalSemaphore semaphore) {}

void ExternalSemaphorePool::ReturnSemaphores(
    std::vector<ExternalSemaphore> semaphores) {}

void ExternalSemaphorePool::ReturnSemaphoresWithFenceHelper(
    std::vector<ExternalSemaphore> semaphores) {}

}  // namespace gpu