1 #ifndef _GLCANDROIDTESTACTIVITY_HPP
2 #define _GLCANDROIDTESTACTIVITY_HPP
3 /*-------------------------------------------------------------------------
4 * OpenGL Conformance Test Suite
5 * -----------------------------
7 * Copyright (c) 2016 Google Inc.
8 * Copyright (c) 2016 The Khronos Group Inc.
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
24 * \brief CTS Android Activity.
25 */ /*-------------------------------------------------------------------*/
27 #include "glcTestRunner.hpp"
28 #include "gluRenderContext.hpp"
29 #include "tcuAndroidAssets.hpp"
30 #include "tcuAndroidPlatform.hpp"
31 #include "tcuAndroidRenderActivity.hpp"
32 #include "tcuCommandLine.hpp"
33 #include "tcuDefs.hpp"
34 #include "tcuTestLog.hpp"
41 class TestThread : public tcu::Android::RenderThread
44 TestThread(tcu::Android::NativeActivity& nativeActivity, tcu::Android::AssetArchive& archive,
45 const std::string& logPath, glu::ApiType runType, deUint32 runFlags);
51 virtual void onWindowCreated(ANativeWindow* window);
52 virtual void onWindowResized(ANativeWindow* window);
53 virtual void onWindowDestroyed(ANativeWindow* window);
54 virtual bool render(void);
56 tcu::Android::Platform m_platform;
57 tcu::Android::AssetArchive& m_archive;
59 bool m_finished; //!< Is execution finished.
62 class TestActivity : public tcu::Android::RenderActivity
65 TestActivity(ANativeActivity* nativeActivity, glu::ApiType runType);
68 virtual void onStart(void);
69 virtual void onDestroy(void);
70 virtual void onConfigurationChanged(void);
73 tcu::Android::AssetArchive m_archive;
74 tcu::CommandLine m_cmdLine;
75 TestThread m_testThread;
82 #endif // _GLCANDROIDTESTACTIVITY_HPP