diff options
author | Dominik Laskowski <domlaskowski@google.com> | 2019-11-22 14:13:12 -0800 |
---|---|---|
committer | Dominik Laskowski <domlaskowski@google.com> | 2020-01-29 14:32:45 -0800 |
commit | 69b281d5f3ad61490bd8795795cefaa1f4674401 (patch) | |
tree | d0a6eba2ca9601be501eb9f495c7fca0a9921a23 /libs/hwui/tests/macrobench/TestSceneRunner.cpp | |
parent | a5239e9651e43fd2adf18f024556e4fdfe0e50af (diff) |
Adapt SurfaceControl to libgui API for display info
Bug: 144601064
Test: dumpsys display
Change-Id: I477e0e3126cc15eb5f120610b4e6b6b1568df389
Diffstat (limited to 'libs/hwui/tests/macrobench/TestSceneRunner.cpp')
-rw-r--r-- | libs/hwui/tests/macrobench/TestSceneRunner.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp index 22d5abbd3dbc..3b6baa70db9a 100644 --- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp +++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp @@ -109,16 +109,14 @@ void outputBenchmarkReport(const TestScene::Info& info, const TestScene::Options 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)); |