diff options
Diffstat (limited to 'tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/UiBenchGLTextureViewMicrobenchmark.java')
-rw-r--r-- | tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/UiBenchGLTextureViewMicrobenchmark.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/UiBenchGLTextureViewMicrobenchmark.java b/tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/UiBenchGLTextureViewMicrobenchmark.java new file mode 100644 index 000000000..1c5543843 --- /dev/null +++ b/tests/microbenchmarks/uibench/src/com/android/uibench/microbenchmark/UiBenchGLTextureViewMicrobenchmark.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.uibench.microbenchmark; + +import android.os.SystemClock; +import android.platform.helpers.HelperAccessor; +import android.platform.test.microbenchmark.Microbenchmark; +import android.platform.test.rule.NaturalOrientationRule; + +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(Microbenchmark.class) +public class UiBenchGLTextureViewMicrobenchmark { + @ClassRule public static NaturalOrientationRule orientationRule = new NaturalOrientationRule(); + + private static HelperAccessor<IUiBenchJankHelper> sHelper = + new HelperAccessor<>(IUiBenchJankHelper.class); + + @BeforeClass + public static void openApp() { + sHelper.get().openGLTextureView(); + } + + @Test + public void testGLTextureView() { + SystemClock.sleep(UiBenchJankHelper.FULL_TEST_DURATION); + } + + @AfterClass + public static void closeApp() { + sHelper.get().exit(); + } +} |