diff options
| author | 2021-10-06 22:53:36 +0000 | |
|---|---|---|
| committer | 2021-10-06 22:53:36 +0000 | |
| commit | 097d2a50873100486d65a69cb1cbabf37fb3b188 (patch) | |
| tree | c2f19f92e4503b2de0afeebdd9bf7aeb1bb2e9c1 /cmds/flatland/GLHelper.cpp | |
| parent | cbfb18e134845deeace954bbba818acda48cb80f (diff) | |
| parent | adcb6a2733c1baf66e5ad72365965ab504f5f959 (diff) | |
Merge Android 12
Bug: 202323961
Merged-In: Ifb27b3eb12454fa96f07e6797745c697b4f831c4
Change-Id: I2a7f5931477fddb51564c2eabcdc96ce58888ce8
Diffstat (limited to 'cmds/flatland/GLHelper.cpp')
| -rw-r--r-- | cmds/flatland/GLHelper.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp index 3a3df08534..01f7d30a42 100644 --- a/cmds/flatland/GLHelper.cpp +++ b/cmds/flatland/GLHelper.cpp @@ -19,7 +19,7 @@ #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <gui/SurfaceComposerClient.h> -#include <ui/DisplayConfig.h> +#include <ui/DisplayMode.h> namespace android { @@ -227,15 +227,15 @@ bool GLHelper::computeWindowScale(uint32_t w, uint32_t h, float* scale) { return false; } - DisplayConfig config; - status_t err = mSurfaceComposerClient->getActiveDisplayConfig(dpy, &config); + ui::DisplayMode mode; + status_t err = mSurfaceComposerClient->getActiveDisplayMode(dpy, &mode); if (err != NO_ERROR) { - fprintf(stderr, "SurfaceComposer::getActiveDisplayConfig failed: %#x\n", err); + fprintf(stderr, "SurfaceComposer::getActiveDisplayMode failed: %#x\n", err); return false; } - float scaleX = static_cast<float>(config.resolution.getWidth()) / w; - float scaleY = static_cast<float>(config.resolution.getHeight()) / h; + float scaleX = static_cast<float>(mode.resolution.getWidth()) / w; + float scaleY = static_cast<float>(mode.resolution.getHeight()) / h; *scale = scaleX < scaleY ? scaleX : scaleY; return true; |