early-access version 1662
This commit is contained in:
@@ -139,15 +139,15 @@ std::optional<u64> NVFlinger::CreateLayer(u64 display_id) {
|
||||
}
|
||||
|
||||
const u64 layer_id = next_layer_id++;
|
||||
CreateLayerAtId(display, layer_id);
|
||||
CreateLayerAtId(*display, layer_id);
|
||||
return layer_id;
|
||||
}
|
||||
|
||||
void NVFlinger::CreateLayerAtId(VI::Display* display, u64 layer_id) {
|
||||
void NVFlinger::CreateLayerAtId(VI::Display& display, u64 layer_id) {
|
||||
const u32 buffer_queue_id = next_buffer_queue_id++;
|
||||
buffer_queues.emplace_back(
|
||||
std::make_unique<BufferQueue>(system.Kernel(), buffer_queue_id, layer_id));
|
||||
display->CreateLayer(layer_id, *buffer_queues.back());
|
||||
display.CreateLayer(layer_id, *buffer_queues.back());
|
||||
}
|
||||
|
||||
void NVFlinger::CloseLayer(u64 layer_id) {
|
||||
@@ -236,7 +236,7 @@ const VI::Layer* NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
|
||||
return display->FindLayer(layer_id);
|
||||
}
|
||||
|
||||
VI::Layer* Service::NVFlinger::NVFlinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
|
||||
VI::Layer* NVFlinger::FindOrCreateLayer(u64 display_id, u64 layer_id) {
|
||||
auto* const display = FindDisplay(display_id);
|
||||
|
||||
if (display == nullptr) {
|
||||
@@ -247,9 +247,10 @@ VI::Layer* Service::NVFlinger::NVFlinger::FindOrCreateLayer(u64 display_id, u64
|
||||
|
||||
if (layer == nullptr) {
|
||||
LOG_DEBUG(Service, "Layer at id {} not found. Trying to create it.", layer_id);
|
||||
CreateLayerAtId(display, layer_id);
|
||||
CreateLayerAtId(*display, layer_id);
|
||||
return display->FindLayer(layer_id);
|
||||
}
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
||||
|
@@ -61,9 +61,6 @@ public:
|
||||
/// If an invalid display ID is specified, then an empty optional is returned.
|
||||
[[nodiscard]] std::optional<u64> CreateLayer(u64 display_id);
|
||||
|
||||
/// Creates a layer with the specified layer ID in the desired display.
|
||||
void CreateLayerAtId(VI::Display* display, u64 layer_id);
|
||||
|
||||
/// Closes a layer on all displays for the given layer ID.
|
||||
void CloseLayer(u64 layer_id);
|
||||
|
||||
@@ -108,6 +105,9 @@ private:
|
||||
/// To be used when the system expects the specified ID to already exist.
|
||||
[[nodiscard]] VI::Layer* FindOrCreateLayer(u64 display_id, u64 layer_id);
|
||||
|
||||
/// Creates a layer with the specified layer ID in the desired display.
|
||||
void CreateLayerAtId(VI::Display& display, u64 layer_id);
|
||||
|
||||
static void VSyncThread(NVFlinger& nv_flinger);
|
||||
|
||||
void SplitVSync();
|
||||
|
Reference in New Issue
Block a user