diff options
author | David 'Digit' Turner <digit@google.com> | 2015-03-20 22:17:12 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-20 22:17:12 +0000 |
commit | c714e27a4ef2f451bd0517de73797405dcdf683b (patch) | |
tree | 33b7e4f6de969d379a823543923d0750da54843a /emulator/opengl/host | |
parent | fc2a7dfe9350400514c8e21023ea2ef46266f712 (diff) | |
parent | ddb5d875c38022441d4b2e9de3b874b5e1c4df9b (diff) | |
download | sdk-c714e27a4ef2f451bd0517de73797405dcdf683b.zip sdk-c714e27a4ef2f451bd0517de73797405dcdf683b.tar.gz sdk-c714e27a4ef2f451bd0517de73797405dcdf683b.tar.bz2 |
am ddb5d875: am 972e1c6d: Merge "emulator/opengl: Cleanup build files + remove obsolete tests."
* commit 'ddb5d875c38022441d4b2e9de3b874b5e1c4df9b':
emulator/opengl: Cleanup build files + remove obsolete tests.
Diffstat (limited to 'emulator/opengl/host')
-rw-r--r-- | emulator/opengl/host/libs/GLESv1_dec/Android.mk | 18 | ||||
-rw-r--r-- | emulator/opengl/host/libs/GLESv2_dec/Android.mk | 18 | ||||
-rw-r--r-- | emulator/opengl/host/libs/Translator/EGL/Android.mk | 12 | ||||
-rw-r--r-- | emulator/opengl/host/libs/Translator/GLES_CM/Android.mk | 18 | ||||
-rw-r--r-- | emulator/opengl/host/libs/Translator/GLES_V2/Android.mk | 11 | ||||
-rw-r--r-- | emulator/opengl/host/libs/Translator/GLcommon/Android.mk | 23 | ||||
-rw-r--r-- | emulator/opengl/host/libs/libOpenglRender/Android.mk | 25 | ||||
-rw-r--r-- | emulator/opengl/host/libs/renderControl_dec/Android.mk | 15 | ||||
-rw-r--r-- | emulator/opengl/host/renderer/Android.mk | 14 | ||||
-rw-r--r-- | emulator/opengl/host/renderer/main.cpp | 169 |
10 files changed, 56 insertions, 267 deletions
diff --git a/emulator/opengl/host/libs/GLESv1_dec/Android.mk b/emulator/opengl/host/libs/GLESv1_dec/Android.mk index e0eca6e..c9db93e 100644 --- a/emulator/opengl/host/libs/GLESv1_dec/Android.mk +++ b/emulator/opengl/host/libs/GLESv1_dec/Android.mk @@ -24,18 +24,16 @@ $(call emugl-end-module) ### host library, 64-bit #################################### -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-static-library,lib64GLESv1_dec) +$(call emugl-begin-host64-static-library,lib64GLESv1_dec) - $(call emugl-import, lib64OpenglCodecCommon) - $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) +$(call emugl-import, lib64OpenglCodecCommon) +$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) - $(call emugl-gen-decoder,$(LOCAL_PATH),gl) +$(call emugl-gen-decoder,$(LOCAL_PATH),gl) - LOCAL_SRC_FILES := GLDecoder.cpp +LOCAL_SRC_FILES := GLDecoder.cpp - $(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS) -m64) - $(call emugl-export,LDLIBS,-lstdc++) +$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS)) +$(call emugl-export,LDLIBS,-lstdc++) - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/GLESv2_dec/Android.mk b/emulator/opengl/host/libs/GLESv2_dec/Android.mk index f658f11..0ad6ddb 100644 --- a/emulator/opengl/host/libs/GLESv2_dec/Android.mk +++ b/emulator/opengl/host/libs/GLESv2_dec/Android.mk @@ -22,17 +22,15 @@ LOCAL_SRC_FILES := GL2Decoder.cpp $(call emugl-end-module) ### host library, 64-bit #################################### -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-static-library,lib64GLESv2_dec) - $(call emugl-import, lib64OpenglCodecCommon) - $(call emugl-gen-decoder,$(LOCAL_PATH),gl2) +$(call emugl-begin-host64-static-library,lib64GLESv2_dec) +$(call emugl-import, lib64OpenglCodecCommon) +$(call emugl-gen-decoder,$(LOCAL_PATH),gl2) - # For gl2_types.h ! - $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) +# For gl2_types.h ! +$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) - $(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS) -m64) +$(call emugl-export,CFLAGS,$(host_common_debug_CFLAGS)) - LOCAL_SRC_FILES := GL2Decoder.cpp +LOCAL_SRC_FILES := GL2Decoder.cpp - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/Translator/EGL/Android.mk b/emulator/opengl/host/libs/Translator/EGL/Android.mk index 5d1c9b2..298c502 100644 --- a/emulator/opengl/host/libs/Translator/EGL/Android.mk +++ b/emulator/opengl/host/libs/Translator/EGL/Android.mk @@ -47,12 +47,10 @@ LOCAL_SRC_FILES := $(host_common_SRC_FILES) $(call emugl-end-module) ### EGL host implementation, 64-bit ######################## -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-shared-library,lib64EGL_translator) - $(call emugl-import,lib64GLcommon) +$(call emugl-begin-host64-shared-library,lib64EGL_translator) +$(call emugl-import,lib64GLcommon) - LOCAL_LDLIBS += $(host_common_LDLIBS) -m64 - LOCAL_SRC_FILES := $(host_common_SRC_FILES) +LOCAL_LDLIBS += $(host_common_LDLIBS) +LOCAL_SRC_FILES := $(host_common_SRC_FILES) - $(call emugl-end-module) -endif +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk b/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk index c5e7e6d..48cb5c4 100644 --- a/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk +++ b/emulator/opengl/host/libs/Translator/GLES_CM/Android.mk @@ -9,23 +9,13 @@ host_common_SRC_FILES := \ ### GLES_CM host implementation (On top of OpenGL) ######################## $(call emugl-begin-host-shared-library,libGLES_CM_translator) - $(call emugl-import,libGLcommon) - LOCAL_SRC_FILES := $(host_common_SRC_FILES) - $(call emugl-end-module) ### GLES_CM host implementation, 64-bit ######################## -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-shared-library,lib64GLES_CM_translator) - - $(call emugl-import,lib64GLcommon) - - LOCAL_CFLAGS += -fPIC - LOCAL_LDLIBS += -m64 - LOCAL_SRC_FILES := $(host_common_SRC_FILES) - - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-begin-host64-shared-library,lib64GLES_CM_translator) +$(call emugl-import,lib64GLcommon) +LOCAL_SRC_FILES := $(host_common_SRC_FILES) +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk b/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk index 438334a..c96965b 100644 --- a/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk +++ b/emulator/opengl/host/libs/Translator/GLES_V2/Android.mk @@ -18,12 +18,9 @@ $(call emugl-end-module) ### GLES_V2 host implementation, 64-bit ############################## -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-shared-library,lib64GLES_V2_translator) - $(call emugl-import, lib64GLcommon) +$(call emugl-begin-host64-shared-library,lib64GLES_V2_translator) +$(call emugl-import, lib64GLcommon) - LOCAL_LDLIBS += -m64 - LOCAL_SRC_FILES := $(host_common_SRC_FILES) +LOCAL_SRC_FILES := $(host_common_SRC_FILES) - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/Translator/GLcommon/Android.mk b/emulator/opengl/host/libs/Translator/GLcommon/Android.mk index fdbedad..d1a462d 100644 --- a/emulator/opengl/host/libs/Translator/GLcommon/Android.mk +++ b/emulator/opengl/host/libs/Translator/GLcommon/Android.mk @@ -46,16 +46,13 @@ $(call emugl-end-module) ### EGL host implementation, 64-bit ################ -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-static-library,lib64GLcommon) - - translator_path := $(LOCAL_PATH)/.. - LOCAL_SRC_FILES := $(host_common_SRC_FILES) - LOCAL_CFLAGS += -fPIC - $(call emugl-export,LDLIBS,$(host_common_LDLIBS)) - $(call emugl-export,LDFLAGS,$(host_common_LDFLAGS)) - $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared) - $(call emugl-export,STATIC_LIBRARIES, lib64emugl_common) - - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-begin-host64-static-library,lib64GLcommon) + +translator_path := $(LOCAL_PATH)/.. +LOCAL_SRC_FILES := $(host_common_SRC_FILES) +$(call emugl-export,LDLIBS,$(host_common_LDLIBS)) +$(call emugl-export,LDFLAGS,$(host_common_LDFLAGS)) +$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)/../include $(EMUGL_PATH)/shared) +$(call emugl-export,STATIC_LIBRARIES, lib64emugl_common) + +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/libOpenglRender/Android.mk b/emulator/opengl/host/libs/libOpenglRender/Android.mk index ca5a08a..20567f0 100644 --- a/emulator/opengl/host/libs/libOpenglRender/Android.mk +++ b/emulator/opengl/host/libs/libOpenglRender/Android.mk @@ -62,24 +62,21 @@ $(call emugl-end-module) ### host libOpenglRender, 64-bit ######################################### -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-shared-library,lib64OpenglRender) +$(call emugl-begin-host64-shared-library,lib64OpenglRender) - $(call emugl-import,lib64GLESv1_dec lib64GLESv2_dec lib64_renderControl_dec lib64OpenglCodecCommon) +$(call emugl-import,lib64GLESv1_dec lib64GLESv2_dec lib64_renderControl_dec lib64OpenglCodecCommon) - #LOCAL_LDFLAGS += -m64 # adding -m64 here doesn't work, because it somehow appear BEFORE -m32 in command-line. - LOCAL_LDLIBS += $(host_common_LDLIBS) -m64 # Put -m64 it in LOCAL_LDLIBS instead. +LOCAL_LDLIBS += $(host_common_LDLIBS) - LOCAL_SRC_FILES := $(host_common_SRC_FILES) - $(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include) - $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) +LOCAL_SRC_FILES := $(host_common_SRC_FILES) +$(call emugl-export,C_INCLUDES,$(EMUGL_PATH)/host/include) +$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) - # use Translator's egl/gles headers - LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include +# use Translator's egl/gles headers +LOCAL_C_INCLUDES += $(EMUGL_PATH)/host/libs/Translator/include - LOCAL_STATIC_LIBRARIES += lib64emugl_common +LOCAL_STATIC_LIBRARIES += lib64emugl_common - $(call emugl-export,CFLAGS,$(host_common_CFLAGS) -m64) +$(call emugl-export,CFLAGS,$(host_common_CFLAGS)) - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-end-module) diff --git a/emulator/opengl/host/libs/renderControl_dec/Android.mk b/emulator/opengl/host/libs/renderControl_dec/Android.mk index 4a97a93..f1ba595 100644 --- a/emulator/opengl/host/libs/renderControl_dec/Android.mk +++ b/emulator/opengl/host/libs/renderControl_dec/Android.mk @@ -10,12 +10,9 @@ $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) $(call emugl-end-module) ### host library, 64-bit #################################### -ifdef EMUGL_BUILD_64BITS - $(call emugl-begin-host64-static-library,lib64_renderControl_dec) - $(call emugl-import,lib64OpenglCodecCommon) - $(call emugl-gen-decoder,$(LOCAL_PATH),renderControl) - # For renderControl_types.h - $(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) - $(call emugl-export,CFLAGS,-m64) - $(call emugl-end-module) -endif
\ No newline at end of file +$(call emugl-begin-host64-static-library,lib64_renderControl_dec) +$(call emugl-import,lib64OpenglCodecCommon) +$(call emugl-gen-decoder,$(LOCAL_PATH),renderControl) +# For renderControl_types.h +$(call emugl-export,C_INCLUDES,$(LOCAL_PATH)) +$(call emugl-end-module) diff --git a/emulator/opengl/host/renderer/Android.mk b/emulator/opengl/host/renderer/Android.mk deleted file mode 100644 index 81dcaf7..0000000 --- a/emulator/opengl/host/renderer/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH:=$(call my-dir) - -# host renderer process ########################### -$(call emugl-begin-host-executable,emulator_renderer) -$(call emugl-import,libOpenglRender) -LOCAL_SRC_FILES := main.cpp -LOCAL_CFLAGS += -O0 -g - -ifeq ($(HOST_OS),linux) -LOCAL_LDLIBS += -lX11 -endif - -$(call emugl-end-module) - diff --git a/emulator/opengl/host/renderer/main.cpp b/emulator/opengl/host/renderer/main.cpp deleted file mode 100644 index 470e692..0000000 --- a/emulator/opengl/host/renderer/main.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Copyright (C) 2011 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. -*/ -#include "RenderServer.h" -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include "FrameBuffer.h" - -#include <sys/types.h> -#include <unistd.h> -#include <codec_defs.h> -#ifdef _WIN32 -#include <winsock2.h> -#endif - -#ifdef __linux__ -#include <X11/Xlib.h> -#endif - -static void printUsage(const char *progName) -{ - fprintf(stderr, "Usage: %s -windowid <windowid> [options]\n", progName); - fprintf(stderr, " -windowid <windowid> - window id to render into\n"); - fprintf(stderr, " -x <num> - render subwindow x position\n"); - fprintf(stderr, " -y <num> - render subwindow y position\n"); - fprintf(stderr, " -width <num> - render subwindow width\n"); - fprintf(stderr, " -height <num> - render subwindow height\n"); - exit(-1); -} - -int main(int argc, char *argv[]) -{ - int winX = 0; - int winY = 0; - int winWidth = 320; - int winHeight = 480; - FBNativeWindowType windowId = 0; - int iWindowId = 0; - - // - // Parse command line arguments - // - for (int i=1; i<argc; i++) { - if (!strcmp(argv[i], "-windowid")) { - if (++i >= argc || sscanf(argv[i],"%d", &iWindowId) != 1) { - printUsage(argv[0]); - } - } - else if (!strncmp(argv[i], "-x", 2)) { - if (++i >= argc || sscanf(argv[i],"%d", &winX) != 1) { - printUsage(argv[0]); - } - } - else if (!strncmp(argv[i], "-y", 2)) { - if (++i >= argc || sscanf(argv[i],"%d", &winY) != 1) { - printUsage(argv[0]); - } - } - else if (!strncmp(argv[i], "-width", 6)) { - if (++i >= argc || sscanf(argv[i],"%d", &winWidth) != 1) { - printUsage(argv[0]); - } - } - else if (!strncmp(argv[i], "-height", 7)) { - if (++i >= argc || sscanf(argv[i],"%d", &winHeight) != 1) { - printUsage(argv[0]); - } - } - } - - windowId = (FBNativeWindowType)iWindowId; - if (!windowId) { - // window id must be provided - printUsage(argv[0]); - } - -#if 0 //Enable to attach gdb to renderer on startup - fprintf(stderr, "renderer pid %d , press any key to continue...\n", getpid()); - getchar(); -#else - fprintf(stderr, "renderer pid %d \n", getpid()); -#endif - -#ifdef _WIN32 - WSADATA wsaData; - int rc = WSAStartup( MAKEWORD(2,2), &wsaData); - if (rc != 0) { - printf( "could not initialize Winsock\n" ); - } -#endif - -#ifdef __linux__ - // some OpenGL implementations may call X functions - // it is safer to synchronize all X calls made by all the - // rendering threads. (although the calls we do are locked - // in the FrameBuffer singleton object). - XInitThreads(); -#endif - - // - // initialize Framebuffer - // - bool inited = FrameBuffer::initialize(winWidth, winHeight); - if (!inited) { - fprintf(stderr,"Failed to initialize Framebuffer\n"); - return -1; - } - - inited = FrameBuffer::setupSubWindow(windowId, - winX, winY, winWidth, winHeight, 0.0); - if (!inited) { - fprintf(stderr,"Failed to create subwindow Framebuffer\n"); - return -1; - } - - // - // Create and run a render server listening to the given port number - // - char addr[256]; - RenderServer *server = RenderServer::create(addr, sizeof(addr)); - if (!server) { - fprintf(stderr,"Cannot initialize render server\n"); - return -1; - } - printf("render server listening at '%s'\n", addr); - -#ifndef _WIN32 - // - // run the server listener loop - // - server->main(); -#else - // - // on windows we need to handle messages for the - // created subwindow. So we run the server on a seperate - // thread and running the windows message pump loop - // in this main thread. - // - server->start(); - - // - // Dispatch events for the subwindow - // During termination of the render server, the FrameBuffer - // will be finalized, the Framebuffer subwindow will - // get destroyed and the following loop will exit. - // - MSG msg; - HWND hWnd = FrameBuffer::getFB()->getSubWindow(); - while( GetMessage(&msg, hWnd, 0, 0) > 0 ) { - TranslateMessage(&msg); - DispatchMessage(&msg); - } -#endif - - return 0; -} |