diff options
author | Marin Shalamanov <shalamanov@google.com> | 2021-01-29 21:02:08 +0100 |
---|---|---|
committer | Marin Shalamanov <shalamanov@google.com> | 2021-02-05 20:50:20 +0100 |
commit | a7fe3048aaaf8a45337c7355326f2c6b68b70fb0 (patch) | |
tree | 8c784e9a818c84f8e5f5953a41edc20b4f0f0abe /opengl/tests/lib/WindowSurface.cpp | |
parent | c00282a5df6e7c00bec0befcb98fd4ae9e33da43 (diff) |
Rename DisplayConfig to DisplayMode
This CL continues the raneming of display "configs" to
display "modes". The goal of this is to have the same
names as in the java code and the public display APIs.
Additionally in this CL we move DisplayConfig (from libui)
to the namespace android::ui. This is to prevent conflict
with the SurfaceFlinger's internal android::DisplayMode.
This is consistent with the neighboring classes which
are also in the ui namespace.
Also the type of the parameter defaultMode of
{s,g}etDesiredDisplayModeSpecs is changed to size_t
for consistency with the rest of the code. Appropriate
error handling is added for this.
Bug: 159590486
Bug: 179158858
Test: presubmit
Change-Id: I31e5be1f2223a9ec9340789ce3dc5738eceaf40f
Diffstat (limited to 'opengl/tests/lib/WindowSurface.cpp')
-rw-r--r-- | opengl/tests/lib/WindowSurface.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/opengl/tests/lib/WindowSurface.cpp b/opengl/tests/lib/WindowSurface.cpp index dfb9c92b5f..fd4522e757 100644 --- a/opengl/tests/lib/WindowSurface.cpp +++ b/opengl/tests/lib/WindowSurface.cpp @@ -21,7 +21,7 @@ #include <gui/ISurfaceComposer.h> #include <gui/Surface.h> #include <gui/SurfaceComposerClient.h> -#include <ui/DisplayConfig.h> +#include <ui/DisplayMode.h> #include <ui/DisplayState.h> using namespace android; @@ -42,10 +42,10 @@ WindowSurface::WindowSurface() { return; } - DisplayConfig displayConfig; - err = SurfaceComposerClient::getActiveDisplayConfig(displayToken, &displayConfig); + ui::DisplayMode displayMode; + err = SurfaceComposerClient::getActiveDisplayMode(displayToken, &displayMode); if (err != NO_ERROR) { - fprintf(stderr, "ERROR: unable to get active display config\n"); + fprintf(stderr, "ERROR: unable to get active display mode\n"); return; } @@ -56,7 +56,7 @@ WindowSurface::WindowSurface() { return; } - const ui::Size& resolution = displayConfig.resolution; + const ui::Size& resolution = displayMode.resolution; auto width = resolution.getWidth(); auto height = resolution.getHeight(); |