Loading opengl/libs/EGL/egl.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -1365,16 +1365,18 @@ EGLBoolean eglWaitNative(EGLint engine) EGLint eglGetError(void) { EGLint result = EGL_SUCCESS; EGLint err; for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { EGLint err = EGL_SUCCESS; err = EGL_SUCCESS; egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) err = cnx->egl.eglGetError(); if (err!=EGL_SUCCESS && result==EGL_SUCCESS) result = err; } err = getError(); if (result == EGL_SUCCESS) result = getError(); result = err; return result; } Loading Loading @@ -1816,16 +1818,16 @@ EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_l { EGLContext ctx = eglGetCurrentContext(); ContextRef _c(ctx); if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR); if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_SYNC_KHR); if (!validate_display_context(dpy, ctx)) return EGL_NO_IMAGE_KHR; return EGL_NO_SYNC_KHR; egl_display_t const * const dp = get_display(dpy); egl_context_t * const c = get_context(ctx); EGLSyncKHR result = EGL_NO_IMAGE_KHR; EGLSyncKHR result = EGL_NO_SYNC_KHR; if (c->cnx->egl.eglCreateSyncKHR) { EGLSyncKHR sync = c->cnx->egl.eglCreateSyncKHR( dp->disp[c->impl].dpy, type, attrib_list); if (sync == EGL_NO_IMAGE_KHR) if (sync == EGL_NO_SYNC_KHR) return sync; result = (egl_sync_t*)new egl_sync_t(dpy, ctx, sync); } Loading opengl/tests/testLatency/Android.mk 0 → 100644 +20 −0 Original line number Diff line number Diff line ######################################################################### # Test end-to-end latency. ######################################################################### TOP_LOCAL_PATH:= $(call my-dir) # Build activity LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SDK_VERSION := 8 LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := TestLatency include $(BUILD_PACKAGE) opengl/tests/testLatency/AndroidManifest.xml 0 → 100644 +37 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2009, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.testlatency"> <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8" /> <application android:label="@string/testLatency_activity"> <activity android:name="TestLatencyActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> opengl/tests/testLatency/res/values/strings.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <!-- This file contains resource definitions for displayed strings, allowing them to be changed based on the locale and options. --> <resources> <!-- Simple strings. --> <string name="testLatency_activity">TestLatency</string> </resources> opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.testlatency; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.WindowManager; import java.io.File; public class TestLatencyActivity extends Activity { TestLatencyView mView; @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); mView = new TestLatencyView(getApplication()); setContentView(mView); mView.setFocusableInTouchMode(true); } @Override protected void onPause() { super.onPause(); mView.onPause(); } @Override protected void onResume() { super.onResume(); mView.onResume(); } } Loading
opengl/libs/EGL/egl.cpp +8 −6 Original line number Diff line number Diff line Loading @@ -1365,16 +1365,18 @@ EGLBoolean eglWaitNative(EGLint engine) EGLint eglGetError(void) { EGLint result = EGL_SUCCESS; EGLint err; for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { EGLint err = EGL_SUCCESS; err = EGL_SUCCESS; egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) err = cnx->egl.eglGetError(); if (err!=EGL_SUCCESS && result==EGL_SUCCESS) result = err; } err = getError(); if (result == EGL_SUCCESS) result = getError(); result = err; return result; } Loading Loading @@ -1816,16 +1818,16 @@ EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_l { EGLContext ctx = eglGetCurrentContext(); ContextRef _c(ctx); if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR); if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_NO_SYNC_KHR); if (!validate_display_context(dpy, ctx)) return EGL_NO_IMAGE_KHR; return EGL_NO_SYNC_KHR; egl_display_t const * const dp = get_display(dpy); egl_context_t * const c = get_context(ctx); EGLSyncKHR result = EGL_NO_IMAGE_KHR; EGLSyncKHR result = EGL_NO_SYNC_KHR; if (c->cnx->egl.eglCreateSyncKHR) { EGLSyncKHR sync = c->cnx->egl.eglCreateSyncKHR( dp->disp[c->impl].dpy, type, attrib_list); if (sync == EGL_NO_IMAGE_KHR) if (sync == EGL_NO_SYNC_KHR) return sync; result = (egl_sync_t*)new egl_sync_t(dpy, ctx, sync); } Loading
opengl/tests/testLatency/Android.mk 0 → 100644 +20 −0 Original line number Diff line number Diff line ######################################################################### # Test end-to-end latency. ######################################################################### TOP_LOCAL_PATH:= $(call my-dir) # Build activity LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SDK_VERSION := 8 LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_PACKAGE_NAME := TestLatency include $(BUILD_PACKAGE)
opengl/tests/testLatency/AndroidManifest.xml 0 → 100644 +37 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2009, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.testlatency"> <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8" /> <application android:label="@string/testLatency_activity"> <activity android:name="TestLatencyActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
opengl/tests/testLatency/res/values/strings.xml 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 2006, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <!-- This file contains resource definitions for displayed strings, allowing them to be changed based on the locale and options. --> <resources> <!-- Simple strings. --> <string name="testLatency_activity">TestLatency</string> </resources>
opengl/tests/testLatency/src/com/android/testlatency/TestLatencyActivity.java 0 → 100644 +47 −0 Original line number Diff line number Diff line /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.testlatency; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.WindowManager; import java.io.File; public class TestLatencyActivity extends Activity { TestLatencyView mView; @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); mView = new TestLatencyView(getApplication()); setContentView(mView); mView.setFocusableInTouchMode(true); } @Override protected void onPause() { super.onPause(); mView.onPause(); } @Override protected void onResume() { super.onResume(); mView.onResume(); } }