├── Android.mk ├── CMakeLists.txt ├── LICENSE ├── README.md ├── android ├── CMakeLists.txt ├── camera │ ├── Android.mk │ ├── CallbackNotifier.cpp │ ├── CallbackNotifier.h │ ├── Converters.cpp │ ├── Converters.h │ ├── EmulatedBaseCamera.cpp │ ├── EmulatedBaseCamera.h │ ├── EmulatedCamera.cpp │ ├── EmulatedCamera.h │ ├── EmulatedCamera2.cpp │ ├── EmulatedCamera2.h │ ├── EmulatedCamera3.cpp │ ├── EmulatedCamera3.h │ ├── EmulatedCameraCommon.h │ ├── EmulatedCameraDevice.cpp │ ├── EmulatedCameraDevice.h │ ├── EmulatedCameraFactory.cpp │ ├── EmulatedCameraFactory.h │ ├── EmulatedCameraHal.cpp │ ├── EmulatedCameraHotplugThread.cpp │ ├── EmulatedCameraHotplugThread.h │ ├── EmulatedFakeCamera.cpp │ ├── EmulatedFakeCamera.h │ ├── EmulatedFakeCamera2.cpp │ ├── EmulatedFakeCamera2.h │ ├── EmulatedFakeCamera3.cpp │ ├── EmulatedFakeCamera3.h │ ├── EmulatedFakeCameraDevice.cpp │ ├── EmulatedFakeCameraDevice.h │ ├── EmulatedQemuCamera.cpp │ ├── EmulatedQemuCamera.h │ ├── EmulatedQemuCamera2.cpp │ ├── EmulatedQemuCamera2.h │ ├── EmulatedQemuCameraDevice.cpp │ ├── EmulatedQemuCameraDevice.h │ ├── JpegCompressor.cpp │ ├── JpegCompressor.h │ ├── JpegStub.cpp │ ├── JpegStub.h │ ├── PreviewWindow.cpp │ ├── PreviewWindow.h │ ├── QemuClient.cpp │ ├── QemuClient.h │ └── fake-pipeline2 │ │ ├── Base.h │ │ ├── JpegCompressor.cpp │ │ ├── JpegCompressor.h │ │ ├── Scene.cpp │ │ ├── Scene.h │ │ ├── Sensor.cpp │ │ └── Sensor.h ├── data │ └── etc │ │ └── apns-conf.xml ├── fingerprint │ ├── Android.mk │ └── fingerprint.c ├── fstab.goldfish ├── gps │ ├── Android.mk │ └── gps_qemu.c ├── hwcomposer │ └── hwcomposer.cpp ├── init.goldfish.rc ├── init.goldfish.sh ├── lights │ ├── Android.mk │ └── lights_qemu.c ├── media │ ├── media_codecs.xml │ ├── media_codecs_google_audio.xml │ ├── media_codecs_google_telephony.xml │ ├── media_codecs_google_tv.xml │ ├── media_codecs_google_video.xml │ ├── media_codecs_performance.xml │ └── media_profiles.xml ├── opengl │ ├── Android.mk │ ├── README │ ├── common.mk │ ├── host │ │ └── include │ │ │ └── libOpenglRender │ │ │ └── IOStream.h │ ├── shared │ │ └── OpenglCodecCommon │ │ │ ├── Android.mk │ │ │ ├── ChecksumCalculator.cpp │ │ │ ├── ChecksumCalculator.h │ │ │ ├── ErrorLog.h │ │ │ ├── FixedBuffer.h │ │ │ ├── GLClientState.cpp │ │ │ ├── GLClientState.h │ │ │ ├── GLSharedGroup.cpp │ │ │ ├── GLSharedGroup.h │ │ │ ├── Makefile │ │ │ ├── SmartPtr.h │ │ │ ├── SocketStream.cpp │ │ │ ├── SocketStream.h │ │ │ ├── TcpStream.cpp │ │ │ ├── TcpStream.h │ │ │ ├── codec_defs.h │ │ │ ├── glUtils.cpp │ │ │ ├── glUtils.h │ │ │ └── gl_base_types.h │ ├── system │ │ ├── GLESv1 │ │ │ ├── Android.mk │ │ │ └── gl.cpp │ │ ├── GLESv1_enc │ │ │ ├── Android.mk │ │ │ ├── GLEncoder.cpp │ │ │ ├── GLEncoder.h │ │ │ ├── GLEncoderUtils.cpp │ │ │ ├── GLEncoderUtils.h │ │ │ ├── gl_client_context.cpp │ │ │ ├── gl_client_context.h │ │ │ ├── gl_client_proc.h │ │ │ ├── gl_enc.cpp │ │ │ ├── gl_enc.h │ │ │ ├── gl_entry.cpp │ │ │ ├── gl_ftable.h │ │ │ ├── gl_opcodes.h │ │ │ └── gl_types.h │ │ ├── GLESv2 │ │ │ ├── Android.mk │ │ │ └── gl2.cpp │ │ ├── GLESv2_enc │ │ │ ├── Android.mk │ │ │ ├── GL2Encoder.cpp │ │ │ ├── GL2Encoder.h │ │ │ ├── GL2EncoderUtils.cpp │ │ │ ├── GL2EncoderUtils.h │ │ │ ├── gl2_client_context.cpp │ │ │ ├── gl2_client_context.h │ │ │ ├── gl2_client_proc.h │ │ │ ├── gl2_enc.cpp │ │ │ ├── gl2_enc.h │ │ │ ├── gl2_entry.cpp │ │ │ ├── gl2_ftable.h │ │ │ ├── gl2_opcodes.h │ │ │ └── gl2_types.h │ │ ├── OpenglSystemCommon │ │ │ ├── Android.mk │ │ │ ├── EGLClientIface.h │ │ │ ├── EGLImage.h │ │ │ ├── HostConnection.cpp │ │ │ ├── HostConnection.h │ │ │ ├── QemuPipeStream.cpp │ │ │ ├── QemuPipeStream.h │ │ │ ├── ThreadInfo.cpp │ │ │ ├── ThreadInfo.h │ │ │ └── gralloc_cb.h │ │ ├── egl │ │ │ ├── Android.mk │ │ │ ├── ClientAPIExts.cpp │ │ │ ├── ClientAPIExts.h │ │ │ ├── ClientAPIExts.in │ │ │ ├── egl.cfg │ │ │ ├── egl.cpp │ │ │ ├── eglContext.h │ │ │ ├── eglDisplay.cpp │ │ │ ├── eglDisplay.h │ │ │ └── egl_ftable.h │ │ ├── gralloc │ │ │ ├── Android.mk │ │ │ └── gralloc.cpp │ │ └── renderControl_enc │ │ │ ├── Android.mk │ │ │ ├── README │ │ │ ├── renderControl.attrib │ │ │ ├── renderControl.in │ │ │ ├── renderControl.types │ │ │ ├── renderControl_client_base.h │ │ │ ├── renderControl_client_context.cpp │ │ │ ├── renderControl_client_context.h │ │ │ ├── renderControl_client_proc.h │ │ │ ├── renderControl_enc.cpp │ │ │ ├── renderControl_enc.h │ │ │ ├── renderControl_entry.cpp │ │ │ ├── renderControl_ftable.h │ │ │ ├── renderControl_opcodes.h │ │ │ └── renderControl_types.h │ └── tests │ │ ├── gles_android_wrapper │ │ ├── Android.mk │ │ ├── ApiInitializer.h │ │ ├── CleanSpec.mk │ │ ├── ServerConnection.cpp │ │ ├── ServerConnection.h │ │ ├── ThreadInfo.cpp │ │ ├── ThreadInfo.h │ │ ├── egl.cfg │ │ ├── egl.cpp │ │ ├── egl_dispatch.cpp │ │ ├── egl_dispatch.h │ │ ├── egl_ftable.h │ │ ├── egl_proc.h │ │ ├── gles.cpp │ │ ├── gles_dispatch.cpp │ │ ├── gles_dispatch.h │ │ ├── gles_emul.cfg │ │ ├── gles_ftable.h │ │ ├── gles_proc.h │ │ ├── glesv1_emul_ifc.cpp │ │ └── glesv2_emul_ifc.cpp │ │ └── ut_rendercontrol_enc │ │ ├── Android.mk │ │ ├── ut_rendercontrol.attrib │ │ ├── ut_rendercontrol.in │ │ ├── ut_rendercontrol.types │ │ └── ut_rendercontrol_types.h ├── openvmi-touch.idc ├── openvmid.rc ├── power │ ├── Android.mk │ └── power_qemu.c ├── qemu-props │ ├── Android.mk │ └── qemu-props.c ├── qemud │ ├── Android.mk │ └── qemud.c ├── sensors │ ├── Android.mk │ └── sensors_qemu.c ├── service │ ├── activity_manager_interface.cpp │ ├── activity_manager_interface.h │ ├── android_api_skeleton.cpp │ ├── android_api_skeleton.h │ ├── daemon.cpp │ ├── daemon.h │ ├── host_connector.cpp │ ├── host_connector.h │ ├── local_socket_connection.cpp │ ├── local_socket_connection.h │ ├── main.cpp │ ├── message_processor.cpp │ ├── message_processor.h │ ├── platform_api_stub.cpp │ ├── platform_api_stub.h │ ├── platform_server_proxy.cpp │ ├── platform_server_proxy.h │ ├── platform_service.cpp │ ├── platform_service.h │ ├── platform_service_interface.cpp │ └── platform_service_interface.h ├── ueventd.goldfish.rc └── vibrator │ ├── Android.mk │ └── vibrator_qemu.c ├── cmake ├── FindEGL.cmake ├── FindGLESv2.cmake ├── FindGMock.cmake └── LinuxCrossCompile.cmake ├── docs ├── img │ ├── architecture.png │ ├── image1.png │ ├── image10.png │ ├── image11.png │ ├── image12.png │ ├── image13.png │ ├── image14.png │ ├── image15.png │ ├── image16.png │ ├── image17.png │ ├── image18.png │ ├── image19.jpg │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ ├── image6.png │ ├── image7.png │ ├── image8.png │ ├── image9.png │ └── openvmi.png ├── install.md ├── logo.jpg ├── 云手机使用指导.md ├── 搭建Android镜像编译环境.md └── 编译Android镜像.md ├── external ├── CMakeLists.txt ├── android-emugl │ ├── CMakeLists.txt │ ├── host │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ ├── ETC1 │ │ │ │ └── etc1.h │ │ │ ├── GLES │ │ │ │ ├── gl.h │ │ │ │ ├── glext.h │ │ │ │ └── glplatform.h │ │ │ ├── OpenGLESDispatch │ │ │ │ ├── EGLDispatch.h │ │ │ │ ├── GLESv1Dispatch.h │ │ │ │ ├── GLESv2Dispatch.h │ │ │ │ ├── gldefs.h │ │ │ │ └── gles_functions.h │ │ │ └── libOpenglRender │ │ │ │ └── IOStream.h │ │ ├── libs │ │ │ ├── CMakeLists.txt │ │ │ ├── GLESv1_dec │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── GLESv1Decoder.cpp │ │ │ │ ├── GLESv1Decoder.h │ │ │ │ ├── gles1.addon │ │ │ │ ├── gles1.attrib │ │ │ │ ├── gles1.in │ │ │ │ ├── gles1.types │ │ │ │ └── gles1_types.h │ │ │ ├── GLESv2_dec │ │ │ │ ├── Android.mk │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── GLESv2Decoder.cpp │ │ │ │ ├── GLESv2Decoder.h │ │ │ │ ├── gles2.attrib │ │ │ │ ├── gles2.in │ │ │ │ ├── gles2.types │ │ │ │ └── gles2_types.h │ │ │ ├── libOpenGLESDispatch │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── EGLDispatch.cpp │ │ │ │ ├── GLESv1Dispatch.cpp │ │ │ │ ├── GLESv2Dispatch.cpp │ │ │ │ ├── gles1_extensions.entries │ │ │ │ ├── gles1_only.entries │ │ │ │ ├── gles2_extensions.entries │ │ │ │ ├── gles2_only.entries │ │ │ │ ├── gles3_only.entries │ │ │ │ ├── gles_common.entries │ │ │ │ ├── gles_extensions.entries │ │ │ │ ├── render_egl.entries │ │ │ │ └── render_egl_extensions.entries │ │ │ └── renderControl_dec │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── renderControl.attrib │ │ │ │ ├── renderControl.in │ │ │ │ ├── renderControl.types │ │ │ │ └── renderControl_types.h │ │ └── tools │ │ │ ├── CMakeLists.txt │ │ │ └── emugen │ │ │ ├── ApiGen.cpp │ │ │ ├── ApiGen.h │ │ │ ├── CMakeLists.txt │ │ │ ├── EntryPoint.cpp │ │ │ ├── EntryPoint.h │ │ │ ├── Parser.cpp │ │ │ ├── Parser.h │ │ │ ├── Parser_unittest.cpp │ │ │ ├── README │ │ │ ├── TypeFactory.cpp │ │ │ ├── TypeFactory.h │ │ │ ├── Var.h │ │ │ ├── VarType.h │ │ │ ├── errors.h │ │ │ ├── getopt.c │ │ │ ├── getopt.h │ │ │ ├── main.cpp │ │ │ ├── strUtils.cpp │ │ │ ├── strUtils.h │ │ │ └── tests │ │ │ ├── run-tests.sh │ │ │ └── t.001 │ │ │ ├── expected │ │ │ ├── decoder │ │ │ │ ├── foo_dec.cpp │ │ │ │ ├── foo_dec.h │ │ │ │ ├── foo_opcodes.h │ │ │ │ ├── foo_server_context.cpp │ │ │ │ ├── foo_server_context.h │ │ │ │ └── foo_server_proc.h │ │ │ ├── encoder │ │ │ │ ├── foo_client_context.cpp │ │ │ │ ├── foo_client_context.h │ │ │ │ ├── foo_client_proc.h │ │ │ │ ├── foo_enc.cpp │ │ │ │ ├── foo_enc.h │ │ │ │ ├── foo_entry.cpp │ │ │ │ ├── foo_ftable.h │ │ │ │ └── foo_opcodes.h │ │ │ └── wrapper │ │ │ │ ├── foo_wrapper_context.cpp │ │ │ │ ├── foo_wrapper_context.h │ │ │ │ ├── foo_wrapper_entry.cpp │ │ │ │ └── foo_wrapper_proc.h │ │ │ └── input │ │ │ ├── foo.attrib │ │ │ ├── foo.in │ │ │ └── foo.types │ ├── scripts │ │ └── gen-headers.sh │ └── shared │ │ ├── CMakeLists.txt │ │ ├── OpenglCodecCommon │ │ ├── CMakeLists.txt │ │ ├── ChecksumCalculator.cpp │ │ ├── ChecksumCalculator.h │ │ ├── ChecksumCalculatorThreadInfo.cpp │ │ ├── ChecksumCalculatorThreadInfo.h │ │ ├── ErrorLog.h │ │ ├── GLDecoderContextData.h │ │ ├── Makefile │ │ ├── ProtocolUtils.h │ │ ├── glUtils.cpp │ │ ├── glUtils.h │ │ └── gl_base_types.h │ │ └── emugl │ │ ├── CMakeLists.txt │ │ └── common │ │ ├── CMakeLists.txt │ │ ├── condition_variable.h │ │ ├── condition_variable_unittest.cpp │ │ ├── condition_variable_win32.cpp │ │ ├── crash_reporter.cpp │ │ ├── crash_reporter.h │ │ ├── id_to_object_map.cpp │ │ ├── id_to_object_map.h │ │ ├── id_to_object_map_unittest.cpp │ │ ├── lazy_instance.cpp │ │ ├── lazy_instance.h │ │ ├── lazy_instance_unittest.cpp │ │ ├── logging.cpp │ │ ├── logging.h │ │ ├── message_channel.cpp │ │ ├── message_channel.h │ │ ├── message_channel_unittest.cpp │ │ ├── mutex.h │ │ ├── mutex_unittest.cpp │ │ ├── pod_vector.cpp │ │ ├── pod_vector.h │ │ ├── pod_vector_unittest.cpp │ │ ├── scoped_pointer_vector.h │ │ ├── shared_library.cpp │ │ ├── shared_library.h │ │ ├── shared_library_unittest.cpp │ │ ├── smart_ptr.h │ │ ├── smart_ptr_unittest.cpp │ │ ├── sockets.cpp │ │ ├── sockets.h │ │ ├── stringparsing.cpp │ │ ├── stringparsing.h │ │ ├── stringparsing_unittest.cpp │ │ ├── testing │ │ ├── test_shared_library.cpp │ │ └── test_thread.h │ │ ├── thread.h │ │ ├── thread_pthread.cpp │ │ ├── thread_store.cpp │ │ ├── thread_store.h │ │ ├── thread_store_unittest.cpp │ │ ├── thread_unittest.cpp │ │ ├── thread_win32.cpp │ │ ├── unique_integer_map.h │ │ └── unique_integer_map_unittest.cpp ├── glm │ ├── .gitignore │ ├── CMakeLists.txt │ ├── cmake │ │ ├── glmBuildConfig.cmake.in │ │ └── glmConfig.cmake.in │ ├── copying.txt │ ├── doc │ │ ├── api │ │ │ ├── a00001.html │ │ │ ├── a00001_source.html │ │ │ ├── a00002.html │ │ │ ├── a00002_source.html │ │ │ ├── a00003.html │ │ │ ├── a00003_source.html │ │ │ ├── a00004.html │ │ │ ├── a00004_source.html │ │ │ ├── a00005.html │ │ │ ├── a00005_source.html │ │ │ ├── a00006.html │ │ │ ├── a00006_source.html │ │ │ ├── a00007.html │ │ │ ├── a00007_source.html │ │ │ ├── a00008.html │ │ │ ├── a00008_source.html │ │ │ ├── a00009.html │ │ │ ├── a00009_source.html │ │ │ ├── a00010.html │ │ │ ├── a00010_source.html │ │ │ ├── a00011.html │ │ │ ├── a00011_source.html │ │ │ ├── a00012.html │ │ │ ├── a00012_source.html │ │ │ ├── a00013.html │ │ │ ├── a00013_source.html │ │ │ ├── a00014.html │ │ │ ├── a00014_source.html │ │ │ ├── a00015.html │ │ │ ├── a00015_source.html │ │ │ ├── a00016.html │ │ │ ├── a00016_source.html │ │ │ ├── a00017.html │ │ │ ├── a00017_source.html │ │ │ ├── a00018.html │ │ │ ├── a00018_source.html │ │ │ ├── a00019.html │ │ │ ├── a00019_source.html │ │ │ ├── a00020.html │ │ │ ├── a00020_source.html │ │ │ ├── a00021.html │ │ │ ├── a00021_source.html │ │ │ ├── a00022.html │ │ │ ├── a00022_source.html │ │ │ ├── a00023_source.html │ │ │ ├── a00024.html │ │ │ ├── a00024_source.html │ │ │ ├── a00025.html │ │ │ ├── a00025_source.html │ │ │ ├── a00026.html │ │ │ ├── a00026_source.html │ │ │ ├── a00027.html │ │ │ ├── a00027_source.html │ │ │ ├── a00028.html │ │ │ ├── a00028_source.html │ │ │ ├── a00029.html │ │ │ ├── a00029_source.html │ │ │ ├── a00030.html │ │ │ ├── a00030_source.html │ │ │ ├── a00031.html │ │ │ ├── a00031_source.html │ │ │ ├── a00032.html │ │ │ ├── a00032_source.html │ │ │ ├── a00033.html │ │ │ ├── a00033_source.html │ │ │ ├── a00034.html │ │ │ ├── a00034_source.html │ │ │ ├── a00035.html │ │ │ ├── a00035_source.html │ │ │ ├── a00036.html │ │ │ ├── a00036_source.html │ │ │ ├── a00037.html │ │ │ ├── a00037_source.html │ │ │ ├── a00038.html │ │ │ ├── a00038_source.html │ │ │ ├── a00039.html │ │ │ ├── a00039_source.html │ │ │ ├── a00040.html │ │ │ ├── a00040_source.html │ │ │ ├── a00041.html │ │ │ ├── a00041_source.html │ │ │ ├── a00042.html │ │ │ ├── a00042_source.html │ │ │ ├── a00043.html │ │ │ ├── a00043_source.html │ │ │ ├── a00044.html │ │ │ ├── a00044_source.html │ │ │ ├── a00045.html │ │ │ ├── a00045_source.html │ │ │ ├── a00046.html │ │ │ ├── a00046_source.html │ │ │ ├── a00047.html │ │ │ ├── a00047_source.html │ │ │ ├── a00048.html │ │ │ ├── a00048_source.html │ │ │ ├── a00049.html │ │ │ ├── a00049_source.html │ │ │ ├── a00050.html │ │ │ ├── a00050_source.html │ │ │ ├── a00051.html │ │ │ ├── a00051_source.html │ │ │ ├── a00052_source.html │ │ │ ├── a00053.html │ │ │ ├── a00053_source.html │ │ │ ├── a00054.html │ │ │ ├── a00054_source.html │ │ │ ├── a00055.html │ │ │ ├── a00055_source.html │ │ │ ├── a00056.html │ │ │ ├── a00056_source.html │ │ │ ├── a00057_source.html │ │ │ ├── a00058.html │ │ │ ├── a00058_source.html │ │ │ ├── a00059.html │ │ │ ├── a00059_source.html │ │ │ ├── a00060.html │ │ │ ├── a00060_source.html │ │ │ ├── a00061.html │ │ │ ├── a00061_source.html │ │ │ ├── a00062.html │ │ │ ├── a00062_source.html │ │ │ ├── a00063.html │ │ │ ├── a00063_source.html │ │ │ ├── a00064.html │ │ │ ├── a00064_source.html │ │ │ ├── a00065_source.html │ │ │ ├── a00066.html │ │ │ ├── a00066_source.html │ │ │ ├── a00067.html │ │ │ ├── a00067_source.html │ │ │ ├── a00068.html │ │ │ ├── a00068_source.html │ │ │ ├── a00069.html │ │ │ ├── a00069_source.html │ │ │ ├── a00070.html │ │ │ ├── a00070_source.html │ │ │ ├── a00071.html │ │ │ ├── a00071_source.html │ │ │ ├── a00072.html │ │ │ ├── a00072_source.html │ │ │ ├── a00073.html │ │ │ ├── a00073_source.html │ │ │ ├── a00074.html │ │ │ ├── a00074_source.html │ │ │ ├── a00075.html │ │ │ ├── a00075_source.html │ │ │ ├── a00076.html │ │ │ ├── a00076_source.html │ │ │ ├── a00077.html │ │ │ ├── a00077_source.html │ │ │ ├── a00078.html │ │ │ ├── a00078_source.html │ │ │ ├── a00079.html │ │ │ ├── a00079_source.html │ │ │ ├── a00080.html │ │ │ ├── a00080_source.html │ │ │ ├── a00081.html │ │ │ ├── a00081_source.html │ │ │ ├── a00082.html │ │ │ ├── a00082_source.html │ │ │ ├── a00083.html │ │ │ ├── a00083_source.html │ │ │ ├── a00084.html │ │ │ ├── a00084_source.html │ │ │ ├── a00085.html │ │ │ ├── a00085_source.html │ │ │ ├── a00086.html │ │ │ ├── a00086_source.html │ │ │ ├── a00087.html │ │ │ ├── a00087_source.html │ │ │ ├── a00088.html │ │ │ ├── a00088_source.html │ │ │ ├── a00089_source.html │ │ │ ├── a00090.html │ │ │ ├── a00090_source.html │ │ │ ├── a00091.html │ │ │ ├── a00091_source.html │ │ │ ├── a00092.html │ │ │ ├── a00092_source.html │ │ │ ├── a00093.html │ │ │ ├── a00093_source.html │ │ │ ├── a00094.html │ │ │ ├── a00094_source.html │ │ │ ├── a00095.html │ │ │ ├── a00095_source.html │ │ │ ├── a00096.html │ │ │ ├── a00096_source.html │ │ │ ├── a00097.html │ │ │ ├── a00097_source.html │ │ │ ├── a00098.html │ │ │ ├── a00098_source.html │ │ │ ├── a00099.html │ │ │ ├── a00099_source.html │ │ │ ├── a00100.html │ │ │ ├── a00100_source.html │ │ │ ├── a00101.html │ │ │ ├── a00101_source.html │ │ │ ├── a00102.html │ │ │ ├── a00102_source.html │ │ │ ├── a00103.html │ │ │ ├── a00103_source.html │ │ │ ├── a00104.html │ │ │ ├── a00104_source.html │ │ │ ├── a00105.html │ │ │ ├── a00105_source.html │ │ │ ├── a00106.html │ │ │ ├── a00106_source.html │ │ │ ├── a00107.html │ │ │ ├── a00107_source.html │ │ │ ├── a00108.html │ │ │ ├── a00108_source.html │ │ │ ├── a00109.html │ │ │ ├── a00109_source.html │ │ │ ├── a00110.html │ │ │ ├── a00110_source.html │ │ │ ├── a00111.html │ │ │ ├── a00111_source.html │ │ │ ├── a00112.html │ │ │ ├── a00112_source.html │ │ │ ├── a00113.html │ │ │ ├── a00113_source.html │ │ │ ├── a00114.html │ │ │ ├── a00114_source.html │ │ │ ├── a00115.html │ │ │ ├── a00115_source.html │ │ │ ├── a00116.html │ │ │ ├── a00116_source.html │ │ │ ├── a00117.html │ │ │ ├── a00117_source.html │ │ │ ├── a00118.html │ │ │ ├── a00118_source.html │ │ │ ├── a00119.html │ │ │ ├── a00119_source.html │ │ │ ├── a00120.html │ │ │ ├── a00120_source.html │ │ │ ├── a00121.html │ │ │ ├── a00121_source.html │ │ │ ├── a00122.html │ │ │ ├── a00122_source.html │ │ │ ├── a00123.html │ │ │ ├── a00123_source.html │ │ │ ├── a00124.html │ │ │ ├── a00124_source.html │ │ │ ├── a00125.html │ │ │ ├── a00125_source.html │ │ │ ├── a00126.html │ │ │ ├── a00126_source.html │ │ │ ├── a00127.html │ │ │ ├── a00127_source.html │ │ │ ├── a00128.html │ │ │ ├── a00128_source.html │ │ │ ├── a00129.html │ │ │ ├── a00129_source.html │ │ │ ├── a00130.html │ │ │ ├── a00130_source.html │ │ │ ├── a00131.html │ │ │ ├── a00131_source.html │ │ │ ├── a00132.html │ │ │ ├── a00132_source.html │ │ │ ├── a00133.html │ │ │ ├── a00133_source.html │ │ │ ├── a00134.html │ │ │ ├── a00134_source.html │ │ │ ├── a00135.html │ │ │ ├── a00135_source.html │ │ │ ├── a00136.html │ │ │ ├── a00136_source.html │ │ │ ├── a00137.html │ │ │ ├── a00137_source.html │ │ │ ├── a00138.html │ │ │ ├── a00138_source.html │ │ │ ├── a00139.html │ │ │ ├── a00139_source.html │ │ │ ├── a00140.html │ │ │ ├── a00140_source.html │ │ │ ├── a00141.html │ │ │ ├── a00141_source.html │ │ │ ├── a00142.html │ │ │ ├── a00142_source.html │ │ │ ├── a00143.html │ │ │ ├── a00143_source.html │ │ │ ├── a00144.html │ │ │ ├── a00144_source.html │ │ │ ├── a00145.html │ │ │ ├── a00145_source.html │ │ │ ├── a00151.html │ │ │ ├── a00152.html │ │ │ ├── a00153.html │ │ │ ├── a00154.html │ │ │ ├── a00155.html │ │ │ ├── a00156.html │ │ │ ├── a00157.html │ │ │ ├── a00158.html │ │ │ ├── a00159.html │ │ │ ├── a00160.html │ │ │ ├── a00161.html │ │ │ ├── a00162.html │ │ │ ├── a00163.html │ │ │ ├── a00164.html │ │ │ ├── a00165.html │ │ │ ├── a00166.html │ │ │ ├── a00167.html │ │ │ ├── a00168.html │ │ │ ├── a00169.html │ │ │ ├── a00170.html │ │ │ ├── a00171.html │ │ │ ├── a00172.html │ │ │ ├── a00173.html │ │ │ ├── a00174.html │ │ │ ├── a00175.html │ │ │ ├── a00176.html │ │ │ ├── a00177.html │ │ │ ├── a00178.html │ │ │ ├── a00179.html │ │ │ ├── a00180.html │ │ │ ├── a00181.html │ │ │ ├── a00182.html │ │ │ ├── a00183.html │ │ │ ├── a00184.html │ │ │ ├── a00185.html │ │ │ ├── a00186.html │ │ │ ├── a00187.html │ │ │ ├── a00188.html │ │ │ ├── a00189.html │ │ │ ├── a00190.html │ │ │ ├── a00191.html │ │ │ ├── a00192.html │ │ │ ├── a00193.html │ │ │ ├── a00194.html │ │ │ ├── a00195.html │ │ │ ├── a00196.html │ │ │ ├── a00197.html │ │ │ ├── a00198.html │ │ │ ├── a00199.html │ │ │ ├── a00200.html │ │ │ ├── a00201.html │ │ │ ├── a00202.html │ │ │ ├── a00203.html │ │ │ ├── a00204.html │ │ │ ├── a00205.html │ │ │ ├── a00206.html │ │ │ ├── a00207.html │ │ │ ├── a00208.html │ │ │ ├── a00209.html │ │ │ ├── a00210.html │ │ │ ├── a00211.html │ │ │ ├── a00212.html │ │ │ ├── a00213.html │ │ │ ├── a00214.html │ │ │ ├── a00215.html │ │ │ ├── a00216.html │ │ │ ├── a00217.html │ │ │ ├── a00218.html │ │ │ ├── a00219.html │ │ │ ├── a00220.html │ │ │ ├── a00221.html │ │ │ ├── a00222.html │ │ │ ├── a00223.html │ │ │ ├── a00224.html │ │ │ ├── a00225.html │ │ │ ├── a00226.html │ │ │ ├── a00227.html │ │ │ ├── a00228.html │ │ │ ├── a00229.html │ │ │ ├── a00230.html │ │ │ ├── a00231.html │ │ │ ├── a00232.html │ │ │ ├── a00233.html │ │ │ ├── a00234.html │ │ │ ├── a00235.html │ │ │ ├── a00236.html │ │ │ ├── a00237.html │ │ │ ├── a00238.html │ │ │ ├── a00239.html │ │ │ ├── a00240.html │ │ │ ├── a00241.html │ │ │ ├── arrowdown.png │ │ │ ├── arrowright.png │ │ │ ├── bc_s.png │ │ │ ├── bdwn.png │ │ │ ├── closed.png │ │ │ ├── dir_1f76e953200861345293ade84ac7fb6c.html │ │ │ ├── dir_275089585c7fc1b5fd5d7d42c69cb1da.html │ │ │ ├── dir_577c788b67d63fb3b3b5752bd495d0f2.html │ │ │ ├── dir_5ce58d942b2d0776e17a9a58abc01e04.html │ │ │ ├── dir_7b98f88bffbed4b390b5f8f520d9c08e.html │ │ │ ├── dir_8d176b5b7dd0ae42ea6876078f2bde49.html │ │ │ ├── dir_9440d7c11b99dcd7e5d369c7cf9802fe.html │ │ │ ├── dir_e29b03b892e0e25920d021a614d4db9b.html │ │ │ ├── dir_e529a619cfdec1fa4c331fb042fd332f.html │ │ │ ├── doc.png │ │ │ ├── doxygen.css │ │ │ ├── doxygen.png │ │ │ ├── dynsections.js │ │ │ ├── files.html │ │ │ ├── folderclosed.png │ │ │ ├── folderopen.png │ │ │ ├── index.html │ │ │ ├── logo.png │ │ │ ├── modules.html │ │ │ ├── nav_f.png │ │ │ ├── nav_g.png │ │ │ ├── nav_h.png │ │ │ ├── open.png │ │ │ ├── splitbar.png │ │ │ ├── sync_off.png │ │ │ ├── sync_on.png │ │ │ ├── tab_a.png │ │ │ ├── tab_b.png │ │ │ ├── tab_h.png │ │ │ ├── tab_s.png │ │ │ └── tabs.css │ │ ├── glm.docx │ │ ├── glm.pdf │ │ ├── logo.png │ │ ├── man.doxy │ │ ├── pages.doxy │ │ └── theme │ │ │ ├── doxygen.css │ │ │ └── tabs.css │ ├── glm │ │ ├── CMakeLists.txt │ │ ├── common.hpp │ │ ├── detail │ │ │ ├── _features.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── _noise.hpp │ │ │ ├── _swizzle.hpp │ │ │ ├── _swizzle_func.hpp │ │ │ ├── _vectorize.hpp │ │ │ ├── dummy.cpp │ │ │ ├── func_common.hpp │ │ │ ├── func_common.inl │ │ │ ├── func_exponential.hpp │ │ │ ├── func_exponential.inl │ │ │ ├── func_geometric.hpp │ │ │ ├── func_geometric.inl │ │ │ ├── func_integer.hpp │ │ │ ├── func_integer.inl │ │ │ ├── func_matrix.hpp │ │ │ ├── func_matrix.inl │ │ │ ├── func_packing.hpp │ │ │ ├── func_packing.inl │ │ │ ├── func_trigonometric.hpp │ │ │ ├── func_trigonometric.inl │ │ │ ├── func_vector_relational.hpp │ │ │ ├── func_vector_relational.inl │ │ │ ├── glm.cpp │ │ │ ├── intrinsic_common.hpp │ │ │ ├── intrinsic_common.inl │ │ │ ├── intrinsic_exponential.hpp │ │ │ ├── intrinsic_exponential.inl │ │ │ ├── intrinsic_geometric.hpp │ │ │ ├── intrinsic_geometric.inl │ │ │ ├── intrinsic_integer.hpp │ │ │ ├── intrinsic_integer.inl │ │ │ ├── intrinsic_matrix.hpp │ │ │ ├── intrinsic_matrix.inl │ │ │ ├── intrinsic_trigonometric.hpp │ │ │ ├── intrinsic_trigonometric.inl │ │ │ ├── intrinsic_vector_relational.hpp │ │ │ ├── intrinsic_vector_relational.inl │ │ │ ├── precision.hpp │ │ │ ├── setup.hpp │ │ │ ├── type_float.hpp │ │ │ ├── type_gentype.hpp │ │ │ ├── type_gentype.inl │ │ │ ├── type_half.hpp │ │ │ ├── type_half.inl │ │ │ ├── type_int.hpp │ │ │ ├── type_mat.hpp │ │ │ ├── type_mat.inl │ │ │ ├── type_mat2x2.hpp │ │ │ ├── type_mat2x2.inl │ │ │ ├── type_mat2x3.hpp │ │ │ ├── type_mat2x3.inl │ │ │ ├── type_mat2x4.hpp │ │ │ ├── type_mat2x4.inl │ │ │ ├── type_mat3x2.hpp │ │ │ ├── type_mat3x2.inl │ │ │ ├── type_mat3x3.hpp │ │ │ ├── type_mat3x3.inl │ │ │ ├── type_mat3x4.hpp │ │ │ ├── type_mat3x4.inl │ │ │ ├── type_mat4x2.hpp │ │ │ ├── type_mat4x2.inl │ │ │ ├── type_mat4x3.hpp │ │ │ ├── type_mat4x3.inl │ │ │ ├── type_mat4x4.hpp │ │ │ ├── type_mat4x4.inl │ │ │ ├── type_vec.hpp │ │ │ ├── type_vec.inl │ │ │ ├── type_vec1.hpp │ │ │ ├── type_vec1.inl │ │ │ ├── type_vec2.hpp │ │ │ ├── type_vec2.inl │ │ │ ├── type_vec3.hpp │ │ │ ├── type_vec3.inl │ │ │ ├── type_vec4.hpp │ │ │ ├── type_vec4.inl │ │ │ ├── type_vec4_avx.inl │ │ │ ├── type_vec4_avx2.inl │ │ │ └── type_vec4_sse2.inl │ │ ├── exponential.hpp │ │ ├── ext.hpp │ │ ├── fwd.hpp │ │ ├── geometric.hpp │ │ ├── glm.hpp │ │ ├── gtc │ │ │ ├── bitfield.hpp │ │ │ ├── bitfield.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── constants.hpp │ │ │ ├── constants.inl │ │ │ ├── epsilon.hpp │ │ │ ├── epsilon.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── matrix_access.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_inverse.hpp │ │ │ ├── matrix_inverse.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── noise.hpp │ │ │ ├── noise.inl │ │ │ ├── packing.hpp │ │ │ ├── packing.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── random.hpp │ │ │ ├── random.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── reciprocal.inl │ │ │ ├── round.hpp │ │ │ ├── round.inl │ │ │ ├── type_precision.hpp │ │ │ ├── type_precision.inl │ │ │ ├── type_ptr.hpp │ │ │ ├── type_ptr.inl │ │ │ ├── ulp.hpp │ │ │ ├── ulp.inl │ │ │ ├── vec1.hpp │ │ │ └── vec1.inl │ │ ├── gtx │ │ │ ├── associated_min_max.hpp │ │ │ ├── associated_min_max.inl │ │ │ ├── bit.hpp │ │ │ ├── bit.inl │ │ │ ├── closest_point.hpp │ │ │ ├── closest_point.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── color_space_YCoCg.hpp │ │ │ ├── color_space_YCoCg.inl │ │ │ ├── common.hpp │ │ │ ├── common.inl │ │ │ ├── compatibility.hpp │ │ │ ├── compatibility.inl │ │ │ ├── component_wise.hpp │ │ │ ├── component_wise.inl │ │ │ ├── dual_quaternion.hpp │ │ │ ├── dual_quaternion.inl │ │ │ ├── euler_angles.hpp │ │ │ ├── euler_angles.inl │ │ │ ├── extend.hpp │ │ │ ├── extend.inl │ │ │ ├── extented_min_max.hpp │ │ │ ├── extented_min_max.inl │ │ │ ├── fast_exponential.hpp │ │ │ ├── fast_exponential.inl │ │ │ ├── fast_square_root.hpp │ │ │ ├── fast_square_root.inl │ │ │ ├── fast_trigonometry.hpp │ │ │ ├── fast_trigonometry.inl │ │ │ ├── gradient_paint.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── hash.hpp │ │ │ ├── hash.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── intersect.hpp │ │ │ ├── intersect.inl │ │ │ ├── io.hpp │ │ │ ├── io.inl │ │ │ ├── log_base.hpp │ │ │ ├── log_base.inl │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── matrix_decompose.hpp │ │ │ ├── matrix_decompose.inl │ │ │ ├── matrix_interpolation.hpp │ │ │ ├── matrix_interpolation.inl │ │ │ ├── matrix_major_storage.hpp │ │ │ ├── matrix_major_storage.inl │ │ │ ├── matrix_operation.hpp │ │ │ ├── matrix_operation.inl │ │ │ ├── matrix_query.hpp │ │ │ ├── matrix_query.inl │ │ │ ├── matrix_transform_2d.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── mixed_product.inl │ │ │ ├── norm.hpp │ │ │ ├── norm.inl │ │ │ ├── normal.hpp │ │ │ ├── normal.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── normalize_dot.inl │ │ │ ├── number_precision.hpp │ │ │ ├── number_precision.inl │ │ │ ├── optimum_pow.hpp │ │ │ ├── optimum_pow.inl │ │ │ ├── orthonormalize.hpp │ │ │ ├── orthonormalize.inl │ │ │ ├── perpendicular.hpp │ │ │ ├── perpendicular.inl │ │ │ ├── polar_coordinates.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── projection.hpp │ │ │ ├── projection.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── range.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── raw_data.inl │ │ │ ├── rotate_normalized_axis.hpp │ │ │ ├── rotate_normalized_axis.inl │ │ │ ├── rotate_vector.hpp │ │ │ ├── rotate_vector.inl │ │ │ ├── scalar_multiplication.hpp │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── simd_mat4.hpp │ │ │ ├── simd_mat4.inl │ │ │ ├── simd_quat.hpp │ │ │ ├── simd_quat.inl │ │ │ ├── simd_vec4.hpp │ │ │ ├── simd_vec4.inl │ │ │ ├── spline.hpp │ │ │ ├── spline.inl │ │ │ ├── std_based_type.hpp │ │ │ ├── std_based_type.inl │ │ │ ├── string_cast.hpp │ │ │ ├── string_cast.inl │ │ │ ├── transform.hpp │ │ │ ├── transform.inl │ │ │ ├── transform2.hpp │ │ │ ├── transform2.inl │ │ │ ├── type_aligned.hpp │ │ │ ├── type_aligned.inl │ │ │ ├── vector_angle.hpp │ │ │ ├── vector_angle.inl │ │ │ ├── vector_query.hpp │ │ │ ├── vector_query.inl │ │ │ ├── wrap.hpp │ │ │ └── wrap.inl │ │ ├── integer.hpp │ │ ├── mat2x2.hpp │ │ ├── mat2x3.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x2.hpp │ │ ├── mat3x3.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ ├── mat4x4.hpp │ │ ├── matrix.hpp │ │ ├── packing.hpp │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ └── vector_relational.hpp │ ├── readme.md │ ├── test │ │ ├── .DS_Store │ │ ├── CMakeLists.txt │ │ ├── bug │ │ │ └── CMakeLists.txt │ │ ├── core │ │ │ ├── CMakeLists.txt │ │ │ ├── core_func_common.cpp │ │ │ ├── core_func_exponential.cpp │ │ │ ├── core_func_geometric.cpp │ │ │ ├── core_func_integer.cpp │ │ │ ├── core_func_integer_bit_count.cpp │ │ │ ├── core_func_integer_find_lsb.cpp │ │ │ ├── core_func_integer_find_msb.cpp │ │ │ ├── core_func_matrix.cpp │ │ │ ├── core_func_noise.cpp │ │ │ ├── core_func_packing.cpp │ │ │ ├── core_func_swizzle.cpp │ │ │ ├── core_func_trigonometric.cpp │ │ │ ├── core_func_vector_relational.cpp │ │ │ ├── core_setup_force_cxx98.cpp │ │ │ ├── core_setup_message.cpp │ │ │ ├── core_setup_precision.cpp │ │ │ ├── core_type_cast.cpp │ │ │ ├── core_type_ctor.cpp │ │ │ ├── core_type_float.cpp │ │ │ ├── core_type_int.cpp │ │ │ ├── core_type_length.cpp │ │ │ ├── core_type_length_size.cpp │ │ │ ├── core_type_mat2x2.cpp │ │ │ ├── core_type_mat2x3.cpp │ │ │ ├── core_type_mat2x4.cpp │ │ │ ├── core_type_mat3x2.cpp │ │ │ ├── core_type_mat3x3.cpp │ │ │ ├── core_type_mat3x4.cpp │ │ │ ├── core_type_mat4x2.cpp │ │ │ ├── core_type_mat4x3.cpp │ │ │ ├── core_type_mat4x4.cpp │ │ │ ├── core_type_vec1.cpp │ │ │ ├── core_type_vec2.cpp │ │ │ ├── core_type_vec3.cpp │ │ │ └── core_type_vec4.cpp │ │ ├── external │ │ │ └── gli │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── core │ │ │ │ ├── dummy.cpp │ │ │ │ ├── generate_mipmaps.hpp │ │ │ │ ├── generate_mipmaps.inl │ │ │ │ ├── image2d.hpp │ │ │ │ ├── image2d.inl │ │ │ │ ├── operation.hpp │ │ │ │ ├── operation.inl │ │ │ │ ├── operator.hpp │ │ │ │ ├── operator.inl │ │ │ │ ├── shared_array.hpp │ │ │ │ ├── shared_array.inl │ │ │ │ ├── shared_ptr.hpp │ │ │ │ ├── shared_ptr.inl │ │ │ │ ├── size.hpp │ │ │ │ ├── size.inl │ │ │ │ ├── texture2d.hpp │ │ │ │ ├── texture2d.inl │ │ │ │ ├── texture2d_array.hpp │ │ │ │ ├── texture2d_array.inl │ │ │ │ ├── texture_cube.hpp │ │ │ │ ├── texture_cube.inl │ │ │ │ ├── texture_cube_array.hpp │ │ │ │ └── texture_cube_array.inl │ │ │ │ ├── gli.hpp │ │ │ │ └── gtx │ │ │ │ ├── compression.hpp │ │ │ │ ├── compression.inl │ │ │ │ ├── fetch.hpp │ │ │ │ ├── fetch.inl │ │ │ │ ├── gl_texture2d.hpp │ │ │ │ ├── gl_texture2d.inl │ │ │ │ ├── gradient.hpp │ │ │ │ ├── gradient.inl │ │ │ │ ├── loader.hpp │ │ │ │ ├── loader.inl │ │ │ │ ├── loader_dds10.hpp │ │ │ │ ├── loader_dds10.inl │ │ │ │ ├── loader_dds9.hpp │ │ │ │ ├── loader_dds9.inl │ │ │ │ ├── loader_tga.hpp │ │ │ │ ├── loader_tga.inl │ │ │ │ ├── wavelet.hpp │ │ │ │ └── wavelet.inl │ │ ├── glm.cppcheck │ │ ├── gtc │ │ │ ├── CMakeLists.txt │ │ │ ├── gtc_bitfield.cpp │ │ │ ├── gtc_color_space.cpp │ │ │ ├── gtc_constants.cpp │ │ │ ├── gtc_epsilon.cpp │ │ │ ├── gtc_integer.cpp │ │ │ ├── gtc_matrix_access.cpp │ │ │ ├── gtc_matrix_integer.cpp │ │ │ ├── gtc_matrix_inverse.cpp │ │ │ ├── gtc_matrix_transform.cpp │ │ │ ├── gtc_noise.cpp │ │ │ ├── gtc_packing.cpp │ │ │ ├── gtc_quaternion.cpp │ │ │ ├── gtc_random.cpp │ │ │ ├── gtc_reciprocal.cpp │ │ │ ├── gtc_round.cpp │ │ │ ├── gtc_type_precision.cpp │ │ │ ├── gtc_type_ptr.cpp │ │ │ ├── gtc_ulp.cpp │ │ │ ├── gtc_user_defined_types.cpp │ │ │ └── gtc_vec1.cpp │ │ └── gtx │ │ │ ├── CMakeLists.txt │ │ │ ├── gtx_associated_min_max.cpp │ │ │ ├── gtx_closest_point.cpp │ │ │ ├── gtx_color_space.cpp │ │ │ ├── gtx_color_space_YCoCg.cpp │ │ │ ├── gtx_common.cpp │ │ │ ├── gtx_compatibility.cpp │ │ │ ├── gtx_component_wise.cpp │ │ │ ├── gtx_dual_quaternion.cpp │ │ │ ├── gtx_euler_angle.cpp │ │ │ ├── gtx_extend.cpp │ │ │ ├── gtx_extented_min_max.cpp │ │ │ ├── gtx_fast_exponential.cpp │ │ │ ├── gtx_fast_square_root.cpp │ │ │ ├── gtx_fast_trigonometry.cpp │ │ │ ├── gtx_gradient_paint.cpp │ │ │ ├── gtx_handed_coordinate_space.cpp │ │ │ ├── gtx_int_10_10_10_2.cpp │ │ │ ├── gtx_integer.cpp │ │ │ ├── gtx_intersect.cpp │ │ │ ├── gtx_io.cpp │ │ │ ├── gtx_log_base.cpp │ │ │ ├── gtx_matrix_cross_product.cpp │ │ │ ├── gtx_matrix_decompose.cpp │ │ │ ├── gtx_matrix_interpolation.cpp │ │ │ ├── gtx_matrix_major_storage.cpp │ │ │ ├── gtx_matrix_operation.cpp │ │ │ ├── gtx_matrix_query.cpp │ │ │ ├── gtx_matrix_transform_2d.cpp │ │ │ ├── gtx_mixed_product.cpp │ │ │ ├── gtx_norm.cpp │ │ │ ├── gtx_normal.cpp │ │ │ ├── gtx_normalize_dot.cpp │ │ │ ├── gtx_number_precision.cpp │ │ │ ├── gtx_optimum_pow.cpp │ │ │ ├── gtx_orthonormalize.cpp │ │ │ ├── gtx_perpendicular.cpp │ │ │ ├── gtx_polar_coordinates.cpp │ │ │ ├── gtx_projection.cpp │ │ │ ├── gtx_quaternion.cpp │ │ │ ├── gtx_random.cpp │ │ │ ├── gtx_range.cpp │ │ │ ├── gtx_rotate_normalized_axis.cpp │ │ │ ├── gtx_rotate_vector.cpp │ │ │ ├── gtx_scalar_multiplication.cpp │ │ │ ├── gtx_scalar_relational.cpp │ │ │ ├── gtx_simd_mat4.cpp │ │ │ ├── gtx_simd_vec4.cpp │ │ │ ├── gtx_spline.cpp │ │ │ ├── gtx_string_cast.cpp │ │ │ ├── gtx_type_aligned.cpp │ │ │ ├── gtx_vector_angle.cpp │ │ │ ├── gtx_vector_query.cpp │ │ │ └── gtx_wrap.cpp │ └── util │ │ ├── autoexp.txt │ │ ├── autoexp.vc2010.dat │ │ ├── glm.natvis │ │ └── usertype.dat ├── nsexec │ └── uidmapshift.c ├── process-cpp-minimal │ ├── CMakeLists.txt │ ├── COPYING │ ├── README.md │ ├── include │ │ └── core │ │ │ ├── connection.h │ │ │ ├── posix │ │ │ ├── child_process.h │ │ │ ├── exec.h │ │ │ ├── exit.h │ │ │ ├── fork.h │ │ │ ├── linux │ │ │ │ └── proc │ │ │ │ │ └── process │ │ │ │ │ ├── oom_adj.h │ │ │ │ │ ├── oom_score.h │ │ │ │ │ ├── oom_score_adj.h │ │ │ │ │ ├── stat.h │ │ │ │ │ └── state.h │ │ │ ├── process.h │ │ │ ├── process_group.h │ │ │ ├── signal.h │ │ │ ├── signalable.h │ │ │ ├── standard_stream.h │ │ │ ├── this_process.h │ │ │ ├── visibility.h │ │ │ └── wait.h │ │ │ ├── signal.h │ │ │ └── testing │ │ │ ├── cross_process_sync.h │ │ │ └── fork_and_run.h │ ├── src │ │ ├── CMakeLists.txt │ │ └── core │ │ │ ├── posix │ │ │ ├── CMakeLists.txt │ │ │ ├── backtrace.cpp │ │ │ ├── backtrace.h │ │ │ ├── child_process.cpp │ │ │ ├── exec.cpp │ │ │ ├── fork.cpp │ │ │ ├── linux │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── proc │ │ │ │ │ └── process │ │ │ │ │ ├── oom_adj.cpp │ │ │ │ │ ├── oom_score.cpp │ │ │ │ │ ├── oom_score_adj.cpp │ │ │ │ │ ├── stat.cpp │ │ │ │ │ └── state.cpp │ │ │ ├── process.cpp │ │ │ ├── process_group.cpp │ │ │ ├── signal.cpp │ │ │ ├── signalable.cpp │ │ │ ├── standard_stream.cpp │ │ │ ├── this_process.cpp │ │ │ └── wait.cpp │ │ │ └── testing │ │ │ ├── cross_process_sync.cpp │ │ │ └── fork_and_run.cpp │ └── symbols.map └── xdg │ ├── CMakeLists.txt │ ├── LICENSE │ ├── xdg.cpp │ ├── xdg.h │ └── xdg_test.cpp ├── kernel ├── ashmem │ ├── Makefile │ ├── ashmem.c │ ├── ashmem.h │ ├── deps.c │ └── uapi │ │ └── ashmem.h └── binder │ ├── Makefile │ ├── binder.c │ ├── binder.h │ ├── binder_trace.h │ └── deps.c ├── libs ├── libEGL.so ├── libGLES_CM.so └── libGLESv2.so ├── scripts ├── create-package.sh ├── gen-emugl-entries.py ├── gen-emugl-headers.sh ├── openvmi-bridge.sh └── openvmi-init.sh └── src ├── CMakeLists.txt ├── main.cpp └── openvmi ├── android ├── intent.cpp ├── intent.h ├── ip_config_builder.cpp └── ip_config_builder.h ├── application ├── database.cpp ├── database.h ├── launcher_storage.cpp ├── launcher_storage.h └── manager.h ├── bridge ├── android_api_stub.cpp ├── android_api_stub.h ├── platform_api_skeleton.cpp ├── platform_api_skeleton.h ├── platform_message_processor.cpp └── platform_message_processor.h ├── build └── config.h.in ├── cli.cpp ├── cli.h ├── cmds ├── generate_ip_config.cpp ├── generate_ip_config.h ├── install.cpp ├── install.h ├── session_manager.cpp ├── session_manager.h ├── system_info.cpp ├── system_info.h ├── version.cpp ├── version.h ├── wait_ready.cpp └── wait_ready.h ├── common ├── binary_writer.cpp ├── binary_writer.h ├── dispatcher.cpp ├── dispatcher.h ├── fd.cpp ├── fd.h ├── fd_sets.h ├── loop_device.cpp ├── loop_device.h ├── loop_device_allocator.cpp ├── loop_device_allocator.h ├── message_channel.cpp ├── message_channel.h ├── mount_entry.cpp ├── mount_entry.h ├── scope_ptr.h ├── small_vector.h ├── type_traits.h ├── variable_length_array.h ├── wait_handle.cpp └── wait_handle.h ├── daemon.cpp ├── daemon.h ├── dbus ├── bus.cpp ├── bus.h ├── codecs.h ├── interface.h ├── sd_bus_helpers.c ├── sd_bus_helpers.h ├── sd_bus_helpers.hpp ├── skeleton │ ├── application_manager.cpp │ ├── application_manager.h │ ├── service.cpp │ └── service.h └── stub │ ├── application_manager.cpp │ └── application_manager.h ├── defer_action.h ├── do_not_copy_or_move.h ├── graphics ├── buffer_queue.cpp ├── buffer_queue.h ├── buffered_io_stream.cpp ├── buffered_io_stream.h ├── density.cpp ├── density.h ├── emugl │ ├── ColorBuffer.cpp │ ├── ColorBuffer.h │ ├── DispatchTables.h │ ├── DisplayManager.cpp │ ├── DisplayManager.h │ ├── ReadBuffer.cpp │ ├── ReadBuffer.h │ ├── RenderApi.cpp │ ├── RenderApi.h │ ├── RenderContext.cpp │ ├── RenderContext.h │ ├── RenderControl.cpp │ ├── RenderControl.h │ ├── RenderThread.cpp │ ├── RenderThread.h │ ├── RenderThreadInfo.cpp │ ├── RenderThreadInfo.h │ ├── Renderable.cpp │ ├── Renderable.h │ ├── Renderer.cpp │ ├── Renderer.h │ ├── RendererConfig.cpp │ ├── RendererConfig.h │ ├── TextureDraw.cpp │ ├── TextureDraw.h │ ├── TextureResize.cpp │ ├── TextureResize.h │ ├── TimeUtils.cpp │ ├── TimeUtils.h │ ├── WindowSurface.cpp │ └── WindowSurface.h ├── gl_extensions.h ├── gl_renderer_server.cpp ├── gl_renderer_server.h ├── layer_composer.cpp ├── layer_composer.h ├── multi_window_composer_strategy.cpp ├── multi_window_composer_strategy.h ├── opengles_message_processor.cpp ├── opengles_message_processor.h ├── primitives.h ├── program_family.cpp ├── program_family.h ├── rect.cpp ├── rect.h ├── renderer.h ├── single_window_composer_strategy.cpp └── single_window_composer_strategy.h ├── input ├── device.cpp ├── device.h ├── manager.cpp └── manager.h ├── logger.cpp ├── logger.h ├── network ├── base_socket_messenger.cpp ├── base_socket_messenger.h ├── connection_context.cpp ├── connection_context.h ├── connection_creator.cpp ├── connection_creator.h ├── connections.h ├── connector.h ├── credentials.cpp ├── credentials.h ├── delegate_connection_creator.h ├── delegate_message_processor.cpp ├── delegate_message_processor.h ├── fd_socket_transmission.cpp ├── fd_socket_transmission.h ├── local_socket_messenger.cpp ├── local_socket_messenger.h ├── message_processor.h ├── message_receiver.h ├── message_sender.h ├── published_socket_connector.cpp ├── published_socket_connector.h ├── socket_connection.cpp ├── socket_connection.h ├── socket_helper.cpp ├── socket_helper.h ├── socket_messenger.cpp ├── socket_messenger.h ├── stream_socket_transport.cpp ├── stream_socket_transport.h ├── tcp_socket_connector.cpp ├── tcp_socket_connector.h ├── tcp_socket_messenger.cpp └── tcp_socket_messenger.h ├── not_reachable.cpp ├── not_reachable.h ├── optional.h ├── platform ├── base_platform.cpp ├── base_platform.h ├── null │ ├── platform.cpp │ └── platform.h └── sdl │ ├── keycode_converter.cpp │ ├── keycode_converter.h │ ├── mir_display_connection.cpp │ ├── mir_display_connection.h │ ├── platform.cpp │ ├── platform.h │ ├── sdl_wrapper.h │ ├── window.cpp │ └── window.h ├── protobuf ├── google_protobuf_guard.cpp ├── openvmi_bridge.proto └── openvmi_rpc.proto ├── qemu ├── adb_message_processor.cpp ├── adb_message_processor.h ├── at_parser.cpp ├── at_parser.h ├── boot_properties_message_processor.cpp ├── boot_properties_message_processor.h ├── bootanimation_message_processor.cpp ├── bootanimation_message_processor.h ├── camera_message_processor.cpp ├── camera_message_processor.h ├── fingerprint_message_processor.cpp ├── fingerprint_message_processor.h ├── gsm_message_processor.cpp ├── gsm_message_processor.h ├── hwcontrol_message_processor.cpp ├── hwcontrol_message_processor.h ├── null_message_processor.cpp ├── null_message_processor.h ├── pipe_connection_creator.cpp ├── pipe_connection_creator.h ├── qemud_message_processor.cpp ├── qemud_message_processor.h ├── sensors_message_processor.cpp ├── sensors_message_processor.h ├── telephony_manager.cpp └── telephony_manager.h ├── rotation_status.h ├── rpc ├── channel.cpp ├── channel.h ├── connection_creator.cpp ├── connection_creator.h ├── constants.h ├── make_protobuf_object.h ├── message_processor.cpp ├── message_processor.h ├── pending_call_cache.cpp ├── pending_call_cache.h └── template_message_processor.h ├── runtime.cpp ├── runtime.h ├── sensors ├── sensors_common.h ├── sensors_data.cpp ├── sensors_data.h ├── sensors_manager.cpp ├── sensors_manager.h ├── sensors_message_processor.cpp ├── sensors_message_processor.h ├── sensors_sensor.cpp ├── sensors_sensor.h └── simulated_sensor_data.h ├── system_configuration.cpp ├── system_configuration.h ├── testing └── gtest_utils.h ├── ui ├── splash_screen.cpp └── splash_screen.h ├── utils.cpp ├── utils.h ├── utils ├── environment_file.cpp └── environment_file.h └── wm ├── display.cpp ├── display.h ├── manager.cpp ├── manager.h ├── multi_window_manager.cpp ├── multi_window_manager.h ├── single_window_manager.cpp ├── single_window_manager.h ├── stack.cpp ├── stack.h ├── task.cpp ├── task.h ├── window.cpp ├── window.h ├── window_state.cpp └── window_state.h /README.md: -------------------------------------------------------------------------------- 1 | ![OPENVMI](docs/img/openvmi.png) 2 | # OPENVMI 3 | 4 | ![LOGO](docs/logo.jpg) 5 | 6 | ### 联合开发单位: 7 | 鹏城实验室[(PCL)](https://dw.pcl.ac.cn/#/home/index) 8 | 江苏北弓智能科技有限公司[(Begoit)](http://www.begoit.com/) 9 | 10 | ## 概述 11 | 基于ARM+Linux体系构建的VMI(Virtual Mobile Infrastructure)云平台 12 | ## 架构 13 | ![OPENVMI架构](docs/img/architecture.png) 14 | ### 硬件支持 15 | * 鲲鹏916 16 | * 鲲鹏920 17 | * FT2000+/64(仅支持64位APP运行) 18 | ### 支持的系统版本 19 | * Ubuntu 18.04 20 | * Ubuntu 20.04 21 | ## 安装 22 | 详见[安装说明](docs/install.md) 23 | ## 使用 24 | 详见[使用说明](docs/云手机使用指导.md) 25 | ## 问题反馈 26 | 如果您在使用过程中有疑问,请联系zhoujun@begoit.com 27 | ## 许可协议 28 | 采用GPLv3协议 29 | ## 感谢 30 | 感谢[anbox](https://github.com/anbox/anbox)、[robox](https://github.com/lag-linaro/robox)项目组做的开创性工作 31 | 感谢鹏城实验室[开发者云平台](https://dw.pcl.ac.cn/#/developer/cloud)提供的帮助 32 | 感谢华为在[鲲鹏社区](https://bbs.huaweicloud.com/forum/forumdisplay-fid-931-orderby-lastpost-filter-typeid-typeid-829.html)发布的相关[优化措施](https://code.opensource.huaweicloud.com/Kunpeng/Native/home) 33 | ## 免费适配 34 | ### 免费申请云手机,开展适配测试工作 35 | 注册登陆:https://dw.pcl.ac.cn/#/developer/cloud 36 | 选择”虚拟机“-”云手机软件栈“,申请后根据邮件提示开始适配测试工作 37 | -------------------------------------------------------------------------------- /android/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories( 2 | ${CMAKE_SOURCE_DIR} 3 | ${CMAKE_SOURCE_DIR}/src 4 | ${CMAKE_BINARY_DIR}/src) 5 | 6 | set(OPENVMID_SOURCES 7 | ${CMAKE_SOURCE_DIR}/src/openvmi/rpc/message_processor.cpp 8 | ${CMAKE_SOURCE_DIR}/src/openvmi/rpc/pending_call_cache.cpp 9 | ${CMAKE_SOURCE_DIR}/src/openvmi/common/fd.cpp 10 | service/activity_manager_interface.cpp 11 | service/platform_service.cpp 12 | service/platform_service_interface.cpp 13 | service/platform_api_stub.cpp 14 | service/android_api_skeleton.cpp 15 | service/message_processor.cpp 16 | service/local_socket_connection.cpp 17 | service/host_connector.cpp 18 | service/daemon.cpp 19 | service/main.cpp) 20 | 21 | add_executable(openvmid ${OPENVMID_SOURCES}) 22 | target_link_libraries(openvmid 23 | pthread 24 | process-cpp 25 | openvmi-protobuf) 26 | 27 | set(HWCOMPOSER_SOURCES 28 | hwcomposer/hwcomposer.cpp) 29 | 30 | add_library(hwcomposer.openvmi SHARED ${HWCOMPOSER_SOURCES}) 31 | 32 | # As we're adding Android specific bits in this project we can't 33 | # build this safely within default build anymore. We keep this 34 | # for easy integration into used IDEs. 35 | set_target_properties(openvmid 36 | PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) 37 | 38 | set_target_properties(hwcomposer.openvmi 39 | PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) 40 | 41 | -------------------------------------------------------------------------------- /android/camera/JpegStub.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef JPEGSTUB_H_ 18 | #define JPEGSTUB_H_ 19 | 20 | extern "C" { 21 | 22 | struct JpegStub { 23 | void* mInternalEncoder; 24 | void* mInternalStream; 25 | }; 26 | 27 | void JpegStub_init(JpegStub* stub, int* strides); 28 | void JpegStub_cleanup(JpegStub* stub); 29 | int JpegStub_compress(JpegStub* stub, const void* image, 30 | int width, int height, int quality); 31 | void JpegStub_getCompressedImage(JpegStub* stub, void* buff); 32 | size_t JpegStub_getCompressedSize(JpegStub* stub); 33 | 34 | }; 35 | #endif // JPEGSTUB_H_ 36 | -------------------------------------------------------------------------------- /android/fingerprint/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_MODULE := fingerprint.goldfish 20 | LOCAL_MODULE_RELATIVE_PATH := hw 21 | LOCAL_SRC_FILES := fingerprint.c 22 | LOCAL_SHARED_LIBRARIES := liblog 23 | 24 | include $(BUILD_SHARED_LIBRARY) 25 | 26 | include $(CLEAR_VARS) 27 | 28 | LOCAL_MODULE := fingerprint.ranchu 29 | LOCAL_MODULE_RELATIVE_PATH := hw 30 | LOCAL_SRC_FILES := fingerprint.c 31 | LOCAL_SHARED_LIBRARIES := liblog 32 | 33 | include $(BUILD_SHARED_LIBRARY) 34 | -------------------------------------------------------------------------------- /android/fstab.goldfish: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | -------------------------------------------------------------------------------- /android/lights/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2011 The Android Open Source Project. 2 | # 3 | # Original code licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this software except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | # HAL module implemenation, not prelinked and stored in 18 | # hw/..so 19 | include $(CLEAR_VARS) 20 | LOCAL_MODULE_RELATIVE_PATH := hw 21 | LOCAL_SHARED_LIBRARIES := liblog libcutils 22 | LOCAL_SRC_FILES := lights_qemu.c 23 | LOCAL_MODULE := lights.goldfish 24 | LOCAL_CFLAGS += -DLIGHT_BACKLIGHT 25 | include $(BUILD_SHARED_LIBRARY) 26 | -------------------------------------------------------------------------------- /android/media/media_codecs_google_telephony.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /android/media/media_codecs_google_tv.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/opengl/README: -------------------------------------------------------------------------------- 1 | This directory contains Android-side modules related to hardware OpenGL ES 2 | emulation. The host-side modules and documentation are in 3 | $ANDROID_BUILD_TOP/sdk/emulator/opengl. 4 | 5 | Note that this directory contains encoder sources that are auto-generated 6 | with the 'emugen' host tool (see sdk/emulator/opengl/host/tools/emugen). 7 | 8 | To regenerate them, run external/qemu/distrib/update-emugl-sources.sh, 9 | after building the emulator from sources, this will populate the content 10 | here with the appropriate updated source files. 11 | 12 | You should do this whenever you update one of the *.types, *.in and *.attrib 13 | files located under one of: 14 | 15 | $AOSP/sdk/emulator/opengl/libs/GLESv1_dec/ 16 | $AOSP/sdk/emulator/opengl/libs/GLESv2_dec/ 17 | $AOSP/sdk/emulator/opengl/libs/renderControl_dec/ 18 | 19 | or when the 'emugen' tool itself is modified. 20 | -------------------------------------------------------------------------------- /android/opengl/shared/OpenglCodecCommon/Android.mk: -------------------------------------------------------------------------------- 1 | # This build script corresponds to a library containing many definitions 2 | # common to both the guest and the host. They relate to 3 | # 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | commonSources := \ 7 | GLClientState.cpp \ 8 | ChecksumCalculator.cpp \ 9 | GLSharedGroup.cpp \ 10 | glUtils.cpp \ 11 | SocketStream.cpp \ 12 | TcpStream.cpp \ 13 | 14 | ### CodecCommon guest ############################################## 15 | $(call emugl-begin-static-library,libOpenglCodecCommon) 16 | 17 | LOCAL_SRC_FILES := $(commonSources) 18 | 19 | LOCAL_CFLAGS += -DLOG_TAG=\"eglCodecCommon\" 20 | 21 | $(call emugl-export,SHARED_LIBRARIES,libcutils libutils liblog) 22 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 23 | $(call emugl-end-module) 24 | -------------------------------------------------------------------------------- /android/opengl/shared/OpenglCodecCommon/ErrorLog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _ERROR_LOG_H_ 17 | #define _ERROR_LOG_H_ 18 | 19 | #if defined(__ANDROID__) 20 | # include 21 | # define ERR(...) ALOGE(__VA_ARGS__) 22 | # ifdef EMUGL_DEBUG 23 | # define DBG(...) ALOGD(__VA_ARGS__) 24 | # else 25 | # define DBG(...) ((void)0) 26 | # endif 27 | #else 28 | # include 29 | # define ERR(...) fprintf(stderr, __VA_ARGS__) 30 | # ifdef EMUGL_DEBUG 31 | # define DBG(...) fprintf(stderr, __VA_ARGS__) 32 | # else 33 | # define DBG(...) ((void)0) 34 | # endif 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /android/opengl/shared/OpenglCodecCommon/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ROOT=../.. 3 | 4 | include $(ROOT)/make/commondefs 5 | 6 | CXXFILES = TcpStream.cpp GLClientState.cpp glUtils.cpp 7 | CXXINCS += -I$(ROOT)/libs/GLESv1 -I$(ROOT)/include 8 | 9 | LIBRARY_NAME = libcodecCommon.a 10 | 11 | include $(COMMONRULES) 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/opengl/shared/OpenglCodecCommon/TcpStream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __TCP_STREAM_H 17 | #define __TCP_STREAM_H 18 | 19 | #include "SocketStream.h" 20 | 21 | class TcpStream: public SocketStream { 22 | public: 23 | explicit TcpStream(size_t bufsize = 10000); 24 | virtual int listen(unsigned short port); 25 | virtual SocketStream* accept(); 26 | virtual int connect(unsigned short port); 27 | int connect(const char *hostname, unsigned short port); 28 | private: 29 | TcpStream(int sock, size_t bufSize); 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /android/opengl/shared/OpenglCodecCommon/codec_defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _CODEC_DEFS_H 17 | #define _CODEC_DEFS_H 18 | 19 | #define CODEC_SERVER_PORT 22468 20 | 21 | #define CODEC_MAX_VERTEX_ATTRIBUTES 64 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ### GLESv1 implementation ########################################### 4 | $(call emugl-begin-shared-library,libGLESv1_CM_emulation) 5 | $(call emugl-import,libOpenglSystemCommon libGLESv1_enc lib_renderControl_enc) 6 | 7 | LOCAL_CFLAGS += -DLOG_TAG=\"GLES_emulation\" -DGL_GLEXT_PROTOTYPES 8 | 9 | LOCAL_SRC_FILES := gl.cpp 10 | LOCAL_MODULE_RELATIVE_PATH := egl 11 | 12 | $(call emugl-end-module) 13 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1_enc/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ### GLESv1_enc Encoder ########################################### 4 | $(call emugl-begin-shared-library,libGLESv1_enc) 5 | 6 | LOCAL_CFLAGS += -DLOG_TAG=\"emuglGLESv1_enc\" 7 | 8 | LOCAL_SRC_FILES := \ 9 | GLEncoder.cpp \ 10 | GLEncoderUtils.cpp \ 11 | gl_client_context.cpp \ 12 | gl_enc.cpp \ 13 | gl_entry.cpp 14 | 15 | $(call emugl-import,libOpenglCodecCommon) 16 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 17 | $(call emugl-export,C_INCLUDES,$(intermediates)) 18 | 19 | $(call emugl-end-module) 20 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1_enc/GLEncoderUtils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #include 17 | #include 18 | #include "GLEncoder.h" 19 | 20 | namespace glesv1_enc { 21 | 22 | size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, 23 | GLenum type, int pack) { 24 | GLEncoder *ctx = (GLEncoder*) self; 25 | return ctx->pixelDataSize(width, height, format, type, pack); 26 | } 27 | 28 | } // namespace glesv1_enc 29 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1_enc/GLEncoderUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef GL_ENCODER_UTILS_H 17 | #define GL_ENCODER_UTILS_H 18 | 19 | namespace glesv1_enc { 20 | size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, 21 | GLenum type, int pack); 22 | } 23 | ; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1_enc/gl_enc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_gl_encoder_context_t 5 | #define GUARD_gl_encoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "ChecksumCalculator.h" 9 | #include "gl_client_context.h" 10 | 11 | #include "glUtils.h" 12 | #include "GLEncoderUtils.h" 13 | 14 | struct gl_encoder_context_t: public gl_client_context_t { 15 | 16 | IOStream *m_stream; 17 | ChecksumCalculator *m_checksumCalculator; 18 | 19 | gl_encoder_context_t(IOStream *stream, 20 | ChecksumCalculator *checksumCalculator); 21 | }; 22 | 23 | #endif // GUARD_gl_encoder_context_t 24 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv1_enc/gl_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __GL_TYPES__H 17 | #define __GL_TYPES__H 18 | 19 | #include "gl_base_types.h" 20 | #endif 21 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv2/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ### GLESv2 implementation ########################################### 4 | $(call emugl-begin-shared-library,libGLESv2_emulation) 5 | $(call emugl-import,libOpenglSystemCommon libGLESv2_enc lib_renderControl_enc) 6 | 7 | LOCAL_CFLAGS += -DLOG_TAG=\"GLESv2_emulation\" -DGL_GLEXT_PROTOTYPES 8 | 9 | LOCAL_SRC_FILES := gl2.cpp 10 | LOCAL_MODULE_RELATIVE_PATH := egl 11 | 12 | $(call emugl-end-module) 13 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv2_enc/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ### GLESv2_enc Encoder ########################################### 4 | $(call emugl-begin-shared-library,libGLESv2_enc) 5 | 6 | LOCAL_SRC_FILES := \ 7 | GL2EncoderUtils.cpp \ 8 | GL2Encoder.cpp \ 9 | gl2_client_context.cpp \ 10 | gl2_enc.cpp \ 11 | gl2_entry.cpp 12 | 13 | LOCAL_CFLAGS += -DLOG_TAG=\"emuglGLESv2_enc\" 14 | 15 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 16 | $(call emugl-import,libOpenglCodecCommon) 17 | 18 | $(call emugl-end-module) 19 | 20 | 21 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv2_enc/GL2EncoderUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef GL2_ENCODER_UTILS_H 17 | #define GL2_ENCODER_UTILS_H 18 | 19 | namespace glesv2_enc { 20 | 21 | size_t pixelDataSize(void *self, GLsizei width, GLsizei height, GLenum format, 22 | GLenum type, int pack); 23 | size_t pixelDataSize3D(void *self, GLsizei width, GLsizei height, GLsizei depth, 24 | GLenum format, GLenum type, int pack); 25 | GLenum uniformType(void *self, GLuint program, GLint location); 26 | 27 | } // namespace glesv2_enc 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv2_enc/gl2_enc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_gl2_encoder_context_t 5 | #define GUARD_gl2_encoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "ChecksumCalculator.h" 9 | #include "gl2_client_context.h" 10 | 11 | #include 12 | #include "glUtils.h" 13 | #include "GL2EncoderUtils.h" 14 | 15 | struct gl2_encoder_context_t: public gl2_client_context_t { 16 | 17 | IOStream *m_stream; 18 | ChecksumCalculator *m_checksumCalculator; 19 | 20 | gl2_encoder_context_t(IOStream *stream, 21 | ChecksumCalculator *checksumCalculator); 22 | }; 23 | 24 | #endif // GUARD_gl2_encoder_context_t 25 | -------------------------------------------------------------------------------- /android/opengl/system/GLESv2_enc/gl2_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _GL_2_TYPES_H_ 17 | #define _GL_2_TYPES_H_ 18 | #include "gl_base_types.h" 19 | 20 | typedef void *GLvoidptr; 21 | #endif 22 | -------------------------------------------------------------------------------- /android/opengl/system/OpenglSystemCommon/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | $(call emugl-begin-shared-library,libOpenglSystemCommon) 4 | $(call emugl-import,libGLESv1_enc libGLESv2_enc lib_renderControl_enc) 5 | 6 | LOCAL_SRC_FILES := \ 7 | HostConnection.cpp \ 8 | QemuPipeStream.cpp \ 9 | ThreadInfo.cpp 10 | 11 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH) bionic/libc/private) 12 | 13 | $(call emugl-end-module) 14 | -------------------------------------------------------------------------------- /android/opengl/system/OpenglSystemCommon/EGLImage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __COMMON_EGL_IMAGE_H 17 | #define __COMMON_EGL_IMAGE_H 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | struct EGLImage_t { 25 | EGLDisplay dpy; 26 | EGLenum target; 27 | 28 | union { 29 | android_native_buffer_t *native_buffer; 30 | uint32_t host_egl_image; 31 | }; 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /android/opengl/system/OpenglSystemCommon/ThreadInfo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #include "ThreadInfo.h" 17 | #include "cutils/threads.h" 18 | 19 | thread_store_t s_tls = THREAD_STORE_INITIALIZER; 20 | 21 | static void tlsDestruct(void *ptr) { 22 | if (ptr) { 23 | EGLThreadInfo *ti = (EGLThreadInfo*) ptr; 24 | delete ti->hostConn; 25 | delete ti; 26 | ((void**) __get_tls())[TLS_SLOT_OPENGL] = NULL; 27 | } 28 | } 29 | 30 | EGLThreadInfo* slow_getEGLThreadInfo() { 31 | EGLThreadInfo *ti = (EGLThreadInfo*) thread_store_get(&s_tls); 32 | if (ti) 33 | return ti; 34 | 35 | ti = new EGLThreadInfo(); 36 | thread_store_set(&s_tls, ti, tlsDestruct); 37 | 38 | return ti; 39 | } 40 | -------------------------------------------------------------------------------- /android/opengl/system/egl/ClientAPIExts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _CLIENT_APIS_EXTS_H 17 | #define _CLIENT_APIS_EXTS_H 18 | 19 | #include "EGLClientIface.h" 20 | 21 | namespace ClientAPIExts { 22 | 23 | void initClientFuncs(const EGLClient_glesInterface *iface, int idx); 24 | void* getProcAddress(const char *fname); 25 | 26 | } // of namespace ClientAPIExts 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /android/opengl/system/egl/egl.cfg: -------------------------------------------------------------------------------- 1 | 0 0 emulation 2 | -------------------------------------------------------------------------------- /android/opengl/system/gralloc/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq (false,$(BUILD_EMULATOR_OPENGL_DRIVER)) 2 | 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | $(call emugl-begin-shared-library,gralloc.goldfish) 6 | $(call emugl-import,libGLESv1_enc lib_renderControl_enc libOpenglSystemCommon) 7 | $(call emugl-set-shared-library-subpath,hw) 8 | 9 | LOCAL_CFLAGS += -DLOG_TAG=\"gralloc_goldfish\" 10 | LOCAL_CFLAGS += -Wno-missing-field-initializers 11 | 12 | LOCAL_SRC_FILES := gralloc.cpp 13 | 14 | # Need to access the special OPENGL TLS Slot 15 | LOCAL_C_INCLUDES += bionic/libc/private 16 | LOCAL_SHARED_LIBRARIES += libdl 17 | 18 | $(call emugl-end-module) 19 | 20 | endif # BUILD_EMULATOR_OPENGL_DRIVER != false 21 | -------------------------------------------------------------------------------- /android/opengl/system/renderControl_enc/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | $(call emugl-begin-shared-library,lib_renderControl_enc) 4 | 5 | LOCAL_SRC_FILES := \ 6 | renderControl_client_context.cpp \ 7 | renderControl_enc.cpp \ 8 | renderControl_entry.cpp 9 | 10 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 11 | $(call emugl-import,libOpenglCodecCommon) 12 | $(call emugl-end-module) 13 | -------------------------------------------------------------------------------- /android/opengl/system/renderControl_enc/renderControl.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 10000 3 | encoder_headers "glUtils.h" 4 | 5 | rcGetEGLVersion 6 | dir major out 7 | len major sizeof(EGLint) 8 | dir minor out 9 | len minor sizeof(EGLint) 10 | 11 | rcQueryEGLString 12 | dir buffer out 13 | len buffer bufferSize 14 | 15 | rcGetGLString 16 | dir buffer out 17 | len buffer bufferSize 18 | 19 | rcGetNumConfigs 20 | dir numAttribs out 21 | len numAttribs sizeof(uint32_t) 22 | 23 | rcGetConfigs 24 | dir buffer out 25 | len buffer bufSize 26 | 27 | rcChooseConfig 28 | dir attribs in 29 | len attribs attribs_size 30 | dir configs out 31 | var_flag configs nullAllowed 32 | len configs configs_size*sizeof(uint32_t) 33 | 34 | rcReadColorBuffer 35 | dir pixels out 36 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 37 | 38 | rcUpdateColorBuffer 39 | dir pixels in 40 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 41 | var_flag pixels isLarge 42 | 43 | rcCloseColorBuffer 44 | flag flushOnEncode 45 | 46 | -------------------------------------------------------------------------------- /android/opengl/system/renderControl_enc/renderControl.types: -------------------------------------------------------------------------------- 1 | uint32_t 32 0x%08x false 2 | EGLint 32 0x%08x false 3 | GLint 32 0x%08x false 4 | GLuint 32 0x%08x false 5 | GLenum 32 0x%08x false 6 | EGLenum 32 0x%08x false 7 | uint32_t* 32 0x%08x true 8 | EGLint* 32 0x%08x true 9 | GLint* 32 0x%08x true 10 | GLuint* 32 0x%08x true 11 | void* 32 0x%08x true 12 | -------------------------------------------------------------------------------- /android/opengl/system/renderControl_enc/renderControl_enc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_renderControl_encoder_context_t 5 | #define GUARD_renderControl_encoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "ChecksumCalculator.h" 9 | #include "renderControl_client_context.h" 10 | 11 | #include 12 | #include 13 | #include "glUtils.h" 14 | 15 | struct renderControl_encoder_context_t: public renderControl_client_context_t { 16 | 17 | IOStream *m_stream; 18 | ChecksumCalculator *m_checksumCalculator; 19 | 20 | renderControl_encoder_context_t(IOStream *stream, 21 | ChecksumCalculator *checksumCalculator); 22 | }; 23 | 24 | #endif // GUARD_renderControl_encoder_context_t 25 | -------------------------------------------------------------------------------- /android/opengl/system/renderControl_enc/renderControl_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include "glUtils.h" 20 | 21 | // values for 'param' argument of rcGetFBParam 22 | #define FB_WIDTH 1 23 | #define FB_HEIGHT 2 24 | #define FB_XDPI 3 25 | #define FB_YDPI 4 26 | #define FB_FPS 5 27 | #define FB_MIN_SWAP_INTERVAL 6 28 | #define FB_MAX_SWAP_INTERVAL 7 29 | -------------------------------------------------------------------------------- /android/opengl/tests/gles_android_wrapper/ApiInitializer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _API_INITIALIZER_H_ 18 | #define _API_INITIALIZER_H_ 19 | #include 20 | #include 21 | 22 | class ApiInitializer { 23 | public: 24 | ApiInitializer(void *dso) : 25 | m_dso(dso) { 26 | } 27 | static void* s_getProc(const char *name, void *userData) { 28 | ApiInitializer *self = (ApiInitializer*) userData; 29 | return self->getProc(name); 30 | } 31 | private: 32 | void *m_dso; 33 | void* getProc(const char *name) { 34 | void *symbol = NULL; 35 | if (m_dso) { 36 | symbol = dlsym(m_dso, name); 37 | } 38 | return symbol; 39 | } 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /android/opengl/tests/gles_android_wrapper/ThreadInfo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #include "ThreadInfo.h" 17 | #include "cutils/threads.h" 18 | 19 | thread_store_t s_tls = THREAD_STORE_INITIALIZER; 20 | 21 | static void tlsDestruct(void *ptr) { 22 | if (ptr) { 23 | EGLThreadInfo *ti = (EGLThreadInfo*) ptr; 24 | delete ti->serverConn; 25 | delete ti; 26 | } 27 | } 28 | 29 | EGLThreadInfo* getEGLThreadInfo() { 30 | EGLThreadInfo *ti = (EGLThreadInfo*) thread_store_get(&s_tls); 31 | if (ti) 32 | return ti; 33 | 34 | ti = new EGLThreadInfo(); 35 | thread_store_set(&s_tls, ti, tlsDestruct); 36 | 37 | return ti; 38 | } 39 | -------------------------------------------------------------------------------- /android/opengl/tests/gles_android_wrapper/egl.cfg: -------------------------------------------------------------------------------- 1 | 0 0 emul -------------------------------------------------------------------------------- /android/opengl/tests/gles_android_wrapper/gles_emul.cfg: -------------------------------------------------------------------------------- 1 | angeles 2 | my-tritex 3 | org.zeroxlab.benchmark 4 | com.cooliris.media 5 | com.polarbit.waveblazerlite 6 | test-opengl-gl2_basic 7 | com.trendy.ddapp 8 | -------------------------------------------------------------------------------- /android/opengl/tests/ut_rendercontrol_enc/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | $(call emugl-begin-shared-library,libut_rendercontrol_enc) 4 | $(call emugl-import,libOpenglCodecCommon) 5 | $(call emugl-gen-encoder,$(LOCAL_PATH),ut_rendercontrol) 6 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 7 | $(call emugl-end-module) 8 | 9 | -------------------------------------------------------------------------------- /android/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 10000 3 | encoder_headers 4 | 5 | -------------------------------------------------------------------------------- /android/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.in: -------------------------------------------------------------------------------- 1 | GL_ENTRY(int, createContext, uint32_t pid, uint32_t handle, uint32_t shareCtx, int version) 2 | GL_ENTRY(int, createSurface, uint32_t pid, uint32_t handle) 3 | GL_ENTRY(int, makeCurrentContext, uint32_t pid, uint32_t drawSurface, uint32_t readSurface, uint32_t ctxHandle) 4 | GL_ENTRY(void, swapBuffers, uint32_t pid, uint32_t surface) 5 | GL_ENTRY(int, destroyContext, uint32_t pid, uint32_t handle) 6 | GL_ENTRY(int, destroySurface, uint32_t pid, uint32_t handle) 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.types: -------------------------------------------------------------------------------- 1 | uint32_t 32 0x%08x false 2 | 3 | -------------------------------------------------------------------------------- /android/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | -------------------------------------------------------------------------------- /android/openvmi-touch.idc: -------------------------------------------------------------------------------- 1 | # Copyright 2017 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # 16 | # Input Device Calibration File for the Openvmi. 17 | # 18 | 19 | device.internal = 1 20 | 21 | touch.deviceType = touchScreen 22 | touch.displayId = 0 23 | touch.orientationAware = 1 24 | 25 | touch.size.calibration = diameter 26 | touch.size.scale = 60.216953 27 | touch.size.bias = -60.108793 28 | touch.size.isSummed = 0 29 | 30 | touch.pressure.calibration = amplitude 31 | touch.pressure.scale = 0.0125 32 | 33 | touch.orientation.calibration = none 34 | -------------------------------------------------------------------------------- /android/openvmid.rc: -------------------------------------------------------------------------------- 1 | service openvmid /system/bin/openvmid 2 | class core 3 | 4 | service openvmi-log-dumper /system/bin/logcat -f /data/system.log -r 2048 -n 4 5 | class core 6 | -------------------------------------------------------------------------------- /android/power/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2012 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | 18 | # HAL module implemenation stored in 19 | # hw/..so 20 | include $(CLEAR_VARS) 21 | 22 | LOCAL_MODULE_RELATIVE_PATH := hw 23 | LOCAL_CFLAGS += -DQEMU_HARDWARE 24 | LOCAL_SHARED_LIBRARIES := liblog libcutils 25 | LOCAL_SRC_FILES := power_qemu.c 26 | LOCAL_MODULE := power.goldfish 27 | LOCAL_MODULE_TAGS := optional 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /android/qemu-props/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # this file is used to build emulator-specific program tools 16 | # that should only run in the emulator. 17 | # 18 | 19 | LOCAL_PATH := $(call my-dir) 20 | 21 | # The 'qemu-props' program is run from /system/etc/init.goldfish.rc 22 | # to setup various system properties sent by the emulator program. 23 | # 24 | include $(CLEAR_VARS) 25 | LOCAL_MODULE := qemu-props 26 | LOCAL_SRC_FILES := qemu-props.c 27 | LOCAL_SHARED_LIBRARIES := libcutils liblog 28 | include $(BUILD_EXECUTABLE) 29 | -------------------------------------------------------------------------------- /android/qemud/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright 2008 The Android Open Source Project 2 | 3 | # We're moving the emulator-specific platform libs to 4 | # development.git/tools/emulator/. The following test is to ensure 5 | # smooth builds even if the tree contains both versions. 6 | # 7 | 8 | LOCAL_PATH:= $(call my-dir) 9 | include $(CLEAR_VARS) 10 | 11 | LOCAL_SRC_FILES:= \ 12 | qemud.c 13 | 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libcutils liblog 17 | 18 | LOCAL_MODULE:= qemud 19 | 20 | include $(BUILD_EXECUTABLE) 21 | -------------------------------------------------------------------------------- /android/sensors/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | 18 | # HAL module implemenation stored in 19 | # hw/..so 20 | include $(CLEAR_VARS) 21 | 22 | LOCAL_MODULE_RELATIVE_PATH := hw 23 | LOCAL_SHARED_LIBRARIES := liblog libcutils 24 | LOCAL_SRC_FILES := sensors_qemu.c 25 | ifeq ($(TARGET_PRODUCT),vbox_x86) 26 | LOCAL_MODULE := sensors.vbox_x86 27 | else 28 | LOCAL_MODULE := sensors.goldfish 29 | endif 30 | include $(BUILD_SHARED_LIBRARY) 31 | 32 | 33 | include $(CLEAR_VARS) 34 | 35 | LOCAL_MODULE_RELATIVE_PATH := hw 36 | LOCAL_SHARED_LIBRARIES := liblog libcutils 37 | LOCAL_SRC_FILES := sensors_qemu.c 38 | LOCAL_MODULE := sensors.ranchu 39 | 40 | include $(BUILD_SHARED_LIBRARY) 41 | -------------------------------------------------------------------------------- /android/service/daemon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_ANDROID_DAEMON_H_ 19 | #define OPENVMI_ANDROID_DAEMON_H_ 20 | 21 | namespace openvmi { 22 | class Daemon { 23 | public: 24 | Daemon(); 25 | ~Daemon(); 26 | 27 | int run(); 28 | }; 29 | } // namespace openvmi 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /android/service/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "android/service/daemon.h" 19 | 20 | int main(int, char**) { 21 | openvmi::Daemon daemon; 22 | return daemon.run(); 23 | } 24 | -------------------------------------------------------------------------------- /android/service/platform_server_proxy.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/android/service/platform_server_proxy.cpp -------------------------------------------------------------------------------- /android/service/platform_server_proxy.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/android/service/platform_server_proxy.h -------------------------------------------------------------------------------- /android/ueventd.goldfish.rc: -------------------------------------------------------------------------------- 1 | # These settings are specific to running under the Android emulator 2 | /dev/qemu_trace 0666 system system 3 | /dev/qemu_pipe 0666 system system 4 | /dev/goldfish_pipe 0666 system system 5 | /dev/ttyS* 0666 system system 6 | /proc 0666 system system 7 | -------------------------------------------------------------------------------- /android/vibrator/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2013 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_MODULE := vibrator.goldfish 20 | 21 | # HAL module implemenation stored in 22 | # hw/.goldfish.so 23 | LOCAL_MODULE_RELATIVE_PATH := hw 24 | LOCAL_C_INCLUDES := hardware/libhardware hardware/libhardware_legacy 25 | LOCAL_SRC_FILES := vibrator_qemu.c 26 | LOCAL_SHARED_LIBRARIES := liblog libhardware libhardware_legacy 27 | LOCAL_MODULE_TAGS := optional 28 | 29 | include $(BUILD_SHARED_LIBRARY) 30 | -------------------------------------------------------------------------------- /cmake/FindEGL.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find EGL 2 | # Once done this will define 3 | # EGL_FOUND - System has EGL 4 | # EGL_INCLUDE_DIRS - The EGL include directories 5 | # EGL_LIBRARIES - The libraries needed to use EGL 6 | 7 | find_package(PkgConfig) 8 | pkg_check_modules(PC_EGL QUIET egl) 9 | 10 | find_path(EGL_INCLUDE_DIR EGL/egl.h 11 | HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS}) 12 | 13 | find_library(EGL_LIBRARY EGL 14 | HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS}) 15 | 16 | set(EGL_LIBRARIES ${EGL_LIBRARY}) 17 | set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | # handle the QUIETLY and REQUIRED arguments and set EGL_FOUND to TRUE 21 | # if all listed variables are TRUE 22 | find_package_handle_standard_args(EGL DEFAULT_MSG 23 | EGL_LIBRARY EGL_INCLUDE_DIR) 24 | 25 | mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY) 26 | -------------------------------------------------------------------------------- /cmake/FindGLESv2.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find GLESv2 2 | # Once done this will define 3 | # GLESv2_FOUND - System has GLESv2 4 | # GLESv2_INCLUDE_DIRS - The GLESv2 include directories 5 | # GLESv2_LIBRARIES - The libraries needed to use GLESv2 6 | 7 | find_package(PkgConfig) 8 | pkg_check_modules(PC_GLESv2 QUIET glesv2) 9 | 10 | find_path(GLESv2_INCLUDE_DIR GLES2/gl2.h 11 | HINTS ${PC_GLESv2_INCLUDEDIR} ${PC_GLESv2_INCLUDE_DIRS}) 12 | 13 | find_library(GLESv2_LIBRARY GLESv2 14 | HINTS ${PC_GLESv2_LIBDIR} ${PC_GLESv2_LIBRARY_DIRS}) 15 | 16 | set(GLESv2_LIBRARIES ${GLESv2_LIBRARY}) 17 | set(GLESv2_INCLUDE_DIRS ${GLESv2_INCLUDE_DIR}) 18 | 19 | include(FindPackageHandleStandardArgs) 20 | # handle the QUIETLY and REQUIRED arguments and set GLESv2_FOUND to TRUE 21 | # if all listed variables are TRUE 22 | find_package_handle_standard_args(GLESv2 DEFAULT_MSG 23 | GLESv2_LIBRARY GLESv2_INCLUDE_DIR) 24 | 25 | mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY) 26 | -------------------------------------------------------------------------------- /docs/img/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/architecture.png -------------------------------------------------------------------------------- /docs/img/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image1.png -------------------------------------------------------------------------------- /docs/img/image10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image10.png -------------------------------------------------------------------------------- /docs/img/image11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image11.png -------------------------------------------------------------------------------- /docs/img/image12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image12.png -------------------------------------------------------------------------------- /docs/img/image13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image13.png -------------------------------------------------------------------------------- /docs/img/image14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image14.png -------------------------------------------------------------------------------- /docs/img/image15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image15.png -------------------------------------------------------------------------------- /docs/img/image16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image16.png -------------------------------------------------------------------------------- /docs/img/image17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image17.png -------------------------------------------------------------------------------- /docs/img/image18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image18.png -------------------------------------------------------------------------------- /docs/img/image19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image19.jpg -------------------------------------------------------------------------------- /docs/img/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image2.png -------------------------------------------------------------------------------- /docs/img/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image3.png -------------------------------------------------------------------------------- /docs/img/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image4.png -------------------------------------------------------------------------------- /docs/img/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image5.png -------------------------------------------------------------------------------- /docs/img/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image6.png -------------------------------------------------------------------------------- /docs/img/image7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image7.png -------------------------------------------------------------------------------- /docs/img/image8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image8.png -------------------------------------------------------------------------------- /docs/img/image9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/image9.png -------------------------------------------------------------------------------- /docs/img/openvmi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/img/openvmi.png -------------------------------------------------------------------------------- /docs/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/docs/logo.jpg -------------------------------------------------------------------------------- /external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(process-cpp-minimal) 2 | add_subdirectory(android-emugl) 3 | add_subdirectory(xdg) 4 | -------------------------------------------------------------------------------- /external/android-emugl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Don't treat any warnings as error as we take the source directly from 2 | # upstream and just compile it. 3 | set(CMAKE_C_FLAGS "-Wall") 4 | set(CMAKE_CXX_FLAGS "-std=c++11 -Wall") 5 | 6 | # Ensure -fPIC 7 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 8 | 9 | include_directories( 10 | ${CMAKE_SOURCE_DIR}/src 11 | ${CMAKE_SOURCE_DIR}/external/android-emugl/shared 12 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/include 13 | ${CMAKE_BINARY_DIR}/external/android-emugl/host/include 14 | ${CMAKE_SOURCE_DIR}/external/android-emugl/shared/OpenglCodecCommon 15 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs 16 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/include/libOpenglRender 17 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/GLESv1_dec 18 | ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/GLESv1_dec 19 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/GLESv2_dec 20 | ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/GLESv2_dec 21 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/renderControl_dec 22 | ${CMAKE_BINARY_DIR}/external/android-emugl/host/libs/renderControl_dec 23 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/Translator/ 24 | ${CMAKE_SOURCE_DIR}/external/android-emugl/host/libs/Translator/include 25 | ${MIRCLIENT_INCLUDE_DIRS}) 26 | 27 | add_subdirectory(host) 28 | add_subdirectory(shared) 29 | -------------------------------------------------------------------------------- /external/android-emugl/host/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(tools) 2 | add_subdirectory(libs) 3 | -------------------------------------------------------------------------------- /external/android-emugl/host/include/GLES/glplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __glplatform_h_ 2 | #define __glplatform_h_ 3 | 4 | /* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 1.X gl.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | #include 21 | 22 | #ifndef GL_API 23 | #define GL_API KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __glplatform_h_ */ 31 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(GENERATED_SOURCES 2 | gles1_extensions_functions.h 3 | gles1_only_functions.h 4 | gles2_extensions_functions.h 5 | gles2_only_functions.h 6 | gles3_only_functions.h 7 | gles31_only_functions.h 8 | gles_common_functions.h 9 | gles_extensions_functions.h 10 | gles_functions.h 11 | RenderEGL_extensions_functions.h 12 | RenderEGL_functions.h) 13 | 14 | add_custom_target(GLHeaders) 15 | add_custom_command( 16 | TARGET GLHeaders 17 | POST_BUILD 18 | COMMAND ${CMAKE_SOURCE_DIR}/scripts/gen-emugl-headers.sh ${CMAKE_BINARY_DIR} 19 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) 20 | 21 | add_subdirectory(GLESv1_dec) 22 | add_subdirectory(GLESv2_dec) 23 | add_subdirectory(libOpenGLESDispatch) 24 | add_subdirectory(renderControl_dec) 25 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv1_dec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(GENERATED_SOURCES 2 | gles1_dec.cpp 3 | gles1_opcodes.h 4 | gles1_server_context.cpp) 5 | 6 | add_custom_command( 7 | OUTPUT ${GENERATED_SOURCES} 8 | POST_BUILD 9 | COMMAND ${CMAKE_BINARY_DIR}/external/android-emugl/host/tools/emugen/emugen 10 | -D ${CMAKE_CURRENT_BINARY_DIR} gles1 11 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 12 | DEPENDS emugen) 13 | 14 | set(SOURCES 15 | GLESv1Decoder.cpp) 16 | 17 | if ("${cmake_build_type_lower}" STREQUAL "trace") 18 | set(OPENGL_DEBUG "-DOPENGL_DEBUG_PRINTOUT -DCHECK_GL_ERROR") 19 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENGL_DEBUG}") 20 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENGL_DEBUG}") 21 | endif() 22 | 23 | add_library(GLESv1_dec STATIC ${SOURCES} ${GENERATED_SOURCES}) 24 | add_dependencies(GLESv1_dec GLHeaders) 25 | target_link_libraries(GLESv1_dec OpenglCodecCommon) 26 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv1_dec/gles1.addon: -------------------------------------------------------------------------------- 1 | GL_ENTRY(void, glVertexPointerOffset, GLint size, GLenum type, GLsizei stride, GLuint offset) 2 | GL_ENTRY(void, glColorPointerOffset, GLint size, GLenum type, GLsizei stride, GLuint offset) 3 | GL_ENTRY(void, glNormalPointerOffset, GLenum type, GLsizei stride, GLuint offset) 4 | GL_ENTRY(void, glPointSizePointerOffset, GLenum type, GLsizei stride, GLuint offset) 5 | GL_ENTRY(void, glTexCoordPointerOffset, GLint size, GLenum type, GLsizei stride, GLuint offset) 6 | 7 | GL_ENTRY(void, glVertexPointerData, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen) 8 | GL_ENTRY(void, glColorPointerData, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen) 9 | GL_ENTRY(void, glNormalPointerData, GLenum type, GLsizei stride, void * data, GLuint datalen) 10 | GL_ENTRY(void, glTexCoordPointerData, GLint size, GLenum type, GLsizei stride, void * data, GLuint datalen) 11 | GL_ENTRY(void, glPointSizePointerData, GLenum type, GLsizei stride, void * data, GLuint datalen) 12 | 13 | GL_ENTRY(void, glDrawElementsOffset, GLenum mode, GLsizei count, GLenum type, GLuint offset); 14 | GL_ENTRY(void, glDrawElementsData, GLenum mode, GLsizei count, GLenum type, void *data, GLuint datalen); 15 | 16 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv1_dec/gles1.types: -------------------------------------------------------------------------------- 1 | GLbitfield 32 0x%08x 2 | GLboolean 8 %d 3 | GLclampf 32 %f 4 | GLclampx 32 0x%08x 5 | GLeglImageOES 32 %p 6 | GLenum 32 0x%08x 7 | GLfixed 32 0x%08x 8 | GLfloat 32 %f 9 | GLint 32 %d 10 | GLintptr 32 0x%08lx 11 | GLshort 16 %d 12 | GLsizei 32 %d 13 | GLsizeiptr 32 0x%08lx 14 | GLubyte 8 0x%02x 15 | GLuint 32 %u 16 | GLvoid 0 %x 17 | GLchar 8 %d 18 | GLenum* 32 0x%08x 19 | GLboolean* 32 0x%08x 20 | GLclampf* 32 0x%08x 21 | GLclampx* 32 0x%08x 22 | GLeglImageOES* 32 0x%08x 23 | GLfixed* 32 0x%08x 24 | GLfloat* 32 0x%08x 25 | GLint* 32 0x%08x 26 | GLshort* 32 0x%08x 27 | GLsizei* 32 0x%08x 28 | GLubyte* 32 0x%08x 29 | GLuint* 32 0x%08x 30 | GLvoid* 32 0x%08x 31 | GLchar* 32 0x%08x 32 | GLvoid** 32 0x%08x 33 | void* 32 0x%08x 34 | GLvoid*const* 32 0x%08x 35 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv1_dec/gles1_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __GLES1_TYPES__H 17 | #define __GLES1_TYPES__H 18 | 19 | #include "gl_base_types.h" 20 | 21 | #endif // __GLES1_TYPES__H 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv2_dec/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | ### host library ########################################## 4 | $(call emugl-begin-static-library,libGLESv2_dec) 5 | $(call emugl-import, libOpenglCodecCommon) 6 | $(call emugl-gen-decoder,$(LOCAL_PATH),gles2) 7 | 8 | # For gl2_types.h ! 9 | $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) 10 | 11 | $(call emugl-export,CFLAGS,$(EMUGL_USER_CFLAGS)) 12 | 13 | LOCAL_SRC_FILES := GLESv2Decoder.cpp 14 | 15 | $(call emugl-end-module) 16 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv2_dec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(GENERATED_SOURCES 2 | gles2_dec.cpp 3 | gles2_opcodes.h 4 | gles2_server_context.cpp) 5 | 6 | add_custom_command( 7 | OUTPUT ${GENERATED_SOURCES} 8 | POST_BUILD 9 | COMMAND ${CMAKE_BINARY_DIR}/external/android-emugl/host/tools/emugen/emugen 10 | -D ${CMAKE_CURRENT_BINARY_DIR} gles2 11 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 12 | DEPENDS emugen) 13 | 14 | set(SOURCES 15 | GLESv2Decoder.cpp) 16 | 17 | if ("${cmake_build_type_lower}" STREQUAL "trace") 18 | set(OPENGL_DEBUG "-DOPENGL_DEBUG_PRINTOUT -DCHECK_GL_ERROR") 19 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENGL_DEBUG}") 20 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENGL_DEBUG}") 21 | endif() 22 | 23 | add_library(GLESv2_dec STATIC ${SOURCES} ${GENERATED_SOURCES}) 24 | add_dependencies(GLESv2_dec GLHeaders) 25 | target_link_libraries(GLESv2_dec OpenglCodecCommon) 26 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv2_dec/gles2.types: -------------------------------------------------------------------------------- 1 | GLbitfield 32 0x%08x 2 | GLboolean 8 %d 3 | GLclampf 32 %f 4 | GLclampx 32 0x%08x 5 | GLeglImageOES 32 %p 6 | GLenum 32 0x%08x 7 | GLfixed 32 0x%08x 8 | GLfloat 32 %f 9 | GLint 32 %d 10 | GLintptr 32 0x%08lx 11 | GLshort 16 %d 12 | GLsizei 32 %d 13 | GLsizeiptr 32 0x%08lx 14 | GLubyte 8 0x%02x 15 | GLuint 32 %u 16 | GLvoid 0 %x 17 | GLchar 8 %d 18 | GLenum* 32 0x%08x 19 | GLboolean* 32 0x%08x 20 | GLclampf* 32 0x%08x 21 | GLclampx* 32 0x%08x 22 | GLeglImageOES* 32 0x%08x 23 | GLfixed* 32 0x%08x 24 | GLfloat* 32 0x%08x 25 | GLint* 32 0x%08x 26 | GLshort* 32 0x%08x 27 | GLsizei* 32 0x%08x 28 | GLubyte* 32 0x%08x 29 | GLuint* 32 0x%08x 30 | GLvoid* 32 0x%08x 31 | GLchar* 32 0x%08x 32 | GLchar** 32 0x%08x 33 | GLvoid** 32 0x%08x 34 | void* 32 0x%08x 35 | GLstr* 32 0x%08x 36 | GLvoidptr* 32 0x%08x 37 | GLchar*const* 32 0x%08x 38 | GLvoid*const* 32 0x%08x 39 | GLsync 64 %p 40 | uint64_t 64 0x%016lx 41 | GLint32 32 0x%08x 42 | GLint32* 32 %p 43 | GLint64 64 0x%016lx 44 | GLint64* 32 %p 45 | GLuint32 32 0x%08x 46 | GLuint32* 32 %p 47 | GLuint64 64 0x%016lx 48 | GLuint64* 32 %p 49 | char* 32 0x%08x 50 | char** 32 0x%08x 51 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/GLESv2_dec/gles2_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _GL_2_TYPES_H_ 17 | #define _GL_2_TYPES_H_ 18 | #include "gl_base_types.h" 19 | 20 | typedef void *GLvoidptr; 21 | #endif 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/libOpenGLESDispatch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | EGLDispatch.cpp 3 | GLESv2Dispatch.cpp 4 | GLESv1Dispatch.cpp) 5 | 6 | add_library(OpenGLESDispatch STATIC ${SOURCES}) 7 | add_dependencies(OpenGLESDispatch GLHeaders) 8 | target_link_libraries(OpenGLESDispatch 9 | emugl_common 10 | GLESv2_dec 11 | GLESv1_dec) 12 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/libOpenGLESDispatch/gles1_extensions.entries: -------------------------------------------------------------------------------- 1 | !gles1_extensions 2 | 3 | # OpenGL functions which are needed ONLY for implementing GLES 1.1 EXTENSIONS 4 | void glCurrentPaletteMatrixARB(GLint index); 5 | void glMatrixIndexuivARB(GLint size, GLuint * indices); 6 | void glMatrixIndexPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 7 | void glWeightPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); 8 | void glTexGenf(GLenum coord, GLenum pname, GLfloat param); 9 | void glTexGeni(GLenum coord, GLenum pname, GLint param); 10 | void glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params); 11 | void glTexGeniv(GLenum coord, GLenum pname, const GLint *params); 12 | void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params); 13 | void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params); 14 | void glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); 15 | void glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height); 16 | void glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); 17 | void glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); 18 | void glDrawTexsvOES(const GLshort *coords); 19 | void glDrawTexivOES(const GLint *coords); 20 | void glDrawTexfvOES(const GLfloat *coords); 21 | void glDrawTexxvOES(const GLfixed *coords); 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/libOpenGLESDispatch/gles2_extensions.entries: -------------------------------------------------------------------------------- 1 | !gles2_extensions 2 | 3 | # GLES 2.0 extensions 4 | void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); 5 | void glReleaseShaderCompiler(void); 6 | void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); 7 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/libOpenGLESDispatch/gles3_only.entries: -------------------------------------------------------------------------------- 1 | !gles3_only 2 | 3 | # GLES 3.x functions required by the translator library. 4 | # Right now, this is only use to get glGetStringi() from the host GL library 5 | # in order to deal with the fact that glGetString(GL_EXTENSIONS) is obsolete 6 | # in OpenGL 3.0, and some drivers don't implement it anymore (i.e. the 7 | # function just returns NULL). 8 | 9 | %#include 10 | % 11 | %// Used to avoid adding GLES3/gl3.h to our headers. 12 | %#ifndef GL_NUM_EXTENSIONS 13 | %#define GL_NUM_EXTENSIONS 0x821D 14 | %#endif 15 | 16 | %typedef const GLubyte* GLconstubyteptr; 17 | 18 | GLconstubyteptr glGetStringi(GLenum name, GLint index); 19 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/libOpenGLESDispatch/render_egl_extensions.entries: -------------------------------------------------------------------------------- 1 | # The list of EGL extension functions used by libOpenglRender. 2 | # This is only a subset of the full EGL API. 3 | 4 | !Render_EGL_extensions 5 | 6 | %#include 7 | %#define EGL_EGLEXT_PROTOTYPES 8 | %#include 9 | 10 | EGLImageKHR eglCreateImageKHR(EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint* attrib_list); 11 | EGLBoolean eglDestroyImageKHR(EGLDisplay display, EGLImageKHR image); 12 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/renderControl_dec/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(GENERATED_SOURCES 2 | renderControl_dec.cpp 3 | renderControl_server_context.cpp) 4 | 5 | add_custom_command( 6 | OUTPUT ${GENERATED_SOURCES} 7 | POST_BUILD 8 | COMMAND ${CMAKE_BINARY_DIR}/external/android-emugl/host/tools/emugen/emugen 9 | -D ${CMAKE_CURRENT_BINARY_DIR} renderControl 10 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 11 | DEPENDS emugen) 12 | 13 | if ("${cmake_build_type_lower}" STREQUAL "trace") 14 | set(OPENGL_DEBUG "-DOPENGL_DEBUG_PRINTOUT -DCHECK_GL_ERROR") 15 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENGL_DEBUG}") 16 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENGL_DEBUG}") 17 | endif() 18 | 19 | add_library(renderControl_dec STATIC ${GENERATED_SOURCES}) 20 | target_link_libraries(renderControl_dec OpenglCodecCommon) 21 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/renderControl_dec/renderControl.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 10000 3 | encoder_headers "glUtils.h" 4 | 5 | rcGetEGLVersion 6 | dir major out 7 | len major sizeof(EGLint) 8 | dir minor out 9 | len minor sizeof(EGLint) 10 | 11 | rcQueryEGLString 12 | dir buffer out 13 | len buffer bufferSize 14 | 15 | rcGetGLString 16 | dir buffer out 17 | len buffer bufferSize 18 | 19 | rcGetNumConfigs 20 | dir numAttribs out 21 | len numAttribs sizeof(uint32_t) 22 | 23 | rcGetConfigs 24 | dir buffer out 25 | len buffer bufSize 26 | 27 | rcChooseConfig 28 | dir attribs in 29 | len attribs attribs_size 30 | dir configs out 31 | var_flag configs nullAllowed 32 | len configs configs_size*sizeof(uint32_t) 33 | 34 | rcReadColorBuffer 35 | dir pixels out 36 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 37 | 38 | rcUpdateColorBuffer 39 | dir pixels in 40 | len pixels (((glUtilsPixelBitSize(format, type) * width) >> 3) * height) 41 | var_flag pixels isLarge 42 | 43 | rcCloseColorBuffer 44 | flag flushOnEncode 45 | 46 | rcPostLayer 47 | len name (strlen(name) + 1) 48 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/renderControl_dec/renderControl.types: -------------------------------------------------------------------------------- 1 | uint32_t 32 0x%08x 2 | int32_t 32 0x%08x 3 | EGLint 32 0x%08x 4 | GLint 32 0x%08x 5 | GLuint 32 0x%08x 6 | GLenum 32 0x%08x 7 | EGLenum 32 0x%08x 8 | uint32_t* 32 0x%08x 9 | EGLint* 32 0x%08x 10 | GLint* 32 0x%08x 11 | GLuint* 32 0x%08x 12 | void* 32 0x%08x 13 | char* 32 0x%08x 14 | -------------------------------------------------------------------------------- /external/android-emugl/host/libs/renderControl_dec/renderControl_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include "glUtils.h" 20 | 21 | // values for 'param' argument of rcGetFBParam 22 | #define FB_WIDTH 1 23 | #define FB_HEIGHT 2 24 | #define FB_XDPI 3 25 | #define FB_YDPI 4 26 | #define FB_FPS 5 27 | #define FB_MIN_SWAP_INTERVAL 6 28 | #define FB_MAX_SWAP_INTERVAL 7 29 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(emugen) 2 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (NOT "${HOST_CMAKE_CXX_COMPILER}" STREQUAL "") 2 | set (CMAKE_CXX_COMPILER "${HOST_CMAKE_CXX_COMPILER}") 3 | endif() 4 | 5 | set(SOURCES 6 | ApiGen.cpp 7 | EntryPoint.cpp 8 | main.cpp 9 | Parser.cpp 10 | strUtils.cpp 11 | TypeFactory.cpp) 12 | 13 | add_executable(emugen ${SOURCES}) 14 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/TypeFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef __TYPE__FACTORY__H__ 17 | #define __TYPE__FACTORY__H__ 18 | 19 | #include 20 | #include "VarType.h" 21 | 22 | class TypeFactory { 23 | public: 24 | static TypeFactory *instance() { 25 | if (m_instance == NULL) { 26 | m_instance = new TypeFactory; 27 | } 28 | return m_instance; 29 | } 30 | const VarType * getVarTypeByName(const std::string &type); 31 | int initFromFile(const std::string &filename); 32 | private: 33 | static TypeFactory *m_instance; 34 | void initBaseTypes(); 35 | TypeFactory() {} 36 | }; 37 | #endif 38 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/errors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _ERRORS_H_ 17 | #define _ERRORS_H_ 18 | 19 | #define BAD_USAGE -1 20 | #define BAD_SPEC_FILE -2 21 | #define BAD_TYPES_FILE -3 22 | #define BAD_ATTRIBUTES_FILE -4 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef GETOPT_H 2 | #define GETOPT_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | extern int optind; 9 | extern char* optarg; 10 | extern int optopt; 11 | 12 | int getopt(int argc, char* const argv[], const char* ostr); 13 | 14 | #ifdef __cplusplus 15 | } 16 | #endif 17 | 18 | #endif // GETOPT_H 19 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/strUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef STR_UTILS_H_ 17 | #define STR_UTILS_H_ 18 | 19 | #include 20 | #include 21 | 22 | #define WHITESPACE " \t\n" 23 | 24 | std::string trim(const std::string & str); 25 | std::string getNextToken(const std::string & str, size_t pos, size_t * last, const std::string & delim); 26 | template std::string inline toString(const T& t) { 27 | std::stringstream ss; 28 | ss << t; 29 | return ss.str(); 30 | 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_dec.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_foo_decoder_context_t 5 | #define GUARD_foo_decoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "foo_server_context.h" 9 | 10 | 11 | 12 | struct foo_decoder_context_t : public foo_server_context_t { 13 | 14 | size_t decode(void *buf, size_t bufsize, IOStream *stream); 15 | 16 | }; 17 | 18 | #endif // GUARD_foo_decoder_context_t 19 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_opcodes.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __GUARD_foo_opcodes_h_ 4 | #define __GUARD_foo_opcodes_h_ 5 | 6 | #define OP_fooAlphaFunc 200 7 | #define OP_fooIsBuffer 201 8 | #define OP_fooUnsupported 202 9 | #define OP_fooDoEncoderFlush 203 10 | #define OP_fooTakeConstVoidPtrConstPtr 204 11 | #define OP_last 205 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_server_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_server_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_server_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_server_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_server_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_server_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_server_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_server_context_t_h 4 | #define __foo_server_context_t_h 5 | 6 | #include "foo_server_proc.h" 7 | 8 | #include "foo_types.h" 9 | 10 | 11 | struct foo_server_context_t { 12 | 13 | fooAlphaFunc_server_proc_t fooAlphaFunc; 14 | fooIsBuffer_server_proc_t fooIsBuffer; 15 | fooUnsupported_server_proc_t fooUnsupported; 16 | fooDoEncoderFlush_server_proc_t fooDoEncoderFlush; 17 | fooTakeConstVoidPtrConstPtr_server_proc_t fooTakeConstVoidPtrConstPtr; 18 | virtual ~foo_server_context_t() {} 19 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/decoder/foo_server_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_server_proc_t_h 4 | #define __foo_server_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | 10 | #include "emugl/common/logging.h" 11 | #ifndef foo_APIENTRY 12 | #define foo_APIENTRY 13 | #endif 14 | typedef void (foo_APIENTRY *fooAlphaFunc_server_proc_t) (FooInt, FooFloat); 15 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_server_proc_t) (void*); 16 | typedef void (foo_APIENTRY *fooUnsupported_server_proc_t) (void*); 17 | typedef void (foo_APIENTRY *fooDoEncoderFlush_server_proc_t) (FooInt); 18 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_server_proc_t) (const void* const*); 19 | 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_client_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_client_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_client_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_client_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_client_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_client_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_client_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_context_t_h 4 | #define __foo_client_context_t_h 5 | 6 | #include "foo_client_proc.h" 7 | 8 | #include "foo_types.h" 9 | 10 | 11 | struct foo_client_context_t { 12 | 13 | fooAlphaFunc_client_proc_t fooAlphaFunc; 14 | fooIsBuffer_client_proc_t fooIsBuffer; 15 | fooUnsupported_client_proc_t fooUnsupported; 16 | fooDoEncoderFlush_client_proc_t fooDoEncoderFlush; 17 | fooTakeConstVoidPtrConstPtr_client_proc_t fooTakeConstVoidPtrConstPtr; 18 | virtual ~foo_client_context_t() {} 19 | 20 | typedef foo_client_context_t *CONTEXT_ACCESSOR_TYPE(void); 21 | static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); 22 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 23 | virtual void setError(unsigned int error){ (void)error; }; 24 | virtual unsigned int getError(){ return 0; }; 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_client_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_proc_t_h 4 | #define __foo_client_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | 10 | #include "emugl/common/logging.h" 11 | #ifndef foo_APIENTRY 12 | #define foo_APIENTRY 13 | #endif 14 | typedef void (foo_APIENTRY *fooAlphaFunc_client_proc_t) (void * ctx, FooInt, FooFloat); 15 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_client_proc_t) (void * ctx, void*); 16 | typedef void (foo_APIENTRY *fooUnsupported_client_proc_t) (void * ctx, void*); 17 | typedef void (foo_APIENTRY *fooDoEncoderFlush_client_proc_t) (void * ctx, FooInt); 18 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_client_proc_t) (void * ctx, const void* const*); 19 | 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_enc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | #ifndef GUARD_foo_encoder_context_t 5 | #define GUARD_foo_encoder_context_t 6 | 7 | #include "IOStream.h" 8 | #include "ChecksumCalculator.h" 9 | #include "foo_client_context.h" 10 | 11 | 12 | #include "fooUtils.h" 13 | #include "fooBase.h" 14 | 15 | struct foo_encoder_context_t : public foo_client_context_t { 16 | 17 | IOStream *m_stream; 18 | ChecksumCalculator *m_checksumCalculator; 19 | 20 | foo_encoder_context_t(IOStream *stream, ChecksumCalculator *checksumCalculator); 21 | }; 22 | 23 | #endif // GUARD_foo_encoder_context_t -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_ftable.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_client_ftable_t_h 4 | #define __foo_client_ftable_t_h 5 | 6 | 7 | static const struct _foo_funcs_by_name { 8 | const char *name; 9 | void *proc; 10 | } foo_funcs_by_name[] = { 11 | {"fooAlphaFunc", (void*)fooAlphaFunc}, 12 | {"fooIsBuffer", (void*)fooIsBuffer}, 13 | {"fooUnsupported", (void*)fooUnsupported}, 14 | {"fooDoEncoderFlush", (void*)fooDoEncoderFlush}, 15 | {"fooTakeConstVoidPtrConstPtr", (void*)fooTakeConstVoidPtrConstPtr}, 16 | }; 17 | static const int foo_num_funcs = sizeof(foo_funcs_by_name) / sizeof(struct _foo_funcs_by_name); 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/encoder/foo_opcodes.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __GUARD_foo_opcodes_h_ 4 | #define __GUARD_foo_opcodes_h_ 5 | 6 | #define OP_fooAlphaFunc 200 7 | #define OP_fooIsBuffer 201 8 | #define OP_fooUnsupported 202 9 | #define OP_fooDoEncoderFlush 203 10 | #define OP_fooTakeConstVoidPtrConstPtr 204 11 | #define OP_last 205 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_context.cpp: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | 4 | 5 | #include 6 | #include "foo_wrapper_context.h" 7 | 8 | 9 | #include 10 | 11 | int foo_wrapper_context_t::initDispatchByName(void *(*getProc)(const char *, void *userData), void *userData) 12 | { 13 | fooAlphaFunc = (fooAlphaFunc_wrapper_proc_t) getProc("fooAlphaFunc", userData); 14 | fooIsBuffer = (fooIsBuffer_wrapper_proc_t) getProc("fooIsBuffer", userData); 15 | fooUnsupported = (fooUnsupported_wrapper_proc_t) getProc("fooUnsupported", userData); 16 | fooDoEncoderFlush = (fooDoEncoderFlush_wrapper_proc_t) getProc("fooDoEncoderFlush", userData); 17 | fooTakeConstVoidPtrConstPtr = (fooTakeConstVoidPtrConstPtr_wrapper_proc_t) getProc("fooTakeConstVoidPtrConstPtr", userData); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_context.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_wrapper_context_t_h 4 | #define __foo_wrapper_context_t_h 5 | 6 | #include "foo_server_proc.h" 7 | 8 | #include "foo_types.h" 9 | 10 | 11 | struct foo_wrapper_context_t { 12 | 13 | fooAlphaFunc_wrapper_proc_t fooAlphaFunc; 14 | fooIsBuffer_wrapper_proc_t fooIsBuffer; 15 | fooUnsupported_wrapper_proc_t fooUnsupported; 16 | fooDoEncoderFlush_wrapper_proc_t fooDoEncoderFlush; 17 | fooTakeConstVoidPtrConstPtr_wrapper_proc_t fooTakeConstVoidPtrConstPtr; 18 | virtual ~foo_wrapper_context_t() {} 19 | 20 | typedef foo_wrapper_context_t *CONTEXT_ACCESSOR_TYPE(void); 21 | static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); 22 | int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/expected/wrapper/foo_wrapper_proc.h: -------------------------------------------------------------------------------- 1 | // Generated Code - DO NOT EDIT !! 2 | // generated by 'emugen' 3 | #ifndef __foo_wrapper_proc_t_h 4 | #define __foo_wrapper_proc_t_h 5 | 6 | 7 | 8 | #include "foo_types.h" 9 | 10 | #include "emugl/common/logging.h" 11 | #ifndef foo_APIENTRY 12 | #define foo_APIENTRY 13 | #endif 14 | typedef void (foo_APIENTRY *fooAlphaFunc_wrapper_proc_t) (FooInt, FooFloat); 15 | typedef FooBoolean (foo_APIENTRY *fooIsBuffer_wrapper_proc_t) (void*); 16 | typedef void (foo_APIENTRY *fooUnsupported_wrapper_proc_t) (void*); 17 | typedef void (foo_APIENTRY *fooDoEncoderFlush_wrapper_proc_t) (FooInt); 18 | typedef void (foo_APIENTRY *fooTakeConstVoidPtrConstPtr_wrapper_proc_t) (const void* const*); 19 | 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/input/foo.attrib: -------------------------------------------------------------------------------- 1 | GLOBAL 2 | base_opcode 200 3 | encoder_headers "fooUtils.h" "fooBase.h" 4 | 5 | fooIsBuffer 6 | dir stuff in 7 | len stuff (4 * sizeof(float)) 8 | param_check stuff if (n == NULL) { LOG(ERROR) << "NULL stuff"; return; } 9 | 10 | fooUnsupported 11 | dir params in 12 | flag unsupported 13 | 14 | fooDoEncoderFlush 15 | flag flushOnEncode 16 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/input/foo.in: -------------------------------------------------------------------------------- 1 | FOO_ENTRY(void, fooAlphaFunc, FooInt func, FooFloat ref) 2 | FOO_ENTRY(FooBoolean, fooIsBuffer, void* stuff) 3 | FOO_ENTRY(void, fooUnsupported, void* params) 4 | FOO_ENTRY(void, fooDoEncoderFlush, FooInt param) 5 | FOO_ENTRY(void, fooTakeConstVoidPtrConstPtr, const void* const* param) 6 | -------------------------------------------------------------------------------- /external/android-emugl/host/tools/emugen/tests/t.001/input/foo.types: -------------------------------------------------------------------------------- 1 | FooBoolean 8 %d 2 | FooInt 32 %d 3 | FooShort 16 %d 4 | FooFloat 32 %f 5 | FooEnum 32 %08x 6 | FooVoid 0 %x 7 | FooChar 8 %d 8 | FooChar* 32 0x%08x 9 | void* 32 0x%08x 10 | void*const* 32 0x%08x 11 | -------------------------------------------------------------------------------- /external/android-emugl/shared/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(emugl) 2 | add_subdirectory(OpenglCodecCommon) 3 | -------------------------------------------------------------------------------- /external/android-emugl/shared/OpenglCodecCommon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(SOURCES 2 | ChecksumCalculator.cpp 3 | ChecksumCalculator.h 4 | ChecksumCalculatorThreadInfo.cpp 5 | ChecksumCalculatorThreadInfo.h 6 | CMakeLists.txt 7 | ErrorLog.h 8 | gl_base_types.h 9 | GLDecoderContextData.h 10 | glUtils.cpp 11 | glUtils.h 12 | Makefile 13 | ProtocolUtils.h) 14 | 15 | add_library(OpenglCodecCommon STATIC ${SOURCES}) 16 | -------------------------------------------------------------------------------- /external/android-emugl/shared/OpenglCodecCommon/ErrorLog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #ifndef _ERROR_LOG_H_ 17 | #define _ERROR_LOG_H_ 18 | 19 | #include 20 | #define ERR(...) fprintf(stderr, __VA_ARGS__) 21 | #define EMUGL_DEBUG 22 | #ifdef EMUGL_DEBUG 23 | # define DBG(...) fprintf(stderr, __VA_ARGS__) 24 | #else 25 | # define DBG(...) ((void)0) 26 | #endif 27 | 28 | #endif // _ERROR_LOG_H_ 29 | -------------------------------------------------------------------------------- /external/android-emugl/shared/OpenglCodecCommon/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ROOT=../.. 3 | 4 | include $(ROOT)/make/commondefs 5 | 6 | CXXFILES = TcpStream.cpp GLClientState.cpp glUtils.cpp 7 | CXXINCS += -I$(ROOT)/libs/GLESv1 -I$(ROOT)/include 8 | 9 | LIBRARY_NAME = libcodecCommon.a 10 | 11 | include $(COMMONRULES) 12 | 13 | 14 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(common) 2 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMMON_SOURCES 2 | condition_variable.h 3 | crash_reporter.cpp 4 | crash_reporter.h 5 | id_to_object_map.cpp 6 | id_to_object_map.h 7 | lazy_instance.cpp 8 | lazy_instance.h 9 | logging.cpp 10 | logging.h 11 | message_channel.cpp 12 | message_channel.h 13 | mutex.h 14 | mutex_unittest.cpp 15 | pod_vector.cpp 16 | pod_vector.h 17 | scoped_pointer_vector.h 18 | shared_library.cpp 19 | shared_library.h 20 | smart_ptr.h 21 | sockets.cpp 22 | sockets.h 23 | thread.h 24 | thread_pthread.cpp 25 | thread_store.cpp 26 | thread_store.h 27 | thread_unittest.cpp 28 | unique_integer_map.h 29 | stringparsing.cpp 30 | stringparsing.h) 31 | 32 | add_library(emugl_common STATIC ${COMMON_SOURCES}) 33 | target_link_libraries(emugl_common 34 | dl pthread) 35 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/condition_variable_unittest.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #include "emugl/common/condition_variable.h" 16 | 17 | #include "emugl/common/mutex.h" 18 | 19 | #include 20 | 21 | namespace emugl { 22 | 23 | TEST(ConditionVariable, init) { 24 | ConditionVariable cond; 25 | } 26 | 27 | } // namespace emugl 28 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/crash_reporter.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "crash_reporter.h" 18 | 19 | #include 20 | 21 | void default_crash_reporter(const emugl::LogLevel &level, const char* format, ...) { 22 | abort(); 23 | } 24 | 25 | logger_t emugl_crash_reporter = default_crash_reporter; 26 | 27 | void set_emugl_crash_reporter(logger_t crash_reporter) { 28 | if (crash_reporter) { 29 | emugl_crash_reporter = crash_reporter; 30 | } else { 31 | emugl_crash_reporter = default_crash_reporter; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/crash_reporter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include "emugl/common/logging.h" 20 | 21 | extern logger_t emugl_crash_reporter; 22 | void set_emugl_crash_reporter(logger_t crash_reporter); 23 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/logging.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "emugl/common/logging.h" 18 | 19 | void default_logger(const emugl::LogLevel &level, const char* fmt, ...) { } 20 | 21 | logger_t emugl_logger = default_logger; 22 | logger_t emugl_cxt_logger = default_logger; 23 | 24 | void set_emugl_logger(logger_t f) { 25 | if (!f) { 26 | emugl_logger = default_logger; 27 | } else { 28 | emugl_logger = f; 29 | } 30 | } 31 | 32 | void set_emugl_cxt_logger(logger_t f) { 33 | if (!f) { 34 | emugl_cxt_logger = default_logger; 35 | } else { 36 | emugl_cxt_logger = f; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/scoped_pointer_vector.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | #ifndef EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 16 | #define EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 17 | 18 | namespace emugl { 19 | 20 | template 21 | class ScopedPointerVector { 22 | ScopedPointerVector 23 | }; 24 | 25 | } // namespace emugl 26 | 27 | #endif // EMUGL_COMMON_SCOPED_POINTER_VECTOR_H 28 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/smart_ptr.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | #pragma once 15 | 16 | #include 17 | 18 | namespace emugl { 19 | 20 | template 21 | using SmartPtr = std::shared_ptr; 22 | 23 | } // namespace emugl 24 | -------------------------------------------------------------------------------- /external/android-emugl/shared/emugl/common/testing/test_shared_library.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 The Android Open Source Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // This source file must be compiled into a simple shared library which 16 | // will be used by shared_library_unittest.cpp to verify that the 17 | // emugl::SharedLibrary class works properly. 18 | 19 | 20 | extern "C" int foo_function(void) { 21 | return 42; 22 | } 23 | -------------------------------------------------------------------------------- /external/glm/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # CMake 31 | CMakeCache.txt 32 | CMakeFiles 33 | Makefile 34 | cmake_install.cmake 35 | install_manifest.txt 36 | *.cmake 37 | # ^ May need to add future .cmake files as exceptions 38 | 39 | # Test logs 40 | Testing/* 41 | 42 | # Test input 43 | test/gtc/*.dds 44 | 45 | # Project Files 46 | *.cbp 47 | *.user 48 | -------------------------------------------------------------------------------- /external/glm/cmake/glmBuildConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@") 3 | 4 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 5 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 6 | endif() 7 | -------------------------------------------------------------------------------- /external/glm/cmake/glmConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | 3 | @PACKAGE_INIT@ 4 | 5 | set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") 6 | 7 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 8 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 9 | endif() 10 | -------------------------------------------------------------------------------- /external/glm/doc/api/arrowdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/arrowdown.png -------------------------------------------------------------------------------- /external/glm/doc/api/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/arrowright.png -------------------------------------------------------------------------------- /external/glm/doc/api/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/bc_s.png -------------------------------------------------------------------------------- /external/glm/doc/api/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/bdwn.png -------------------------------------------------------------------------------- /external/glm/doc/api/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/closed.png -------------------------------------------------------------------------------- /external/glm/doc/api/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/doc.png -------------------------------------------------------------------------------- /external/glm/doc/api/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/doxygen.png -------------------------------------------------------------------------------- /external/glm/doc/api/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/folderclosed.png -------------------------------------------------------------------------------- /external/glm/doc/api/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/folderopen.png -------------------------------------------------------------------------------- /external/glm/doc/api/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/logo.png -------------------------------------------------------------------------------- /external/glm/doc/api/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/nav_f.png -------------------------------------------------------------------------------- /external/glm/doc/api/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/nav_g.png -------------------------------------------------------------------------------- /external/glm/doc/api/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/nav_h.png -------------------------------------------------------------------------------- /external/glm/doc/api/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/open.png -------------------------------------------------------------------------------- /external/glm/doc/api/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/splitbar.png -------------------------------------------------------------------------------- /external/glm/doc/api/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/sync_off.png -------------------------------------------------------------------------------- /external/glm/doc/api/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/sync_on.png -------------------------------------------------------------------------------- /external/glm/doc/api/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/tab_a.png -------------------------------------------------------------------------------- /external/glm/doc/api/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/tab_b.png -------------------------------------------------------------------------------- /external/glm/doc/api/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/tab_h.png -------------------------------------------------------------------------------- /external/glm/doc/api/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/api/tab_s.png -------------------------------------------------------------------------------- /external/glm/doc/glm.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/glm.docx -------------------------------------------------------------------------------- /external/glm/doc/glm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/glm.pdf -------------------------------------------------------------------------------- /external/glm/doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/doc/logo.png -------------------------------------------------------------------------------- /external/glm/test/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/test/.DS_Store -------------------------------------------------------------------------------- /external/glm/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | function(glmCreateTestGTC NAME) 2 | if(GLM_TEST_ENABLE) 3 | set(SAMPLE_NAME test-${NAME}) 4 | add_executable(${SAMPLE_NAME} ${NAME}.cpp) 5 | 6 | add_test( 7 | NAME ${SAMPLE_NAME} 8 | COMMAND $ ) 9 | endif(GLM_TEST_ENABLE) 10 | endfunction() 11 | 12 | add_subdirectory(bug) 13 | add_subdirectory(core) 14 | add_subdirectory(gtc) 15 | add_subdirectory(gtx) 16 | 17 | 18 | -------------------------------------------------------------------------------- /external/glm/test/bug/CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/test/bug/CMakeLists.txt -------------------------------------------------------------------------------- /external/glm/test/external/gli/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME gli) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | 7 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) 8 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl) 9 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) 10 | 11 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 12 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 13 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 14 | 15 | source_group("Core Files" FILES ${CORE_SOURCE}) 16 | source_group("Core Files" FILES ${CORE_INLINE}) 17 | source_group("Core Files" FILES ${CORE_HEADER}) 18 | source_group("GTX Files" FILES ${GTX_SOURCE}) 19 | source_group("GTX Files" FILES ${GTX_INLINE}) 20 | source_group("GTX Files" FILES ${GTX_HEADER}) 21 | 22 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 23 | 24 | add_executable(${NAME} 25 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 26 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 27 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ) 28 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/core/dummy.cpp: -------------------------------------------------------------------------------- 1 | int main() 2 | { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/core/generate_mipmaps.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/core/generate_mipmaps.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GENERATE_MIPMAPS_INCLUDED 11 | #define GLI_GENERATE_MIPMAPS_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | texture2D generateMipmaps( 18 | texture2D const & Texture, 19 | texture2D::level_type const & BaseLevel); 20 | 21 | }//namespace gli 22 | 23 | #include "generate_mipmaps.inl" 24 | 25 | #endif//GLI_GENERATE_MIPMAPS_INCLUDED 26 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/core/operator.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-19 5 | // Updated : 2010-01-19 6 | // Licence : This source is under MIT License 7 | // File : gli/core/operator.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_OPERATOR_INCLUDED 11 | #define GLI_OPERATOR_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli{ 16 | namespace detail 17 | { 18 | 19 | }//namespace detail 20 | 21 | texture2D operator+(texture2D const & TextureA, texture2D const & TextureB); 22 | texture2D operator-(texture2D const & TextureA, texture2D const & TextureB); 23 | 24 | }//namespace gli 25 | 26 | #include "operator.inl" 27 | 28 | #endif//GLI_OPERATOR_INCLUDED 29 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/core/size.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-08 6 | // Licence : This source is under MIT License 7 | // File : gli/core/size.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_CORE_SIZE_INCLUDED 11 | #define GLI_CORE_SIZE_INCLUDED 12 | 13 | #include "texture2d.hpp" 14 | 15 | namespace gli 16 | { 17 | //template 18 | image2D::size_type size( 19 | image2D const & Image, 20 | image2D::size_type const & SizeType); 21 | 22 | //template 23 | texture2D::size_type size( 24 | texture2D const & Texture, 25 | texture2D::size_type const & SizeType); 26 | 27 | }//namespace gli 28 | 29 | #include "size.inl" 30 | 31 | #endif//GLI_CORE_SIZE_INCLUDED 32 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gli.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-09-29 6 | // Licence : This source is under MIT License 7 | // File : gli/gli.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | /*! \mainpage OpenGL Image 11 | * 12 | */ 13 | 14 | #ifndef GLI_GLI_INCLUDED 15 | #define GLI_GLI_INCLUDED 16 | 17 | #define GLI_VERSION 31 18 | #define GLI_VERSION_MAJOR 0 19 | #define GLI_VERSION_MINOR 3 20 | #define GLI_VERSION_PATCH 1 21 | #define GLI_VERSION_REVISION 0 22 | 23 | #include "./core/texture2d.hpp" 24 | #include "./core/texture2d_array.hpp" 25 | #include "./core/texture_cube.hpp" 26 | #include "./core/texture_cube_array.hpp" 27 | #include "./core/size.hpp" 28 | #include "./core/operation.hpp" 29 | #include "./core/generate_mipmaps.hpp" 30 | 31 | #endif//GLI_GLI_INCLUDED 32 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/compression.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_COMPRESSION_INCLUDED 11 | #define GLI_GTX_COMPRESSION_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace compression 16 | { 17 | 18 | 19 | }//namespace compression 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::compression;} 24 | 25 | #include "compression.inl" 26 | 27 | #endif//GLI_GTX_COMPRESSION_INCLUDED 28 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/compression.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/compression.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/gl_texture2d.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-27 5 | // Updated : 2010-10-01 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gl_texture2d.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GL_TEXTURE2D_INCLUDED 11 | #define GLI_GTX_GL_TEXTURE2D_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader.hpp" 15 | 16 | #ifndef GL_VERSION_1_1 17 | #error "ERROR: OpenGL must be included before GLI_GTX_gl_texture2d" 18 | #endif//GL_VERSION_1_1 19 | 20 | namespace gli{ 21 | namespace gtx{ 22 | namespace gl_texture2d 23 | { 24 | GLuint createTexture2D(std::string const & Filename); 25 | }//namespace gl_texture2d 26 | }//namespace gtx 27 | }//namespace gli 28 | 29 | namespace gli{using namespace gtx::gl_texture2d;} 30 | 31 | #include "gl_texture2d.inl" 32 | 33 | #endif//GLI_GTX_GL_TEXTURE2D_INCLUDED 34 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/gradient.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-12-19 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/gradient.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_GRADIENT_INCLUDED 11 | #define GLI_GTX_GRADIENT_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | 15 | namespace gli{ 16 | namespace gtx{ 17 | namespace gradient 18 | { 19 | texture2D radial( 20 | texture2D::dimensions_type const & Size, 21 | texture2D::texcoord_type const & Center, 22 | float const & Radius, 23 | texture2D::texcoord_type const & Focal); 24 | 25 | texture2D linear( 26 | texture2D::dimensions_type const & Size, 27 | texture2D::texcoord_type const & Point0, 28 | texture2D::texcoord_type const & Point1); 29 | 30 | }//namespace gradient 31 | }//namespace gtx 32 | }//namespace gli 33 | 34 | namespace gli{using namespace gtx::gradient;} 35 | 36 | #include "gradient.inl" 37 | 38 | #endif//GLI_GTX_GRADIENT_INCLUDED 39 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/loader.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_INCLUDED 11 | #define GLI_GTX_LOADER_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include "../gtx/loader_dds9.hpp" 15 | #include "../gtx/loader_dds10.hpp" 16 | #include "../gtx/loader_tga.hpp" 17 | 18 | namespace gli{ 19 | namespace gtx{ 20 | namespace loader 21 | { 22 | inline texture2D load( 23 | std::string const & Filename); 24 | 25 | inline void save( 26 | texture2D const & Image, 27 | std::string const & Filename); 28 | 29 | }//namespace loader 30 | }//namespace gtx 31 | }//namespace gli 32 | 33 | namespace gli{using namespace gtx::loader;} 34 | 35 | #include "loader.inl" 36 | 37 | #endif//GLI_GTX_LOADER_INCLUDED 38 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/loader_dds10.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-26 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds10.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS10_INCLUDED 11 | #define GLI_GTX_LOADER_DDS10_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds10 19 | { 20 | texture2D loadDDS10( 21 | std::string const & Filename); 22 | 23 | void saveDDS10( 24 | texture2D const & Image, 25 | std::string const & Filename); 26 | 27 | }//namespace loader_dds10 28 | }//namespace gtx 29 | }//namespace gli 30 | 31 | namespace gli{using namespace gtx::loader_dds10;} 32 | 33 | #include "loader_dds10.inl" 34 | 35 | #endif//GLI_GTX_LOADER_DDS10_INCLUDED 36 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/loader_dds9.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_dds9.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_DDS9_INCLUDED 11 | #define GLI_GTX_LOADER_DDS9_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | 16 | namespace gli{ 17 | namespace gtx{ 18 | namespace loader_dds9 19 | { 20 | texture2D loadDDS9( 21 | std::string const & Filename); 22 | 23 | void saveDDS9( 24 | texture2D const & Texture, 25 | std::string const & Filename); 26 | 27 | void saveTextureCubeDDS9( 28 | textureCube const & Texture, 29 | std::string const & Filename); 30 | 31 | }//namespace loader_dds9 32 | }//namespace gtx 33 | }//namespace gli 34 | 35 | namespace gli{using namespace gtx::loader_dds9;} 36 | 37 | #include "loader_dds9.inl" 38 | 39 | #endif//GLI_GTX_LOADER_DDS9_INCLUDED 40 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/loader_tga.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-08 5 | // Updated : 2010-09-27 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/loader_tga.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_LOADER_TGA_INCLUDED 11 | #define GLI_GTX_LOADER_TGA_INCLUDED 12 | 13 | #include "../gli.hpp" 14 | #include 15 | #include 16 | 17 | namespace gli{ 18 | namespace gtx{ 19 | namespace loader_tga 20 | { 21 | texture2D loadTGA( 22 | std::string const & Filename); 23 | 24 | void saveTGA( 25 | texture2D const & Image, 26 | std::string const & Filename); 27 | 28 | }//namespace loader_tga 29 | }//namespace gtx 30 | }//namespace gli 31 | 32 | namespace gli{using namespace gtx::loader_tga;} 33 | 34 | #include "loader_tga.inl" 35 | 36 | #endif//GLI_GTX_LOADER_TGA_INCLUDED 37 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/wavelet.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.hpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef GLI_GTX_WAVELET_INCLUDED 11 | #define GLI_GTX_WAVELET_INCLUDED 12 | 13 | namespace gli{ 14 | namespace gtx{ 15 | namespace wavelet 16 | { 17 | 18 | 19 | }//namespace wavelet 20 | }//namespace gtx 21 | }//namespace gli 22 | 23 | namespace gli{using namespace gtx::wavelet;} 24 | 25 | #include "wavelet.inl" 26 | 27 | #endif//GLI_GTX_WAVELET_INCLUDED 28 | -------------------------------------------------------------------------------- /external/glm/test/external/gli/gtx/wavelet.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Image Copyright (c) 2008 - 2011 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-01-09 5 | // Updated : 2010-01-09 6 | // Licence : This source is under MIT License 7 | // File : gli/gtx/wavelet.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | -------------------------------------------------------------------------------- /external/glm/test/glm.cppcheck: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /external/glm/test/gtc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | glmCreateTestGTC(gtc_bitfield) 2 | glmCreateTestGTC(gtc_color_space) 3 | glmCreateTestGTC(gtc_constants) 4 | glmCreateTestGTC(gtc_epsilon) 5 | glmCreateTestGTC(gtc_integer) 6 | glmCreateTestGTC(gtc_matrix_access) 7 | glmCreateTestGTC(gtc_matrix_integer) 8 | glmCreateTestGTC(gtc_matrix_inverse) 9 | glmCreateTestGTC(gtc_matrix_transform) 10 | glmCreateTestGTC(gtc_noise) 11 | glmCreateTestGTC(gtc_packing) 12 | glmCreateTestGTC(gtc_quaternion) 13 | glmCreateTestGTC(gtc_random) 14 | glmCreateTestGTC(gtc_round) 15 | glmCreateTestGTC(gtc_reciprocal) 16 | glmCreateTestGTC(gtc_type_precision) 17 | glmCreateTestGTC(gtc_type_ptr) 18 | glmCreateTestGTC(gtc_ulp) 19 | glmCreateTestGTC(gtc_vec1) 20 | -------------------------------------------------------------------------------- /external/glm/test/gtc/gtc_quaternion.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/external/glm/test/gtc/gtc_quaternion.cpp -------------------------------------------------------------------------------- /external/glm/test/gtc/gtc_user_defined_types.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2010-09-16 5 | // Updated : 2011-05-27 6 | // Licence : This source is under MIT licence 7 | // File : test/gtc/type_ptr.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #define GLM_FORCE_RADIANS 11 | #include 12 | 13 | int test_make_pointer_vec() 14 | { 15 | int Error = 0; 16 | 17 | glm::func(); 18 | //func(); 19 | 20 | return Error; 21 | } 22 | 23 | int main() 24 | { 25 | int Error = 0; 26 | 27 | Error += test_make_pointer_vec(); 28 | 29 | return Error; 30 | } 31 | -------------------------------------------------------------------------------- /external/glm/test/gtx/gtx_int_10_10_10_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /external/glm/test/gtx/gtx_mixed_product.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-10-25 5 | // Updated : 2013-10-25 6 | // Licence : This source is under MIT licence 7 | // File : test/gtx/associated_min_max.cpp 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | int Error(0); 16 | 17 | return Error; 18 | } 19 | -------------------------------------------------------------------------------- /external/glm/util/autoexp.txt: -------------------------------------------------------------------------------- 1 | [Visualizer] 2 | 3 | glm::detail::tvec2<*>{ 4 | preview ( 5 | #(#($c.x,$c.y)) 6 | ) 7 | children ( 8 | #([x]: $c.x,[y]: $c.y) 9 | ) 10 | } 11 | 12 | glm::detail::tvec3<*>{ 13 | preview ( 14 | #($e.x,$e.y,$e.z) 15 | ) 16 | children ( 17 | #([x]: $e.x,[y]: $e.y,[z]: $e.z) 18 | ) 19 | } 20 | 21 | glm::detail::tvec4<*>{ 22 | preview ( 23 | #($c.x,$c.y,$c.z,$c.w) 24 | ) 25 | children ( 26 | #([x]: $e.x,[y]: $e.y,[z]: $e.z, #([w]: $e.w)) 27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright © 2013 Canonical Ltd. 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License version 3 as 5 | # published by the Free Software Foundation. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program. If not, see . 14 | # 15 | # Authored by: Thomas Voss 16 | 17 | cmake_minimum_required(VERSION 2.8) 18 | 19 | project(process-cpp) 20 | 21 | find_package(Boost COMPONENTS iostreams system REQUIRED) 22 | find_package(Threads REQUIRED) 23 | 24 | include(GNUInstallDirs) 25 | 26 | set(PROCESS_CPP_VERSION_MAJOR 2) 27 | set(PROCESS_CPP_VERSION_MINOR 0) 28 | set(PROCESS_CPP_VERSION_PATCH 0) 29 | 30 | include(CTest) 31 | 32 | include_directories( 33 | include/ 34 | src/ 35 | external/process-cpp-minimal 36 | ${Boost_INCLUDE_DIRS} 37 | ) 38 | 39 | add_subdirectory(src) 40 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/include/core/posix/exit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #ifndef CORE_POSIX_EXIT_H_ 20 | #define CORE_POSIX_EXIT_H_ 21 | 22 | #include 23 | 24 | namespace core 25 | { 26 | namespace posix 27 | { 28 | namespace exit 29 | { 30 | /** 31 | * @brief The Status enum wrap's the posix exit status. 32 | */ 33 | enum class Status 34 | { 35 | success = EXIT_SUCCESS, 36 | failure = EXIT_FAILURE 37 | }; 38 | } 39 | } 40 | } 41 | 42 | #endif // CORE_POSIX_EXIT_H_ 43 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/include/core/posix/visibility.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #ifndef CORE_POSIX_VISIBILITY_H_ 20 | #define CORE_POSIX_VISIBILITY_H_ 21 | 22 | #if __GNUC__ >= 4 23 | #define CORE_POSIX_DLL_PUBLIC __attribute__ ((visibility ("default"))) 24 | #define CORE_POSIX_DLL_LOCAL __attribute__ ((visibility ("hidden"))) 25 | #else 26 | #define CORE_POSIX_DLL_PUBLIC 27 | #define CORE_POSIX_DLL_LOCAL 28 | #endif 29 | 30 | #endif // CORE_POSIX_VISIBILITY_H_ 31 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright © 2013 Canonical Ltd. 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License version 3 as 5 | # published by the Free Software Foundation. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program. If not, see . 14 | # 15 | # Authored by: Thomas Voss 16 | 17 | add_library( 18 | posix-process 19 | 20 | process.cpp 21 | ) 22 | 23 | add_subdirectory(linux) 24 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright © 2013 Canonical Ltd. 2 | # 3 | # This program is free software: you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License version 3 as 5 | # published by the Free Software Foundation. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program. If not, see . 14 | # 15 | # Authored by: Thomas Voss 16 | 17 | add_library( 18 | linux-process 19 | 20 | process.cpp 21 | ) 22 | 23 | target_link_libraries( 24 | linux-process 25 | 26 | posix-process 27 | ) 28 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/linux/proc/process/state.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #include 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace core 26 | { 27 | namespace posix 28 | { 29 | namespace linux 30 | { 31 | namespace proc 32 | { 33 | namespace process 34 | { 35 | 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/process_group.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #include 20 | 21 | namespace core 22 | { 23 | namespace posix 24 | { 25 | struct ProcessGroup::Private 26 | { 27 | pid_t id; 28 | }; 29 | 30 | pid_t ProcessGroup::id() const 31 | { 32 | return d->id; 33 | } 34 | 35 | ProcessGroup::ProcessGroup(pid_t id) 36 | : Signalable(-id), // We rely on ::kill to deliver signals, thus negate the id (see man 2 kill). 37 | d(new Private{id}) 38 | { 39 | } 40 | 41 | ProcessGroup ProcessGroup::invalid() 42 | { 43 | static const pid_t invalid_pid = 1; 44 | return ProcessGroup(invalid_pid); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/standard_stream.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #include 20 | 21 | namespace core 22 | { 23 | namespace posix 24 | { 25 | StandardStream operator|(StandardStream l, StandardStream r) 26 | { 27 | return static_cast(static_cast(l) | static_cast(r)); 28 | } 29 | 30 | StandardStream operator&(StandardStream l, StandardStream r) 31 | { 32 | return static_cast(static_cast(l) & static_cast(r)); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/src/core/posix/wait.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | */ 18 | 19 | #include 20 | 21 | namespace core 22 | { 23 | namespace posix 24 | { 25 | namespace wait 26 | { 27 | Flags operator|(Flags l, Flags r) 28 | { 29 | return static_cast(static_cast(l) | static_cast(r)); 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /external/process-cpp-minimal/symbols.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | extern "C++" { 4 | core::*; 5 | typeinfo?for?core::*; 6 | typeinfo?name?for?core::*; 7 | VTT?for?core::*; 8 | virtual?thunk?to?core::*; 9 | vtable?for?core::*; 10 | std::hash*; 11 | }; 12 | local: 13 | extern "C++" { 14 | *; 15 | }; 16 | }; -------------------------------------------------------------------------------- /external/xdg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # We have to manually alter the cxx flags to have a working 2 | # travis-ci build. Its container-based infrastructure only features 3 | # a very old cmake that does not support the more current: 4 | # set_property(TARGET xdg_test PROPERTY CXX_STANDARD 11) 5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 6 | 7 | find_package(Boost COMPONENTS filesystem system unit_test_framework) 8 | 9 | include_directories( 10 | . 11 | ${Boost_INCLUDE_DIRS} 12 | ) 13 | 14 | add_library(xdg STATIC xdg.cpp) 15 | set_property(TARGET xdg PROPERTY CXX_STANDARD 11) 16 | target_link_libraries(xdg ${Boost_LIBRARIES}) 17 | 18 | enable_testing() 19 | add_definitions(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN -DBOOST_TEST_MODULE=xdg) 20 | add_executable(xdg_test xdg_test.cpp) 21 | set_property(TARGET xdg_test PROPERTY CXX_STANDARD 11) 22 | target_link_libraries(xdg_test xdg ${Boost_LIBRARIES}) 23 | 24 | add_test(xdg_test xdg_test) 25 | -------------------------------------------------------------------------------- /kernel/ashmem/Makefile: -------------------------------------------------------------------------------- 1 | ccflags-y += -I$(src) -Wno-error=implicit-int -Wno-int-conversion 2 | obj-m := ashmem_linux.o 3 | ashmem_linux-y := deps.o ashmem.o 4 | 5 | KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build 6 | $(warning "KERNEL_SRC: $(KERNEL_SRC), DESTDIR: $(DESTDIR), MAKE: $(MAKE), ccflags-y: $(ccflags-y)") 7 | 8 | all: 9 | $(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD 10 | 11 | clean: 12 | rm -rf deps.h *.o *.ko *.mod.c *.symvers *.order .*.cmd .tmp_versions .cache.mk 13 | -------------------------------------------------------------------------------- /kernel/ashmem/ashmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/linux/ashmem.h 3 | * 4 | * Copyright 2008 Google Inc. 5 | * Author: Robert Love 6 | * 7 | * This file is dual licensed. It may be redistributed and/or modified 8 | * under the terms of the Apache 2.0 License OR version 2 of the GNU 9 | * General Public License. 10 | */ 11 | 12 | #ifndef _LINUX_ASHMEM_H 13 | #define _LINUX_ASHMEM_H 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | #include "uapi/ashmem.h" 20 | 21 | /* support of 32bit userspace on 64bit platforms */ 22 | #ifdef CONFIG_COMPAT 23 | #define COMPAT_ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, compat_size_t) 24 | #define COMPAT_ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned int) 25 | #endif 26 | 27 | #endif /* _LINUX_ASHMEM_H */ 28 | -------------------------------------------------------------------------------- /kernel/ashmem/deps.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static int (*shmem_zero_setup_ptr)(struct vm_area_struct *) = NULL; 5 | 6 | int shmem_zero_setup(struct vm_area_struct *vma) 7 | { 8 | if (!shmem_zero_setup_ptr) 9 | shmem_zero_setup_ptr = kallsyms_lookup_name("shmem_zero_setup"); 10 | return shmem_zero_setup_ptr(vma); 11 | } 12 | -------------------------------------------------------------------------------- /kernel/binder/Makefile: -------------------------------------------------------------------------------- 1 | ccflags-y += -I$(src) -Wno-int-conversion 2 | obj-m := binder_linux.o 3 | binder_linux-y := deps.o binder.o 4 | 5 | KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build 6 | all: 7 | $(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD 8 | clean: 9 | rm -rf deps.h *.o *.ko *.mod.c *.symvers *.order .*.cmd .tmp_versions .cache.mk 10 | -------------------------------------------------------------------------------- /libs/libEGL.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/libs/libEGL.so -------------------------------------------------------------------------------- /libs/libGLES_CM.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/libs/libGLES_CM.so -------------------------------------------------------------------------------- /libs/libGLESv2.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/libs/libGLESv2.so -------------------------------------------------------------------------------- /scripts/create-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | ramdisk=$1 6 | system=$2 7 | 8 | if [ -z "$ramdisk" ] || [ -z "$system" ]; then 9 | echo "Usage: $0 " 10 | exit 1 11 | fi 12 | 13 | workdir=`mktemp -d` 14 | rootfs=$workdir/rootfs 15 | 16 | mkdir -p $rootfs 17 | 18 | # Extract ramdisk and preserve ownership of files 19 | (cd $rootfs ; cat $ramdisk | gzip -d | sudo cpio -i) 20 | 21 | mkdir $workdir/system 22 | sudo mount -o loop,rw $system $workdir/system 23 | sudo cp -ar $workdir/system/* $rootfs/system 24 | sudo umount $workdir/system 25 | 26 | # FIXME 27 | sudo chmod +x $rootfs/openvmi-init.sh 28 | 29 | if [ -e android.img ]; then 30 | DATE=`date +%F_%R` 31 | SAVETO=android-old-$DATE.img 32 | 33 | echo "#########################################################" 34 | echo "# WARNING: Old android.img still exists. " 35 | echo "# Moving it to $SAVETO. " 36 | echo "#########################################################" 37 | 38 | mv android.img $SAVETO 39 | fi 40 | 41 | sudo mksquashfs $rootfs android.img -comp xz -no-xattrs 42 | sudo chown $USER:$USER android.img 43 | 44 | sudo rm -rf $workdir 45 | -------------------------------------------------------------------------------- /scripts/openvmi-init.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Copyright (C) 2016 Simon Fels 3 | # 4 | # This program is free software: you can redistribute it and/or modify it 5 | # under the terms of the GNU General Public License version 3, as published 6 | # by the Free Software Foundation. 7 | # 8 | # This program is distributed in the hope that it will be useful, but 9 | # WITHOUT ANY WARRANTY; without even the implied warranties of 10 | # MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | # PURPOSE. See the GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License along 14 | # with this program. If not, see . 15 | 16 | set -x 17 | 18 | function prepare_filesystem() { 19 | # These dev files need to be adjusted everytime as they are 20 | # bind mounted into the temporary rootfs 21 | for f in qemu_pipe qemu_trace goldfish_pipe input/* ; do 22 | if [ ! -e "/dev/$f" ] ; then 23 | continue 24 | fi 25 | chown system:system /dev/$f 26 | chmod 0666 /dev/$f 27 | done 28 | cp -rf /system/etc/* /etc/ 29 | if [ -e "/dev/tun" ] ; then 30 | chown system:vpn /dev/tun 31 | chmod 0660 /dev/tun 32 | fi 33 | } 34 | 35 | prepare_filesystem & 36 | echo "Waiting for filesystem being prepared ..." 37 | wait $! 38 | 39 | echo "Starting real init now ..." 40 | exec /init 41 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/daemon.h" 19 | #include "openvmi/utils.h" 20 | 21 | int main(int argc, char **argv) { 22 | openvmi::Daemon daemon; 23 | return daemon.Run(openvmi::utils::collect_arguments(argc, argv)); 24 | } 25 | -------------------------------------------------------------------------------- /src/openvmi/android/intent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_ANDROID_INTENT_H_ 19 | #define OPENVMI_ANDROID_INTENT_H_ 20 | 21 | #include 22 | #include 23 | 24 | namespace openvmi { 25 | namespace android { 26 | struct Intent { 27 | std::string action; 28 | std::string uri; 29 | std::string type; 30 | int flags = 0; 31 | std::string package; 32 | std::string component; 33 | std::vector categories; 34 | 35 | bool valid() const; 36 | }; 37 | 38 | std::ostream &operator<<(std::ostream &out, const Intent &intent); 39 | } // namespace android 40 | } // namespace openvmi 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/openvmi/build/config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Canonical, Ltd. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | * 18 | */ 19 | 20 | #ifndef OPENVMI_CONFIG_H_ 21 | #define OPENVMI_CONFIG_H_ 22 | 23 | #include 24 | #include 25 | 26 | namespace openvmi { 27 | namespace build { 28 | /// @brief version marks the version 29 | static constexpr const char *version{"@OPENVMI_VERSION@"}; 30 | 31 | // path for system configuration 32 | static constexpr const char *default_resource_path{"@OPENVMI_RESOURCE_DIR_FULL@"}; 33 | static constexpr const char *default_data_path{"@OPENVMI_STATEDIR_FULL@"}; 34 | } // namespace build 35 | } // namespace openvmi 36 | 37 | #endif // OPENVMI_CONFIG_H_ 38 | -------------------------------------------------------------------------------- /src/openvmi/cmds/generate_ip_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Lee Jones 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_CMDS_GEN_IP_CONFIG_H_ 19 | #define OPENVMI_CMDS_GEN_IP_CONFIG_H_ 20 | 21 | #include "openvmi/cli.h" 22 | 23 | #include 24 | 25 | namespace openvmi { 26 | namespace cmds { 27 | class GenerateIpConfig : public cli::CommandWithFlagsAndAction { 28 | public: 29 | GenerateIpConfig(); 30 | 31 | private: 32 | std::string ip_; 33 | std::string gateway_; 34 | std::string dns_; 35 | uint32_t cidr_; 36 | std::string ipcfg_path; 37 | }; 38 | } // namespace cmds 39 | } // namespace openvmi 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/openvmi/cmds/install.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_CMDS_INSTALL_H_ 19 | #define OPENVMI_CMDS_INSTALL_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include "openvmi/cli.h" 26 | 27 | namespace openvmi { 28 | namespace cmds { 29 | class Install : public cli::CommandWithFlagsAndAction { 30 | public: 31 | Install(); 32 | 33 | private: 34 | std::string apk_; 35 | }; 36 | } // namespace cmds 37 | } // namespace openvmi 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/openvmi/cmds/system_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Simon Fels 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_CMDS_SYSTEM_INFO_H_ 19 | #define OPENVMI_CMDS_SYSTEM_INFO_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include "openvmi/cli.h" 26 | 27 | namespace openvmi { 28 | namespace cmds { 29 | class SystemInfo : public cli::CommandWithFlagsAndAction { 30 | public: 31 | SystemInfo(); 32 | }; 33 | } // namespace cmds 34 | } // namespace openvmi 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/openvmi/cmds/version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Canonical, Ltd. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | * 18 | */ 19 | 20 | #include "openvmi/cmds/version.h" 21 | #include "openvmi/build/config.h" 22 | #include "openvmi/utils.h" 23 | 24 | openvmi::cmds::Version::Version() 25 | : CommandWithFlagsAndAction{ 26 | cli::Name{"version"}, cli::Usage{"version"}, 27 | cli::Description{"print the version of the daemon"}} { 28 | action([](const cli::Command::Context& ctxt) { 29 | ctxt.cout << "openvmi " << build::version << std::endl; 30 | return 0; 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /src/openvmi/cmds/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Canonical, Ltd. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | * 18 | */ 19 | 20 | #ifndef OPENVMI_CMDS_VERSION_H_ 21 | #define OPENVMI_CMDS_VERSION_H_ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include "openvmi/cli.h" 28 | 29 | namespace openvmi { 30 | namespace cmds { 31 | class Version : public cli::CommandWithFlagsAndAction { 32 | public: 33 | Version(); 34 | }; 35 | } // namespace cmds 36 | } // namespace openvmi 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/openvmi/cmds/wait_ready.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_CMDS_WAIT_READY_H_ 19 | #define OPENVMI_CMDS_WAIT_READY_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include "openvmi/cli.h" 26 | 27 | namespace openvmi { 28 | namespace cmds { 29 | class WaitReady : public cli::CommandWithFlagsAndAction { 30 | public: 31 | WaitReady(); 32 | 33 | private: 34 | bool use_system_dbus_ = false; 35 | }; 36 | } // namespace cmds 37 | } // namespace openvmi 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/openvmi/common/fd_sets.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2013 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Robert Carr 17 | */ 18 | 19 | #ifndef OPENVMI_COMMON_FD_SETS_H_ 20 | #define OPENVMI_COMMON_FD_SETS_H_ 21 | 22 | #include 23 | #include 24 | 25 | #include "openvmi/common/fd.h" 26 | 27 | namespace openvmi { 28 | typedef std::vector> FdSets; 29 | } // namespace openvmi 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/openvmi/common/loop_device_allocator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_COMMON_LOOP_DEVICE_ALLOCATOR_H_ 19 | #define OPENVMI_COMMON_LOOP_DEVICE_ALLOCATOR_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace common { 25 | class LoopDevice; 26 | class LoopDeviceAllocator { 27 | public: 28 | static std::shared_ptr new_device(); 29 | }; 30 | } // namespace common 31 | } // namespace openvmi 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/openvmi/daemon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_DAEMON_H_ 19 | #define OPENVMI_DAEMON_H_ 20 | 21 | #include 22 | #include 23 | 24 | #include "openvmi/cli.h" 25 | #include "openvmi/do_not_copy_or_move.h" 26 | 27 | namespace openvmi { 28 | class Daemon : public DoNotCopyOrMove { 29 | public: 30 | Daemon(); 31 | 32 | int Run(const std::vector &arguments); 33 | 34 | private: 35 | cli::CommandWithSubcommands cmd; 36 | }; 37 | } // namespace openvmi 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/openvmi/dbus/sd_bus_helpers.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Martin Unzner 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_DBUS_SD_BUS_HELPERS_HPP_ 19 | #define OPENVMI_DBUS_SD_BUS_HELPERS_HPP_ 20 | 21 | namespace openvmi { 22 | namespace dbus { 23 | 24 | extern "C" { 25 | #include "sd_bus_helpers.h" 26 | } 27 | } // namespace dbus 28 | } // namespace openvmi 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/openvmi/defer_action.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_DEFER_ACTION_H_ 19 | #define OPENVMI_DEFER_ACTION_H_ 20 | 21 | #include 22 | 23 | #include "openvmi/do_not_copy_or_move.h" 24 | 25 | namespace openvmi { 26 | 27 | class DeferAction : public DoNotCopyOrMove { 28 | public: 29 | DeferAction(const std::function action) : action_(action) {} 30 | 31 | ~DeferAction() { 32 | if (action_) action_(); 33 | } 34 | 35 | private: 36 | std::function action_; 37 | }; 38 | 39 | } // namespace openvmi 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/openvmi/do_not_copy_or_move.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_DO_NOT_COPY_OR_MOVE_H_ 19 | #define OPENVMI_DO_NOT_COPY_OR_MOVE_H_ 20 | 21 | namespace openvmi { 22 | 23 | class DoNotCopyOrMove { 24 | public: 25 | DoNotCopyOrMove(const DoNotCopyOrMove&) = delete; 26 | DoNotCopyOrMove(DoNotCopyOrMove&&) = delete; 27 | virtual ~DoNotCopyOrMove() = default; 28 | DoNotCopyOrMove& operator=(const DoNotCopyOrMove&) = delete; 29 | DoNotCopyOrMove& operator=(DoNotCopyOrMove&&) = delete; 30 | 31 | protected: 32 | DoNotCopyOrMove() = default; 33 | }; 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/openvmi/graphics/density.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/graphics/density.h" 19 | 20 | namespace openvmi { 21 | namespace graphics { 22 | DensityType current_density() { 23 | return DensityType::medium; 24 | } 25 | 26 | int dp_to_pixel(unsigned int dp) { 27 | return dp * static_cast(current_density()) / static_cast(DensityType::medium); 28 | } 29 | } // namespace graphics 30 | } // namespace openvmi 31 | -------------------------------------------------------------------------------- /src/openvmi/graphics/emugl/DispatchTables.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | #pragma once 17 | 18 | #include "OpenGLESDispatch/GLESv1Dispatch.h" 19 | #include "OpenGLESDispatch/GLESv2Dispatch.h" 20 | 21 | extern GLESv2Dispatch s_gles2; 22 | extern GLESv1Dispatch s_gles1; 23 | -------------------------------------------------------------------------------- /src/openvmi/graphics/emugl/RenderControl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _RENDER_CONTROL_H 18 | #define _RENDER_CONTROL_H 19 | 20 | // Generated with emugl at build time 21 | #include "renderControl_dec.h" 22 | 23 | #include 24 | 25 | class Renderer; 26 | 27 | namespace openvmi { 28 | namespace graphics { 29 | class LayerComposer; 30 | } // namespace graphics 31 | } // namespace openvmi 32 | 33 | void initRenderControlContext(renderControl_decoder_context_t *dec); 34 | void registerLayerComposer( 35 | const std::shared_ptr &c); 36 | void registerRenderer(const std::shared_ptr &r); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/openvmi/graphics/emugl/TimeUtils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "openvmi/graphics/emugl/TimeUtils.h" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | long long GetCurrentTimeMS() { 25 | struct timespec now; 26 | clock_gettime(CLOCK_MONOTONIC, &now); 27 | long long iDiff = (now.tv_sec * 1000LL) + now.tv_nsec / 1000000LL; 28 | return iDiff; 29 | } 30 | 31 | void TimeSleepMS(int p_mili) { usleep(p_mili * 1000); } 32 | -------------------------------------------------------------------------------- /src/openvmi/graphics/emugl/TimeUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef _TIME_UTILS_H 18 | #define _TIME_UTILS_H 19 | 20 | long long GetCurrentTimeMS(); 21 | void TimeSleepMS(int p_mili); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/openvmi/graphics/renderer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_GRAPHICS_RENDERER_H_ 19 | #define OPENVMI_GRAPHICS_RENDERER_H_ 20 | 21 | #include "openvmi/graphics/emugl/Renderable.h" 22 | 23 | #include 24 | 25 | namespace openvmi { 26 | namespace graphics { 27 | class Renderer { 28 | public: 29 | virtual ~Renderer() {} 30 | 31 | virtual bool draw(EGLNativeWindowType native_window, 32 | const openvmi::graphics::Rect& window_frame, 33 | const RenderableList& renderables) = 0; 34 | }; 35 | } // namespace graphics 36 | } // namespace openvmi 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/openvmi/network/connection_context.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/network/connection_context.h" 19 | 20 | namespace openvmi { 21 | namespace network { 22 | 23 | ConnectionContext::ConnectionContext( 24 | std::function const connect_handler, Connector const* connector) 25 | : connect_handler(connect_handler), connector(connector) {} 26 | 27 | } // namespace openvmi 28 | } // namespace network 29 | -------------------------------------------------------------------------------- /src/openvmi/network/connection_creator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | -------------------------------------------------------------------------------- /src/openvmi/network/connection_creator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_NETWORK_CONNECTION_CREATOR_H_ 19 | #define OPENVMI_NETWORK_CONNECTION_CREATOR_H_ 20 | 21 | #include 22 | 23 | #include 24 | 25 | #include "openvmi/do_not_copy_or_move.h" 26 | namespace openvmi { 27 | namespace network { 28 | template 29 | class ConnectionCreator : public DoNotCopyOrMove { 30 | public: 31 | virtual void create_connection_for( 32 | std::shared_ptr> const& 33 | socket) = 0; 34 | }; 35 | } // namespace openvmi 36 | } // namespace network 37 | #endif 38 | -------------------------------------------------------------------------------- /src/openvmi/network/connector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_NETWORK_CONNECTOR_H 19 | #define OPENVMI_NETWORK_CONNECTOR_H 20 | 21 | namespace openvmi { 22 | namespace network { 23 | class Connector { 24 | public: 25 | }; 26 | } // namespace network 27 | } // namespace openvmi 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/openvmi/network/credentials.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/network/credentials.h" 19 | 20 | namespace openvmi { 21 | namespace network { 22 | Credentials::Credentials(pid_t pid, uid_t uid, gid_t gid) 23 | : pid_{pid}, uid_{uid}, gid_{gid} {} 24 | 25 | pid_t Credentials::pid() const { return pid_; } 26 | 27 | uid_t Credentials::uid() const { return uid_; } 28 | 29 | gid_t Credentials::gid() const { return gid_; } 30 | } // namespace network 31 | } // namespace openvmi 32 | -------------------------------------------------------------------------------- /src/openvmi/network/credentials.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_NETWORK_CREDENTIALS_H_ 19 | #define OPENVMI_NETWORK_CREDENTIALS_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace network { 25 | class Credentials { 26 | public: 27 | Credentials(pid_t pid, uid_t uid, gid_t gid); 28 | 29 | pid_t pid() const; 30 | uid_t uid() const; 31 | gid_t gid() const; 32 | 33 | private: 34 | Credentials() = delete; 35 | 36 | pid_t pid_; 37 | uid_t uid_; 38 | gid_t gid_; 39 | }; 40 | } // namespace network 41 | } // namespace openvmi 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/openvmi/network/delegate_message_processor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/network/delegate_message_processor.h" 19 | 20 | namespace openvmi { 21 | namespace network { 22 | DelegateMessageProcessor::DelegateMessageProcessor( 23 | std::function &)> process_data) 24 | : process_data_(process_data) {} 25 | 26 | DelegateMessageProcessor::~DelegateMessageProcessor() {} 27 | 28 | bool DelegateMessageProcessor::process_data( 29 | const std::vector &data) { 30 | if (!process_data_) return false; 31 | 32 | return process_data_(data); 33 | } 34 | } // namespace network 35 | } // namespace openvmi 36 | -------------------------------------------------------------------------------- /src/openvmi/network/message_processor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_NETWORK_MESSAGE_PROCESSOR_H 19 | #define OPENVMI_NETWORK_MESSAGE_PROCESSOR_H 20 | 21 | #include 22 | #include 23 | 24 | namespace openvmi { 25 | namespace network { 26 | class MessageProcessor { 27 | public: 28 | virtual ~MessageProcessor() {} 29 | virtual bool process_data(const std::vector &data) = 0; 30 | }; 31 | } // namespace network 32 | } // namespace openvmi 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/openvmi/network/socket_helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_NETWORK_SOCKET_HELPER_H_ 19 | #define OPENVMI_NETWORK_SOCKET_HELPER_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace network { 25 | bool socket_file_exists(std::string const& filename); 26 | bool socket_exists(std::string const& socket_name); 27 | std::string remove_socket_if_stale(std::string const& socket_name); 28 | } // namespace network 29 | } // namespace openvmi 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/openvmi/network/socket_messenger.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DockDroid/openvmi/769ce4a3af6c6e25656b50c683a4335230d278f6/src/openvmi/network/socket_messenger.cpp -------------------------------------------------------------------------------- /src/openvmi/optional.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Canonical, Ltd. 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Thomas Voß 17 | * 18 | */ 19 | 20 | #ifndef OPENVMI_OPTIONAL_H_ 21 | #define OPENVMI_OPTIONAL_H_ 22 | 23 | #include 24 | #include 25 | 26 | namespace openvmi { 27 | template 28 | using Optional = boost::optional; 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /src/openvmi/platform/sdl/keycode_converter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_PLATFORM_SDL_KEYCODE_CONVERTER_H_ 19 | #define OPENVMI_PLATFORM_SDL_KEYCODE_CONVERTER_H_ 20 | 21 | #include "openvmi/platform/sdl/sdl_wrapper.h" 22 | 23 | #include 24 | 25 | #include 26 | 27 | namespace openvmi { 28 | namespace platform { 29 | namespace sdl { 30 | class KeycodeConverter { 31 | public: 32 | static std::uint16_t convert(const SDL_Scancode &scan_code); 33 | 34 | private: 35 | static const std::array code_map; 36 | }; 37 | } // namespace sdl 38 | } // namespace platform 39 | } // namespace openvmi 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/openvmi/platform/sdl/sdl_wrapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_PLATFORM_SDL_WRAPPER_H_ 19 | #define OPENVMI_PLATFORM_SDL_WRAPPER_H_ 20 | 21 | #pragma GCC diagnostic push 22 | #pragma GCC diagnostic ignored "-Wswitch-default" 23 | #include 24 | #include 25 | #include 26 | #include 27 | #pragma GCC diagnostic pop 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/openvmi/protobuf/google_protobuf_guard.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright © 2012 Canonical Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU Lesser General Public License version 3, 6 | * as published by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | * Authored by: Alan Griffiths 17 | */ 18 | 19 | #include 20 | 21 | extern "C" int __attribute__((constructor)) init_google_protobuf() { 22 | GOOGLE_PROTOBUF_VERIFY_VERSION; 23 | return 0; 24 | } 25 | 26 | extern "C" int __attribute__((destructor)) shutdown_google_protobuf() { 27 | google::protobuf::ShutdownProtobufLibrary(); 28 | return 0; 29 | } 30 | 31 | // Preserve ABI 32 | namespace openvmi { 33 | namespace protobuf { 34 | void google_protobuf_guard(); 35 | } 36 | } 37 | 38 | void openvmi::protobuf::google_protobuf_guard() {} 39 | -------------------------------------------------------------------------------- /src/openvmi/protobuf/openvmi_rpc.proto: -------------------------------------------------------------------------------- 1 | option optimize_for = LITE_RUNTIME; 2 | 3 | package openvmi.protobuf.rpc; 4 | 5 | message Invocation { 6 | required uint32 id = 1; 7 | required string method_name = 2; 8 | required bytes parameters = 3; 9 | required uint32 protocol_version = 4; 10 | } 11 | 12 | message Result { 13 | optional uint32 id = 1; 14 | optional bytes response = 2; 15 | repeated bytes events = 3; 16 | } 17 | 18 | message StructuredError { 19 | optional uint32 domain = 1; 20 | optional uint32 code = 2; 21 | } 22 | 23 | message Void { 24 | optional string error = 127; 25 | optional StructuredError structured_error = 128; 26 | } 27 | -------------------------------------------------------------------------------- /src/openvmi/qemu/hwcontrol_message_processor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_QEMU_HWCONTROL_MESSAGE_PROCESSOR_H_ 19 | #define OPENVMI_QEMU_HWCONTROL_MESSAGE_PROCESSOR_H_ 20 | 21 | #include "openvmi/qemu/qemud_message_processor.h" 22 | 23 | namespace openvmi { 24 | namespace qemu { 25 | class HwControlMessageProcessor : public QemudMessageProcessor { 26 | public: 27 | HwControlMessageProcessor( 28 | const std::shared_ptr &messenger); 29 | ~HwControlMessageProcessor(); 30 | 31 | protected: 32 | void handle_command(const std::string &command) override; 33 | }; 34 | } // namespace graphics 35 | } // namespace openvmi 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/openvmi/qemu/null_message_processor.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/qemu/null_message_processor.h" 19 | #include "openvmi/logger.h" 20 | #include "openvmi/utils.h" 21 | 22 | #include 23 | 24 | namespace openvmi { 25 | namespace qemu { 26 | NullMessageProcessor::NullMessageProcessor() {} 27 | 28 | NullMessageProcessor::~NullMessageProcessor() { 29 | INFO("NullMessageProcessor?????."); 30 | } 31 | 32 | bool NullMessageProcessor::process_data(const std::vector &data) { 33 | (void)data; 34 | return true; 35 | } 36 | } // namespace qemu 37 | } // namespace openvmi 38 | 39 | -------------------------------------------------------------------------------- /src/openvmi/qemu/null_message_processor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_QEMU_NULL_MESSAGE_PROCESSOR_H_ 19 | #define OPENVMI_QEMU_NULL_MESSAGE_PROCESSOR_H_ 20 | 21 | #include "openvmi/network/message_processor.h" 22 | 23 | namespace openvmi { 24 | namespace qemu { 25 | class NullMessageProcessor : public network::MessageProcessor { 26 | public: 27 | NullMessageProcessor(); 28 | ~NullMessageProcessor(); 29 | 30 | bool process_data(const std::vector &data) override; 31 | }; 32 | } // namespace graphics 33 | } // namespace openvmi 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/openvmi/qemu/sensors_message_processor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_QEMU_SENSORS_MESSAGE_PROCESSOR_H_ 19 | #define OPENVMI_QEMU_SENSORS_MESSAGE_PROCESSOR_H_ 20 | 21 | #include "openvmi/qemu/qemud_message_processor.h" 22 | 23 | namespace openvmi { 24 | namespace qemu { 25 | class SensorsMessageProcessor : public QemudMessageProcessor { 26 | public: 27 | SensorsMessageProcessor( 28 | const std::shared_ptr &messenger); 29 | ~SensorsMessageProcessor(); 30 | 31 | protected: 32 | void handle_command(const std::string &command) override; 33 | 34 | private: 35 | void list_sensors(); 36 | }; 37 | } // namespace graphics 38 | } // namespace openvmi 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/openvmi/qemu/telephony_manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_QEMU_TELEPHONY_MANAGER_H_ 19 | #define OPENVMI_QEMU_TELEPHONY_MANAGER_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | namespace openvmi { 26 | namespace qemu { 27 | class TelephonyManager { 28 | public: 29 | TelephonyManager(const core::dbus::Bus::Ptr &bus); 30 | ~TelephonyManager(); 31 | 32 | private: 33 | core::dbus::Bus::Ptr bus_; 34 | core::dbus::Service::Ptr ofono_; 35 | core::dbus::Object::Ptr modem_; 36 | }; 37 | } // namespace qemu 38 | } // namespace openvmi 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/openvmi/rotation_status.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 Linaro Ltd. 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_ROTATIONSTATUS_H_ 19 | #define OPENVMI_ROTATIONSTATUS_H_ 20 | 21 | // These APIs will be used to set and get the current screen 22 | // orientation 23 | 24 | int rotation_angle = 0; 25 | 26 | void set_rotation_status (int status) 27 | { 28 | rotation_angle = status; 29 | } 30 | 31 | int get_rotation_status () 32 | { 33 | return (rotation_angle); 34 | } 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /src/openvmi/rpc/constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_RPC_CONSTANTS_H_ 19 | #define OPENVMI_RPC_CONSTANTS_H_ 20 | 21 | namespace openvmi { 22 | namespace rpc { 23 | static constexpr const long header_size{4}; 24 | static constexpr unsigned int const serialization_buffer_size{2048}; 25 | 26 | enum MessageType { 27 | invocation = 0, 28 | response = 1, 29 | }; 30 | } // namespace rpc 31 | } // namespace network 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/openvmi/sensors/sensors_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Lee Jones 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_SENSORS_DATA_H_ 19 | #define OPENVMI_SENSORS_DATA_H_ 20 | 21 | namespace openvmi { 22 | namespace sensors { 23 | class Data { 24 | public: 25 | Data(const int id, const int groupsize); 26 | ~Data(); 27 | 28 | void get_data(float data[3]); 29 | 30 | private: 31 | void pluck(const float samples[][3], unsigned int rows, float data[3]); 32 | 33 | unsigned int select_ = 0; 34 | unsigned int updown_ = 0; 35 | const int id_; 36 | const int groupsize_; 37 | }; 38 | } // namespace sensors 39 | } // namespace openvmi 40 | 41 | #endif // OPENVMI_SENSORS_DATA_H_ 42 | -------------------------------------------------------------------------------- /src/openvmi/ui/splash_screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_UI_SPLASH_SCREEN_H_ 19 | #define OPENVMI_UI_SPLASH_SCREEN_H_ 20 | 21 | #include 22 | 23 | #include 24 | 25 | namespace openvmi { 26 | namespace ui { 27 | class SplashScreen { 28 | public: 29 | SplashScreen(); 30 | ~SplashScreen(); 31 | 32 | private: 33 | void process_events(); 34 | 35 | std::thread event_thread_; 36 | bool event_thread_running_; 37 | SDL_Window *window_; 38 | }; 39 | } // namespace ui 40 | } // namespace openvmi 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/openvmi/utils/environment_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 Simon Fels 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published by 6 | * the Free Software Foundation; version 3. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU Lesser General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU Lesser General Public License 14 | * along with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_UTILS_ENVIRONMENT_FILE_H_ 19 | #define OPENVMI_UTILS_ENVIRONMENT_FILE_H_ 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | namespace openvmi { 26 | namespace utils { 27 | class EnvironmentFile { 28 | public: 29 | EnvironmentFile(const boost::filesystem::path &path); 30 | ~EnvironmentFile() = default; 31 | 32 | std::string value(const std::string &key, const std::string &default_value = "") const; 33 | 34 | private: 35 | std::map data_; 36 | }; 37 | } // namespace utils 38 | } // namespace openvmi 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/openvmi/wm/display.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/wm/display.h" 19 | 20 | namespace openvmi { 21 | namespace wm { 22 | Display::Id Display::Invalid = -1; 23 | Display::Id Display::Default = 0; 24 | } // namespace wm 25 | } // namespace openvmi 26 | -------------------------------------------------------------------------------- /src/openvmi/wm/display.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_WM_DISPLAY_H_ 19 | #define OPENVMI_WM_DISPLAY_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace wm { 25 | class Display { 26 | public: 27 | typedef std::int32_t Id; 28 | 29 | static Id Invalid; 30 | static Id Default; 31 | 32 | Display() = delete; 33 | Display(const Display&) = delete; 34 | }; 35 | } // namespace wm 36 | } // namespace openvmi 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/openvmi/wm/manager.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/wm/manager.h" 19 | 20 | namespace openvmi { 21 | namespace wm { 22 | Manager::~Manager() {} 23 | } // namespace wm 24 | } // namespace openvmi 25 | -------------------------------------------------------------------------------- /src/openvmi/wm/stack.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_WM_STACK_H_ 19 | #define OPENVMI_WM_STACK_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace wm { 25 | class Stack { 26 | public: 27 | enum class Id { 28 | Invalid = -1, 29 | Default = 0, 30 | Fullscreen = 1, 31 | Freeform = 2, 32 | }; 33 | 34 | Stack() = delete; 35 | Stack(const Stack&) = delete; 36 | }; 37 | 38 | std::ostream& operator<<(std::ostream &out, Stack::Id const &stack); 39 | std::istream& operator>>(std::istream &in, Stack::Id &stack); 40 | } // namespace wm 41 | } // namespace openvmi 42 | 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/openvmi/wm/task.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #include "openvmi/wm/task.h" 19 | 20 | namespace openvmi { 21 | namespace wm { 22 | Task::Id Task::Invalid = -1; 23 | } // namespace wm 24 | } // namespace openvmi 25 | -------------------------------------------------------------------------------- /src/openvmi/wm/task.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Simon Fels 3 | * 4 | * This program is free software: you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License version 3, as published 6 | * by the Free Software Foundation. 7 | * 8 | * This program is distributed in the hope that it will be useful, but 9 | * WITHOUT ANY WARRANTY; without even the implied warranties of 10 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 11 | * PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along 14 | * with this program. If not, see . 15 | * 16 | */ 17 | 18 | #ifndef OPENVMI_WM_TASK_H_ 19 | #define OPENVMI_WM_TASK_H_ 20 | 21 | #include 22 | 23 | namespace openvmi { 24 | namespace wm { 25 | class Task { 26 | public: 27 | typedef std::int32_t Id; 28 | 29 | static Id Invalid; 30 | 31 | Task() = delete; 32 | Task(const Task&) = delete; 33 | }; 34 | } // namespace wm 35 | } // namespace openvmi 36 | 37 | #endif 38 | --------------------------------------------------------------------------------