|
|
@ -73,7 +73,7 @@ u64 NVFlinger::CreateLayer(u64 display_id) {
|
|
|
|
return layer_id;
|
|
|
|
return layer_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
u32 NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) {
|
|
|
|
u32 NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const {
|
|
|
|
const auto& layer = FindLayer(display_id, layer_id);
|
|
|
|
const auto& layer = FindLayer(display_id, layer_id);
|
|
|
|
return layer.buffer_queue->GetId();
|
|
|
|
return layer.buffer_queue->GetId();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -98,6 +98,14 @@ Display& NVFlinger::FindDisplay(u64 display_id) {
|
|
|
|
return *itr;
|
|
|
|
return *itr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Display& NVFlinger::FindDisplay(u64 display_id) const {
|
|
|
|
|
|
|
|
const auto itr = std::find_if(displays.begin(), displays.end(),
|
|
|
|
|
|
|
|
[&](const Display& display) { return display.id == display_id; });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT(itr != displays.end());
|
|
|
|
|
|
|
|
return *itr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Layer& NVFlinger::FindLayer(u64 display_id, u64 layer_id) {
|
|
|
|
Layer& NVFlinger::FindLayer(u64 display_id, u64 layer_id) {
|
|
|
|
auto& display = FindDisplay(display_id);
|
|
|
|
auto& display = FindDisplay(display_id);
|
|
|
|
|
|
|
|
|
|
|
@ -108,6 +116,16 @@ Layer& NVFlinger::FindLayer(u64 display_id, u64 layer_id) {
|
|
|
|
return *itr;
|
|
|
|
return *itr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Layer& NVFlinger::FindLayer(u64 display_id, u64 layer_id) const {
|
|
|
|
|
|
|
|
const auto& display = FindDisplay(display_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const auto itr = std::find_if(display.layers.begin(), display.layers.end(),
|
|
|
|
|
|
|
|
[&](const Layer& layer) { return layer.id == layer_id; });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ASSERT(itr != display.layers.end());
|
|
|
|
|
|
|
|
return *itr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void NVFlinger::Compose() {
|
|
|
|
void NVFlinger::Compose() {
|
|
|
|
for (auto& display : displays) {
|
|
|
|
for (auto& display : displays) {
|
|
|
|
// Trigger vsync for this display at the end of drawing
|
|
|
|
// Trigger vsync for this display at the end of drawing
|
|
|
|