mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-06-02 02:48:46 +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.
93 lines
4.2 KiB
C++
93 lines
4.2 KiB
C++
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
|
|
#pragma once
|
|
|
|
#include "IDisplayService.h"
|
|
|
|
namespace skyline::service::visrv {
|
|
/**
|
|
* @brief This is used to access the display
|
|
* @url https://switchbrew.org/wiki/Display_services#IApplicationDisplayService
|
|
*/
|
|
class IApplicationDisplayService : public IDisplayService {
|
|
public:
|
|
IApplicationDisplayService(const DeviceState &state, ServiceManager &manager);
|
|
|
|
/**
|
|
* @brief Returns an handle to the 'nvnflinger' service
|
|
* @url https://switchbrew.org/wiki/Display_services#GetRelayService
|
|
*/
|
|
Result GetRelayService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Returns an handle to the 'nvnflinger' service
|
|
* @url https://switchbrew.org/wiki/Display_services#GetIndirectDisplayTransactionService
|
|
*/
|
|
Result GetIndirectDisplayTransactionService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Returns an handle to #ISystemDisplayService
|
|
* @url https://switchbrew.org/wiki/Display_services#GetSystemDisplayService
|
|
*/
|
|
Result GetSystemDisplayService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Returns an handle to #IManagerDisplayService
|
|
* @url https://switchbrew.org/wiki/Display_services#GetManagerDisplayService
|
|
*/
|
|
Result GetManagerDisplayService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Opens up a display using its name as the input
|
|
* @url https://switchbrew.org/wiki/Display_services#OpenDisplay
|
|
*/
|
|
Result OpenDisplay(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Closes an open display using its ID
|
|
* @url https://switchbrew.org/wiki/Display_services#CloseDisplay
|
|
*/
|
|
Result CloseDisplay(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Opens a specific layer on a display
|
|
* @url https://switchbrew.org/wiki/Display_services#OpenLayer
|
|
*/
|
|
Result OpenLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Closes a specific layer on a display
|
|
* @url https://switchbrew.org/wiki/Display_services#CloseLayer
|
|
*/
|
|
Result CloseLayer(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Sets the scaling mode for a window, this is not required by emulators
|
|
* @url https://switchbrew.org/wiki/Display_services#SetLayerScalingMode
|
|
*/
|
|
Result SetLayerScalingMode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
/**
|
|
* @brief Returns a handle to a KEvent which is triggered every time a frame is drawn
|
|
* @url https://switchbrew.org/wiki/Display_services#GetDisplayVsyncEvent
|
|
*/
|
|
Result GetDisplayVsyncEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
|
|
|
SERVICE_DECL(
|
|
SFUNC(0x64, IApplicationDisplayService, GetRelayService),
|
|
SFUNC(0x65, IApplicationDisplayService, GetSystemDisplayService),
|
|
SFUNC(0x66, IApplicationDisplayService, GetManagerDisplayService),
|
|
SFUNC(0x67, IApplicationDisplayService, GetIndirectDisplayTransactionService),
|
|
SFUNC(0x3F2, IApplicationDisplayService, OpenDisplay),
|
|
SFUNC(0x3FC, IApplicationDisplayService, CloseDisplay),
|
|
SFUNC(0x7E4, IApplicationDisplayService, OpenLayer),
|
|
SFUNC(0x7E5, IApplicationDisplayService, CloseLayer),
|
|
SFUNC_BASE(0x7EE, IApplicationDisplayService, IDisplayService, CreateStrayLayer),
|
|
SFUNC_BASE(0x7EF, IApplicationDisplayService, IDisplayService, DestroyStrayLayer),
|
|
SFUNC(0x835, IApplicationDisplayService, SetLayerScalingMode),
|
|
SFUNC(0x1452, IApplicationDisplayService, GetDisplayVsyncEvent)
|
|
)
|
|
};
|
|
}
|