diff options
author | Alec Mouri <alecmouri@google.com> | 2019-10-25 16:18:16 -0700 |
---|---|---|
committer | Alec Mouri <alecmouri@google.com> | 2019-10-25 16:18:16 -0700 |
commit | da819e47f14657c6eddf4905da99b92743aaa2c0 (patch) | |
tree | 991cbe6de0c62e8e6292d53ab7ba45e79151f9f9 /libs/hwui/tests | |
parent | 8018eeace2a71c598e8da678845f960314acceea (diff) |
[HWUI] Use ANativeWindow_get{Height, Width}
gui/Surface will eventually be removed since HWUI needs to depend on a
stable ABI, so use the NDK methods for querying width and height that
operates on ANativeWindow instead.
Bug: 137012798
Test: builds
Change-Id: I1309e31992190e7b44c6ea83f962f372b6b0afcf
Diffstat (limited to 'libs/hwui/tests')
-rw-r--r-- | libs/hwui/tests/unit/SkiaDisplayListTests.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp index 6fb164a99ae4..7d999c43b560 100644 --- a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp +++ b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp @@ -208,9 +208,8 @@ RENDERTHREAD_SKIA_PIPELINE_TEST(SkiaDisplayList, prepareListAndChildren_vdOffscr test::TestContext testContext; testContext.setRenderOffscreen(true); auto surface = testContext.surface(); - int width, height; - surface->query(NATIVE_WINDOW_WIDTH, &width); - surface->query(NATIVE_WINDOW_HEIGHT, &height); + int width = ANativeWindow_getWidth(surface.get()); + int height = ANativeWindow_getHeight(surface.get()); canvasContext->setSurface(std::move(surface)); TreeInfo info(TreeInfo::MODE_FULL, *canvasContext.get()); |