diff options
Diffstat (limited to 'libs/hwui/tests/TestContext.h')
-rw-r--r-- | libs/hwui/tests/TestContext.h | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/libs/hwui/tests/TestContext.h b/libs/hwui/tests/TestContext.h index 8a5d530..7b30fc1 100644 --- a/libs/hwui/tests/TestContext.h +++ b/libs/hwui/tests/TestContext.h @@ -17,17 +17,39 @@ #ifndef TESTCONTEXT_H #define TESTCONTEXT_H -#include <ui/DisplayInfo.h> +#include <gui/DisplayEventReceiver.h> +#include <gui/ISurfaceComposer.h> +#include <gui/SurfaceComposerClient.h> #include <gui/SurfaceControl.h> +#include <gui/Surface.h> +#include <ui/DisplayInfo.h> +#include <utils/Looper.h> + +namespace android { +namespace uirenderer { +namespace test { + +extern DisplayInfo gDisplay; +#define dp(x) ((x) * android::uirenderer::test::gDisplay.density) + +class TestContext { +public: + TestContext(); + ~TestContext(); + + sp<Surface> surface(); -extern android::DisplayInfo gDisplay; -#define dp(x) ((x) * gDisplay.density) + void waitForVsync(); -// Initializes all the static globals that are shared across all contexts -// such as display info -void createTestEnvironment(); +private: + sp<SurfaceComposerClient> mSurfaceComposerClient; + sp<SurfaceControl> mSurfaceControl; + DisplayEventReceiver mDisplayEventReceiver; + sp<Looper> mLooper; +}; -// Defaults to fullscreen -android::sp<android::SurfaceControl> createWindow(int width = -1, int height = -1); +} // namespace test +} // namespace uirenderer +} // namespace android #endif |