summaryrefslogtreecommitdiff
path: root/kms++util/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2020-05-17 21:36:59 +0300
committerGitHub <noreply@github.com>2020-05-17 21:36:59 +0300
commit0d1709762320459496c55a2dac09974caa7a0ba5 (patch)
treee08f73a594c079bd4742c709e318f9a0279be526 /kms++util/src
parent36f42004d8f084775efd92a559996ecaeefb0cda (diff)
parent1a651be7a46073b1095a492d497bd089e9242087 (diff)
Merge pull request #53 from matthoosier-garmin/resmgr-release-methods
resmgr: add release() methods
Diffstat (limited to 'kms++util/src')
-rw-r--r--kms++util/src/resourcemanager.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/kms++util/src/resourcemanager.cpp b/kms++util/src/resourcemanager.cpp
index 9a8a66b..5a9f016 100644
--- a/kms++util/src/resourcemanager.cpp
+++ b/kms++util/src/resourcemanager.cpp
@@ -104,6 +104,11 @@ Connector* ResourceManager::reserve_connector(Connector* conn)
return conn;
}
+void ResourceManager::release_connector(Connector* conn)
+{
+ m_reserved_connectors.erase(conn);
+}
+
Crtc* ResourceManager::reserve_crtc(Connector* conn)
{
if (!conn)
@@ -138,6 +143,11 @@ Crtc* ResourceManager::reserve_crtc(Crtc* crtc)
return crtc;
}
+void ResourceManager::release_crtc(Crtc* crtc)
+{
+ m_reserved_crtcs.erase(crtc);
+}
+
Plane* ResourceManager::reserve_plane(Crtc* crtc, PlaneType type, PixelFormat format)
{
if (!crtc)
@@ -204,3 +214,8 @@ Plane* ResourceManager::reserve_overlay_plane(Crtc* crtc, PixelFormat format)
{
return reserve_plane(crtc, PlaneType::Overlay, format);
}
+
+void ResourceManager::release_plane(Plane* plane)
+{
+ m_reserved_planes.erase(plane);
+}