diff options
Diffstat (limited to 'src/core')
29 files changed, 58 insertions, 61 deletions
diff --git a/src/core/hle/service/nvflinger/binder.h b/src/core/hle/service/nvflinger/binder.h index 2d9a23573..7d0d4d819 100644 --- a/src/core/hle/service/nvflinger/binder.h +++ b/src/core/hle/service/nvflinger/binder.h @@ -13,7 +13,7 @@ class HLERequestContext; class KReadableEvent; } // namespace Kernel -namespace android { +namespace Service::android { enum class TransactionId { RequestBuffer = 1, @@ -39,4 +39,4 @@ public: virtual Kernel::KReadableEvent& GetNativeHandle() = 0; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_item.h b/src/core/hle/service/nvflinger/buffer_item.h index 9dc6f3fee..d60719065 100644 --- a/src/core/hle/service/nvflinger/buffer_item.h +++ b/src/core/hle/service/nvflinger/buffer_item.h @@ -13,7 +13,7 @@ #include "core/hle/service/nvflinger/ui/rect.h" #include "core/hle/service/nvflinger/window.h" -namespace android { +namespace Service::android { class GraphicBuffer; @@ -43,4 +43,4 @@ public: s32 swap_interval{}; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_item_consumer.cpp b/src/core/hle/service/nvflinger/buffer_item_consumer.cpp index 424b19d32..508df3a12 100644 --- a/src/core/hle/service/nvflinger/buffer_item_consumer.cpp +++ b/src/core/hle/service/nvflinger/buffer_item_consumer.cpp @@ -10,7 +10,7 @@ #include "core/hle/service/nvflinger/buffer_item_consumer.h" #include "core/hle/service/nvflinger/buffer_queue_consumer.h" -namespace android { +namespace Service::android { BufferItemConsumer::BufferItemConsumer(std::unique_ptr<BufferQueueConsumer> consumer_) : ConsumerBase{std::move(consumer_)} {} @@ -56,4 +56,4 @@ Status BufferItemConsumer::ReleaseBuffer(const BufferItem& item, Fence& release_ return Status::NoError; } -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_item_consumer.h b/src/core/hle/service/nvflinger/buffer_item_consumer.h index f61c180b3..99d592960 100644 --- a/src/core/hle/service/nvflinger/buffer_item_consumer.h +++ b/src/core/hle/service/nvflinger/buffer_item_consumer.h @@ -12,7 +12,7 @@ #include "core/hle/service/nvflinger/consumer_base.h" #include "core/hle/service/nvflinger/status.h" -namespace android { +namespace Service::android { class BufferItem; @@ -23,4 +23,4 @@ public: Status ReleaseBuffer(const BufferItem& item, Fence& release_fence); }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp b/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp index f0875eca3..865f696d7 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_consumer.cpp @@ -10,7 +10,7 @@ #include "core/hle/service/nvflinger/buffer_queue_core.h" #include "core/hle/service/nvflinger/producer_listener.h" -namespace android { +namespace Service::android { BufferQueueConsumer::BufferQueueConsumer(std::shared_ptr<BufferQueueCore> core_) : core{std::move(core_)}, slots{core->slots} {} @@ -222,4 +222,4 @@ Status BufferQueueConsumer::Connect(std::shared_ptr<IConsumerListener> consumer_ return Status::NoError; } -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_consumer.h b/src/core/hle/service/nvflinger/buffer_queue_consumer.h index fbeb8b8d7..26981ed19 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_consumer.h +++ b/src/core/hle/service/nvflinger/buffer_queue_consumer.h @@ -12,7 +12,7 @@ #include "core/hle/service/nvflinger/buffer_queue_defs.h" #include "core/hle/service/nvflinger/status.h" -namespace android { +namespace Service::android { class BufferItem; class BufferQueueCore; @@ -33,4 +33,4 @@ private: BufferQueueDefs::SlotsType& slots; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.cpp b/src/core/hle/service/nvflinger/buffer_queue_core.cpp index a6ff46aa9..63cf66ba3 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_core.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_core.cpp @@ -8,12 +8,9 @@ #include "core/hle/service/nvflinger/buffer_queue_core.h" -namespace android { - -BufferQueueCore::BufferQueueCore() : lock{mutex} { - // This is locked on creation, so unlock. - lock.unlock(); +namespace Service::android { +BufferQueueCore::BufferQueueCore() : lock{mutex, std::defer_lock} { for (s32 slot = 0; slot < BufferQueueDefs::NUM_BUFFER_SLOTS; ++slot) { free_slots.insert(slot); } @@ -132,4 +129,4 @@ void BufferQueueCore::WaitWhileAllocatingLocked() const { } } -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_core.h b/src/core/hle/service/nvflinger/buffer_queue_core.h index 8019b7024..252a36350 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_core.h +++ b/src/core/hle/service/nvflinger/buffer_queue_core.h @@ -19,7 +19,7 @@ #include "core/hle/service/nvflinger/status.h" #include "core/hle/service/nvflinger/window.h" -namespace android { +namespace Service::android { class IConsumerListener; class IProducerListener; @@ -95,4 +95,4 @@ private: bool is_shutting_down{}; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_defs.h b/src/core/hle/service/nvflinger/buffer_queue_defs.h index cea09e044..387d3d36a 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_defs.h +++ b/src/core/hle/service/nvflinger/buffer_queue_defs.h @@ -11,11 +11,11 @@ #include "common/common_types.h" #include "core/hle/service/nvflinger/buffer_slot.h" -namespace android::BufferQueueDefs { +namespace Service::android::BufferQueueDefs { // BufferQueue will keep track of at most this value of buffers. constexpr s32 NUM_BUFFER_SLOTS = 64; using SlotsType = std::array<BufferSlot, NUM_BUFFER_SLOTS>; -} // namespace android::BufferQueueDefs +} // namespace Service::android::BufferQueueDefs diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp index a347f8b3b..2f7e9dcfc 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.cpp +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.cpp @@ -23,7 +23,7 @@ #include "core/hle/service/nvflinger/window.h" #include "core/hle/service/vi/vi.h" -namespace android { +namespace Service::android { BufferQueueProducer::BufferQueueProducer(Service::KernelHelpers::ServiceContext& service_context_, std::shared_ptr<BufferQueueCore> buffer_queue_core_) @@ -936,4 +936,4 @@ Kernel::KReadableEvent& BufferQueueProducer::GetNativeHandle() { return buffer_wait_event->GetReadableEvent(); } -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_queue_producer.h b/src/core/hle/service/nvflinger/buffer_queue_producer.h index fcb71a794..5ddeebe0c 100644 --- a/src/core/hle/service/nvflinger/buffer_queue_producer.h +++ b/src/core/hle/service/nvflinger/buffer_queue_producer.h @@ -31,7 +31,7 @@ namespace Service::KernelHelpers { class ServiceContext; } // namespace Service::KernelHelpers -namespace android { +namespace Service::android { class BufferQueueCore; class IProducerListener; @@ -80,4 +80,4 @@ private: std::condition_variable callback_condition; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_slot.h b/src/core/hle/service/nvflinger/buffer_slot.h index 24b806d33..e3ea58910 100644 --- a/src/core/hle/service/nvflinger/buffer_slot.h +++ b/src/core/hle/service/nvflinger/buffer_slot.h @@ -11,7 +11,7 @@ #include "common/common_types.h" #include "core/hle/service/nvflinger/ui/fence.h" -namespace android { +namespace Service::android { class GraphicBuffer; @@ -36,4 +36,4 @@ struct BufferSlot final { bool is_preallocated{}; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/buffer_transform_flags.h b/src/core/hle/service/nvflinger/buffer_transform_flags.h index 398c6370b..e8e6300e3 100644 --- a/src/core/hle/service/nvflinger/buffer_transform_flags.h +++ b/src/core/hle/service/nvflinger/buffer_transform_flags.h @@ -5,7 +5,7 @@ #include "common/common_types.h" -namespace android { +namespace Service::android { enum class BufferTransformFlags : u32 { /// No transform flags are set @@ -22,4 +22,4 @@ enum class BufferTransformFlags : u32 { Rotate270 = 0x07, }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/consumer_base.cpp b/src/core/hle/service/nvflinger/consumer_base.cpp index 127e5930b..c752ffc8e 100644 --- a/src/core/hle/service/nvflinger/consumer_base.cpp +++ b/src/core/hle/service/nvflinger/consumer_base.cpp @@ -12,7 +12,7 @@ #include "core/hle/service/nvflinger/consumer_base.h" #include "core/hle/service/nvflinger/ui/graphic_buffer.h" -namespace android { +namespace Service::android { ConsumerBase::ConsumerBase(std::unique_ptr<BufferQueueConsumer> consumer_) : consumer{std::move(consumer_)} {} @@ -126,4 +126,4 @@ bool ConsumerBase::StillTracking(s32 slot, const std::shared_ptr<GraphicBuffer> slots[slot].graphic_buffer->Handle() == graphic_buffer->Handle()); } -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/consumer_base.h b/src/core/hle/service/nvflinger/consumer_base.h index 574ea9781..ae34ea0a9 100644 --- a/src/core/hle/service/nvflinger/consumer_base.h +++ b/src/core/hle/service/nvflinger/consumer_base.h @@ -15,7 +15,7 @@ #include "core/hle/service/nvflinger/consumer_listener.h" #include "core/hle/service/nvflinger/status.h" -namespace android { +namespace Service::android { class BufferItem; class BufferQueueConsumer; @@ -56,4 +56,4 @@ protected: mutable std::mutex mutex; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/consumer_listener.h b/src/core/hle/service/nvflinger/consumer_listener.h index 0aa4ad17b..b6d1c3e9a 100644 --- a/src/core/hle/service/nvflinger/consumer_listener.h +++ b/src/core/hle/service/nvflinger/consumer_listener.h @@ -6,7 +6,7 @@ #pragma once -namespace android { +namespace Service::android { class BufferItem; @@ -23,4 +23,4 @@ public: virtual void OnSidebandStreamChanged() = 0; }; -}; // namespace android +}; // namespace Service::android diff --git a/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp b/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp index 3e3669c99..d4da98ddb 100644 --- a/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp +++ b/src/core/hle/service/nvflinger/graphic_buffer_producer.cpp @@ -9,7 +9,7 @@ #include "core/hle/service/nvflinger/graphic_buffer_producer.h" #include "core/hle/service/nvflinger/parcel.h" -namespace android { +namespace Service::android { QueueBufferInput::QueueBufferInput(Parcel& parcel) { parcel.ReadFlattened(*this); @@ -17,4 +17,4 @@ QueueBufferInput::QueueBufferInput(Parcel& parcel) { QueueBufferOutput::QueueBufferOutput() = default; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/graphic_buffer_producer.h b/src/core/hle/service/nvflinger/graphic_buffer_producer.h index cad683cd3..dd4187027 100644 --- a/src/core/hle/service/nvflinger/graphic_buffer_producer.h +++ b/src/core/hle/service/nvflinger/graphic_buffer_producer.h @@ -12,7 +12,7 @@ #include "core/hle/service/nvflinger/ui/rect.h" #include "core/hle/service/nvflinger/window.h" -namespace android { +namespace Service::android { class Parcel; @@ -75,4 +75,4 @@ private: #pragma pack(pop) static_assert(sizeof(QueueBufferOutput) == 16, "QueueBufferOutput has wrong size"); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index 5112ae136..4f93ffe07 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -37,10 +37,10 @@ class Display; class Layer; } // namespace Service::VI -namespace android { +namespace Service::android { class BufferQueueCore; class BufferQueueProducer; -} // namespace android +} // namespace Service::android namespace Service::NVFlinger { diff --git a/src/core/hle/service/nvflinger/parcel.h b/src/core/hle/service/nvflinger/parcel.h index 710964f5d..b41c1732e 100644 --- a/src/core/hle/service/nvflinger/parcel.h +++ b/src/core/hle/service/nvflinger/parcel.h @@ -10,7 +10,7 @@ #include "common/assert.h" #include "common/common_types.h" -namespace android { +namespace Service::android { class Parcel final { public: @@ -168,4 +168,4 @@ private: std::size_t write_index = sizeof(Header); }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/pixel_format.h b/src/core/hle/service/nvflinger/pixel_format.h index 966c84775..8a77d8bea 100644 --- a/src/core/hle/service/nvflinger/pixel_format.h +++ b/src/core/hle/service/nvflinger/pixel_format.h @@ -5,7 +5,7 @@ #include "common/common_types.h" -namespace android { +namespace Service::android { enum class PixelFormat : u32 { NoFormat = 0, @@ -18,4 +18,4 @@ enum class PixelFormat : u32 { Rgba4444 = 7, }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/producer_listener.h b/src/core/hle/service/nvflinger/producer_listener.h index 8fe29d73e..468e06431 100644 --- a/src/core/hle/service/nvflinger/producer_listener.h +++ b/src/core/hle/service/nvflinger/producer_listener.h @@ -6,11 +6,11 @@ #pragma once -namespace android { +namespace Service::android { class IProducerListener { public: virtual void OnBufferReleased() = 0; }; -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/status.h b/src/core/hle/service/nvflinger/status.h index 9bc1205df..a003eda89 100644 --- a/src/core/hle/service/nvflinger/status.h +++ b/src/core/hle/service/nvflinger/status.h @@ -6,7 +6,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" -namespace android { +namespace Service::android { enum class Status : s32 { None = 0, @@ -25,4 +25,4 @@ enum class Status : s32 { }; DECLARE_ENUM_FLAG_OPERATORS(Status); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/ui/fence.h b/src/core/hle/service/nvflinger/ui/fence.h index 80ce98782..4a74e26a3 100644 --- a/src/core/hle/service/nvflinger/ui/fence.h +++ b/src/core/hle/service/nvflinger/ui/fence.h @@ -11,7 +11,7 @@ #include "common/common_types.h" #include "core/hle/service/nvdrv/nvdata.h" -namespace android { +namespace Service::android { class Fence { public: @@ -29,4 +29,4 @@ public: }; static_assert(sizeof(Fence) == 36, "Fence has wrong size"); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/ui/graphic_buffer.h b/src/core/hle/service/nvflinger/ui/graphic_buffer.h index 2e7f251ef..7abbf78ba 100644 --- a/src/core/hle/service/nvflinger/ui/graphic_buffer.h +++ b/src/core/hle/service/nvflinger/ui/graphic_buffer.h @@ -10,7 +10,7 @@ #include "common/common_types.h" #include "core/hle/service/nvflinger/pixel_format.h" -namespace android { +namespace Service::android { class GraphicBuffer final { public: @@ -97,4 +97,4 @@ private: }; static_assert(sizeof(GraphicBuffer) == 0x16C, "GraphicBuffer has wrong size"); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/ui/rect.h b/src/core/hle/service/nvflinger/ui/rect.h index 847f6f4ae..c7b5f1815 100644 --- a/src/core/hle/service/nvflinger/ui/rect.h +++ b/src/core/hle/service/nvflinger/ui/rect.h @@ -11,7 +11,7 @@ #include "common/common_types.h" -namespace android { +namespace Service::android { class Rect final { public: @@ -72,4 +72,4 @@ private: }; static_assert(sizeof(Rect) == 16, "Rect has wrong size"); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/nvflinger/window.h b/src/core/hle/service/nvflinger/window.h index 17f36da20..e26f8160e 100644 --- a/src/core/hle/service/nvflinger/window.h +++ b/src/core/hle/service/nvflinger/window.h @@ -6,7 +6,7 @@ #include "common/common_funcs.h" #include "common/common_types.h" -namespace android { +namespace Service::android { /// Attributes queryable with Query enum class NativeWindow : s32 { @@ -50,4 +50,4 @@ enum class NativeWindowTransform : u32 { }; DECLARE_ENUM_FLAG_OPERATORS(NativeWindowTransform); -} // namespace android +} // namespace Service::android diff --git a/src/core/hle/service/vi/display/vi_display.h b/src/core/hle/service/vi/display/vi_display.h index 9cf324395..e93d084ee 100644 --- a/src/core/hle/service/vi/display/vi_display.h +++ b/src/core/hle/service/vi/display/vi_display.h @@ -15,7 +15,7 @@ namespace Kernel { class KEvent; } -namespace android { +namespace Service::android { class BufferQueueProducer; } diff --git a/src/core/hle/service/vi/layer/vi_layer.h b/src/core/hle/service/vi/layer/vi_layer.h index 079ec4dda..c28b14450 100644 --- a/src/core/hle/service/vi/layer/vi_layer.h +++ b/src/core/hle/service/vi/layer/vi_layer.h @@ -8,11 +8,11 @@ #include "common/common_types.h" -namespace android { +namespace Service::android { class BufferItemConsumer; class BufferQueueCore; class BufferQueueProducer; -} // namespace android +} // namespace Service::android namespace Service::VI { |