mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-08-10 15:32:33 -07:00
service/vi/vi_layer: Convert Layer struct into a class
Like the previous changes made to the Display struct, this prepares the Layer struct for changes to its interface. Given Layer will be given more invariants in the future, we convert it into a class to better signify that.
This commit is contained in:
@@ -48,7 +48,7 @@ void Display::CreateLayer(u64 id, std::shared_ptr<NVFlinger::BufferQueue> buffer
|
||||
|
||||
Layer* Display::FindLayer(u64 id) {
|
||||
const auto itr = std::find_if(layers.begin(), layers.end(),
|
||||
[id](const VI::Layer& layer) { return layer.id == id; });
|
||||
[id](const VI::Layer& layer) { return layer.GetID() == id; });
|
||||
|
||||
if (itr == layers.end()) {
|
||||
return nullptr;
|
||||
@@ -59,7 +59,7 @@ Layer* Display::FindLayer(u64 id) {
|
||||
|
||||
const Layer* Display::FindLayer(u64 id) const {
|
||||
const auto itr = std::find_if(layers.begin(), layers.end(),
|
||||
[id](const VI::Layer& layer) { return layer.id == id; });
|
||||
[id](const VI::Layer& layer) { return layer.GetID() == id; });
|
||||
|
||||
if (itr == layers.end()) {
|
||||
return nullptr;
|
||||
|
@@ -16,7 +16,7 @@ class BufferQueue;
|
||||
|
||||
namespace Service::VI {
|
||||
|
||||
struct Layer;
|
||||
class Layer;
|
||||
|
||||
/// Represents a single display type
|
||||
class Display {
|
||||
|
Reference in New Issue
Block a user