diff options
author | Sean Paul <seanpaul@chromium.org> | 2017-04-12 16:53:34 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-04-12 16:53:34 +0000 |
commit | 805683297861086955782353927db0f016b4d40f (patch) | |
tree | 7ee35f8dbbb62bef4fe0e0c097aeee8069a272ff | |
parent | 6419ef5dd33faef61cb555a0b29c2c316aee21ae (diff) | |
parent | 791ca4e24221292ae6058f76b37d7965ec34047e (diff) | |
download | drm_hwcomposer-805683297861086955782353927db0f016b4d40f.tar.gz |
Merge "drm_hwcomposer: Harvest min/max resolutions from drm" am: 1703d204a7 am: 055874435b
am: 791ca4e242
Change-Id: I64f42d696fd4f3bd0da38615a5ee3347ffddeb45
-rw-r--r-- | drmresources.cpp | 5 | ||||
-rw-r--r-- | drmresources.h | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/drmresources.cpp b/drmresources.cpp index e433239..6b8ed03 100644 --- a/drmresources.cpp +++ b/drmresources.cpp @@ -71,6 +71,11 @@ int DrmResources::Init() { return -ENODEV; } + min_resolution_ = + std::pair<uint32_t, uint32_t>(res->min_width, res->min_height); + max_resolution_ = + std::pair<uint32_t, uint32_t>(res->max_width, res->max_height); + bool found_primary = false; int display_num = 1; diff --git a/drmresources.h b/drmresources.h index 64e6b57..011f87e 100644 --- a/drmresources.h +++ b/drmresources.h @@ -47,6 +47,14 @@ class DrmResources { return planes_; } + std::pair<uint32_t, uint32_t> min_resolution() const { + return min_resolution_; + } + + std::pair<uint32_t, uint32_t> max_resolution() const { + return max_resolution_; + } + DrmConnector *GetConnectorForDisplay(int display) const; DrmCrtc *GetCrtcForDisplay(int display) const; DrmPlane *GetPlane(uint32_t id) const; @@ -83,6 +91,9 @@ class DrmResources { std::vector<std::unique_ptr<DrmPlane>> planes_; DrmCompositor compositor_; DrmEventListener event_listener_; + + std::pair<uint32_t, uint32_t> min_resolution_; + std::pair<uint32_t, uint32_t> max_resolution_; }; } |