Adapt SurfaceControl to libgui API for display info

Bug: 144601064
Test: dumpsys display
Change-Id: I477e0e3126cc15eb5f120610b4e6b6b1568df389
diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
index 22d5abb..3b6baa7 100644
--- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp
+++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
@@ -109,16 +109,14 @@
 
 void run(const TestScene::Info& info, const TestScene::Options& opts,
          benchmark::BenchmarkReporter* reporter) {
-    // Switch to the real display
-    gDisplay = getInternalDisplay();
-
     Properties::forceDrawFrame = true;
     TestContext testContext;
     testContext.setRenderOffscreen(opts.renderOffscreen);
 
     // create the native surface
-    const int width = gDisplay.w;
-    const int height = gDisplay.h;
+    const ui::Size& resolution = getActiveDisplayResolution();
+    const int width = resolution.getWidth();
+    const int height = resolution.getHeight();
     sp<Surface> surface = testContext.surface();
 
     std::unique_ptr<TestScene> scene(info.createScene(opts));