diff options
Diffstat (limited to 'libs/hwui/tests/common/TestContext.h')
-rw-r--r-- | libs/hwui/tests/common/TestContext.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/hwui/tests/common/TestContext.h b/libs/hwui/tests/common/TestContext.h index 116d4de8090a..a012ecb1a1d3 100644 --- a/libs/hwui/tests/common/TestContext.h +++ b/libs/hwui/tests/common/TestContext.h @@ -23,20 +23,25 @@ #include <gui/Surface.h> #include <gui/SurfaceComposerClient.h> #include <gui/SurfaceControl.h> +#include <ui/DisplayConfig.h> #include <ui/DisplayInfo.h> #include <utils/Looper.h> #include <atomic> #include <thread> +#define dp(x) ((x) * android::uirenderer::test::getDisplayInfo().density) + namespace android { namespace uirenderer { namespace test { -extern DisplayInfo gDisplay; -#define dp(x) ((x)*android::uirenderer::test::gDisplay.density) +const DisplayInfo& getDisplayInfo(); +const DisplayConfig& getActiveDisplayConfig(); -DisplayInfo getInternalDisplay(); +inline const ui::Size& getActiveDisplayResolution() { + return getActiveDisplayConfig().resolution; +} class TestContext { public: |