Browse Source
Merge pull request #2142 from lioncash/relocate
Merge pull request #2142 from lioncash/relocate
service/nvflinger: Relocate definitions of Layer and Display to the vi servicepull/15/merge
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 123 additions and 57 deletions
-
4src/core/CMakeLists.txt
-
44src/core/hle/service/nvflinger/nvflinger.cpp
-
43src/core/hle/service/nvflinger/nvflinger.h
-
22src/core/hle/service/vi/display/vi_display.cpp
-
28src/core/hle/service/vi/display/vi_display.h
-
14src/core/hle/service/vi/layer/vi_layer.cpp
-
25src/core/hle/service/vi/layer/vi_layer.h
@ -0,0 +1,22 @@ |
|||||
|
// Copyright 2019 yuzu emulator team
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include <fmt/format.h>
|
||||
|
|
||||
|
#include "core/core.h"
|
||||
|
#include "core/hle/kernel/readable_event.h"
|
||||
|
#include "core/hle/service/vi/display/vi_display.h"
|
||||
|
#include "core/hle/service/vi/layer/vi_layer.h"
|
||||
|
|
||||
|
namespace Service::VI { |
||||
|
|
||||
|
Display::Display(u64 id, std::string name) : id{id}, name{std::move(name)} { |
||||
|
auto& kernel = Core::System::GetInstance().Kernel(); |
||||
|
vsync_event = Kernel::WritableEvent::CreateEventPair(kernel, Kernel::ResetType::Sticky, |
||||
|
fmt::format("Display VSync Event {}", id)); |
||||
|
} |
||||
|
|
||||
|
Display::~Display() = default; |
||||
|
|
||||
|
} // namespace Service::VI
|
||||
@ -0,0 +1,28 @@ |
|||||
|
// Copyright 2019 yuzu emulator team |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include <string> |
||||
|
#include <vector> |
||||
|
|
||||
|
#include "common/common_types.h" |
||||
|
#include "core/hle/kernel/writable_event.h" |
||||
|
|
||||
|
namespace Service::VI { |
||||
|
|
||||
|
struct Layer; |
||||
|
|
||||
|
struct Display { |
||||
|
Display(u64 id, std::string name); |
||||
|
~Display(); |
||||
|
|
||||
|
u64 id; |
||||
|
std::string name; |
||||
|
|
||||
|
std::vector<Layer> layers; |
||||
|
Kernel::EventPair vsync_event; |
||||
|
}; |
||||
|
|
||||
|
} // namespace Service::VI |
||||
@ -0,0 +1,14 @@ |
|||||
|
// Copyright 2019 yuzu emulator team
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include "core/hle/service/vi/layer/vi_layer.h"
|
||||
|
|
||||
|
namespace Service::VI { |
||||
|
|
||||
|
Layer::Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue) |
||||
|
: id{id}, buffer_queue{std::move(queue)} {} |
||||
|
|
||||
|
Layer::~Layer() = default; |
||||
|
|
||||
|
} // namespace Service::VI
|
||||
@ -0,0 +1,25 @@ |
|||||
|
// Copyright 2019 yuzu emulator team |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include <memory> |
||||
|
|
||||
|
#include "common/common_types.h" |
||||
|
|
||||
|
namespace Service::NVFlinger { |
||||
|
class BufferQueue; |
||||
|
} |
||||
|
|
||||
|
namespace Service::VI { |
||||
|
|
||||
|
struct Layer { |
||||
|
Layer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> queue); |
||||
|
~Layer(); |
||||
|
|
||||
|
u64 id; |
||||
|
std::shared_ptr<NVFlinger::BufferQueue> buffer_queue; |
||||
|
}; |
||||
|
|
||||
|
} // namespace Service::VI |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue