mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-06-02 02:28:45 +02:00
fe5061a8e0
This addresses all CR comments including more codebase-wide changes arising from certain review comments like proper usage of its/it's and consistent contraction of it is into it's. An overhaul was made to the presentation and formatting of `KThread.h` and `LoadBalance` works has been superseded by `GetOptimalCoreForThread` which can be used alongside `InsertThread` or `MigrateToCore`. It makes the API far more atomic and neater. This was a major point of contention for the design prior, it's simplified some code and potentially improved performance.
47 lines
1.9 KiB
C++
47 lines
1.9 KiB
C++
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
|
|
#pragma once
|
|
|
|
#include <services/serviceman.h>
|
|
|
|
namespace skyline::service::hosbinder {
|
|
class GraphicBufferProducer;
|
|
|
|
/**
|
|
* @brief nvnflinger:dispdrv or nns::hosbinder::IHOSBinderDriver is a translation layer between Android Binder IPC and HOS IPC to communicate with the Android display stack
|
|
*/
|
|
class IHOSBinderDriver : public BaseService {
|
|
private:
|
|
std::shared_ptr<GraphicBufferProducer> producer;
|
|
|
|
public:
|
|
IHOSBinderDriver(const DeviceState &state, ServiceManager &manager);
|
|
|
|
/**
|
|
* @brief Emulates the transaction of parcels between a IGraphicBufferProducer and the application
|
|
* @url https://switchbrew.org/wiki/Nvnflinger_services#TransactParcel
|
|
*/
|
|
Result TransactParcel(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Adjusts the reference counts to the underlying binder, it's stubbed as we aren't using the real symbols
|
|
* @url https://switchbrew.org/wiki/Nvnflinger_services#AdjustRefcount
|
|
*/
|
|
Result AdjustRefcount(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Adjusts the reference counts to the underlying binder, it's stubbed as we aren't using the real symbols
|
|
* @url https://switchbrew.org/wiki/Nvnflinger_services#GetNativeHandle
|
|
*/
|
|
Result GetNativeHandle(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
SERVICE_DECL(
|
|
SFUNC(0x0, IHOSBinderDriver, TransactParcel),
|
|
SFUNC(0x1, IHOSBinderDriver, AdjustRefcount),
|
|
SFUNC(0x2, IHOSBinderDriver, GetNativeHandle),
|
|
SFUNC(0x3, IHOSBinderDriver, TransactParcel)
|
|
)
|
|
};
|
|
}
|