summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvnflinger
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nvnflinger')
-rw-r--r--src/core/hle/service/nvnflinger/binder.h5
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_producer.cpp9
-rw-r--r--src/core/hle/service/nvnflinger/buffer_queue_producer.h3
3 files changed, 12 insertions, 5 deletions
diff --git a/src/core/hle/service/nvnflinger/binder.h b/src/core/hle/service/nvnflinger/binder.h
index aef1477e3..179938192 100644
--- a/src/core/hle/service/nvnflinger/binder.h
+++ b/src/core/hle/service/nvnflinger/binder.h
@@ -6,6 +6,8 @@
#pragma once
+#include <span>
+
#include "common/common_types.h"
namespace Kernel {
@@ -38,7 +40,8 @@ enum class TransactionId {
class IBinder {
public:
virtual ~IBinder() = default;
- virtual void Transact(HLERequestContext& ctx, android::TransactionId code, u32 flags) = 0;
+ virtual void Transact(android::TransactionId code, u32 flags, std::span<const u8> parcel_data,
+ std::span<u8> parcel_reply) = 0;
virtual Kernel::KReadableEvent& GetNativeHandle() = 0;
};
diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp
index 5d8762d25..ec83beb9b 100644
--- a/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp
+++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.cpp
@@ -807,9 +807,10 @@ Status BufferQueueProducer::SetPreallocatedBuffer(s32 slot,
return Status::NoError;
}
-void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u32 flags) {
+void BufferQueueProducer::Transact(TransactionId code, u32 flags, std::span<const u8> parcel_data,
+ std::span<u8> parcel_reply) {
Status status{Status::NoError};
- InputParcel parcel_in{ctx.ReadBuffer()};
+ InputParcel parcel_in{parcel_data};
OutputParcel parcel_out{};
switch (code) {
@@ -917,7 +918,9 @@ void BufferQueueProducer::Transact(HLERequestContext& ctx, TransactionId code, u
parcel_out.Write(status);
- ctx.WriteBuffer(parcel_out.Serialize());
+ const auto serialized = parcel_out.Serialize();
+ std::memcpy(parcel_reply.data(), serialized.data(),
+ std::min(parcel_reply.size(), serialized.size()));
}
Kernel::KReadableEvent& BufferQueueProducer::GetNativeHandle() {
diff --git a/src/core/hle/service/nvnflinger/buffer_queue_producer.h b/src/core/hle/service/nvnflinger/buffer_queue_producer.h
index 64c17d56c..4682b0f84 100644
--- a/src/core/hle/service/nvnflinger/buffer_queue_producer.h
+++ b/src/core/hle/service/nvnflinger/buffer_queue_producer.h
@@ -47,7 +47,8 @@ public:
Service::Nvidia::NvCore::NvMap& nvmap_);
~BufferQueueProducer();
- void Transact(HLERequestContext& ctx, android::TransactionId code, u32 flags) override;
+ void Transact(android::TransactionId code, u32 flags, std::span<const u8> parcel_data,
+ std::span<u8> parcel_reply) override;
Kernel::KReadableEvent& GetNativeHandle() override;