From 809148e1a58296ab88c9d3c6719d345f35ce0279 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 19 Feb 2023 15:05:34 -0500 Subject: nvnflinger: fix name --- src/core/hle/service/nvflinger/buffer_queue_core.h | 80 ---------------------- 1 file changed, 80 deletions(-) delete mode 100644 src/core/hle/service/nvflinger/buffer_queue_core.h (limited to 'src/core/hle/service/nvflinger/buffer_queue_core.h') diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.h b/src/core/hle/service/nvflinger/buffer_queue_core.h deleted file mode 100644 index 85b3bc4c1..000000000 --- a/src/core/hle/service/nvflinger/buffer_queue_core.h +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project -// SPDX-FileCopyrightText: Copyright 2014 The Android Open Source Project -// SPDX-License-Identifier: GPL-3.0-or-later -// Parts of this implementation were based on: -// https://cs.android.com/android/platform/superproject/+/android-5.1.1_r38:frameworks/native/include/gui/BufferQueueCore.h - -#pragma once - -#include -#include -#include -#include -#include -#include - -#include "core/hle/service/nvflinger/buffer_item.h" -#include "core/hle/service/nvflinger/buffer_queue_defs.h" -#include "core/hle/service/nvflinger/pixel_format.h" -#include "core/hle/service/nvflinger/status.h" -#include "core/hle/service/nvflinger/window.h" - -namespace Service::android { - -class IConsumerListener; -class IProducerListener; - -class BufferQueueCore final { - friend class BufferQueueProducer; - friend class BufferQueueConsumer; - -public: - static constexpr s32 INVALID_BUFFER_SLOT = BufferItem::INVALID_BUFFER_SLOT; - - BufferQueueCore(); - ~BufferQueueCore(); - - void NotifyShutdown(); - -private: - void SignalDequeueCondition(); - bool WaitForDequeueCondition(std::unique_lock& lk); - - s32 GetMinUndequeuedBufferCountLocked(bool async) const; - s32 GetMinMaxBufferCountLocked(bool async) const; - s32 GetMaxBufferCountLocked(bool async) const; - s32 GetPreallocatedBufferCountLocked() const; - void FreeBufferLocked(s32 slot); - void FreeAllBuffersLocked(); - bool StillTracking(const BufferItem& item) const; - void WaitWhileAllocatingLocked() const; - -private: - mutable std::mutex mutex; - bool is_abandoned{}; - bool consumer_controlled_by_app{}; - std::shared_ptr consumer_listener; - u32 consumer_usage_bit{}; - NativeWindowApi connected_api{NativeWindowApi::NoConnectedApi}; - std::shared_ptr connected_producer_listener; - BufferQueueDefs::SlotsType slots{}; - std::vector queue; - s32 override_max_buffer_count{}; - std::condition_variable dequeue_condition; - std::atomic dequeue_possible{}; - const bool use_async_buffer{}; // This is always disabled on HOS - bool dequeue_buffer_cannot_block{}; - PixelFormat default_buffer_format{PixelFormat::Rgba8888}; - u32 default_width{1}; - u32 default_height{1}; - s32 default_max_buffer_count{2}; - const s32 max_acquired_buffer_count{}; // This is always zero on HOS - bool buffer_has_been_queued{}; - u64 frame_counter{}; - u32 transform_hint{}; - bool is_allocating{}; - mutable std::condition_variable_any is_allocating_condition; - bool is_shutting_down{}; -}; - -} // namespace Service::android -- cgit v1.2.3