diff --git a/tools/emulator/opengl/host/libs/GLESv1_dec/Android.mk b/tools/emulator/opengl/host/libs/GLESv1_dec/Android.mk index c251e4a79..08fd3a3b2 100644 --- a/tools/emulator/opengl/host/libs/GLESv1_dec/Android.mk +++ b/tools/emulator/opengl/host/libs/GLESv1_dec/Android.mk @@ -18,7 +18,7 @@ LOCAL_SRC_FILES := \ GLDecoder.cpp LOCAL_C_INCLUDES += \ - $(emulatorOpengl)/system/OpenglCodecCommon \ + $(emulatorOpengl)/shared/OpenglCodecCommon \ $(emulatorOpengl)/system/GLESv1_enc LOCAL_STATIC_LIBRARIES := \ diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/Android.mk b/tools/emulator/opengl/shared/OpenglCodecCommon/Android.mk new file mode 100644 index 000000000..e56927035 --- /dev/null +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/Android.mk @@ -0,0 +1,38 @@ + +LOCAL_PATH := $(call my-dir) +emulatorOpengl := $(LOCAL_PATH)/../.. + +### OpenglCodecCommon ############################################## + +include $(CLEAR_VARS) + +OpenglCodecCommon := \ + GLClientState.cpp \ + glUtils.cpp \ + TcpStream.cpp \ + TimeUtils.cpp + +LOCAL_SRC_FILES := $(OpenglCodecCommon) + +LOCAL_C_INCLUDES += $(emulatorOpengl)/host/include/libOpenGLRender + +LOCAL_CFLAGS += -DLOG_TAG=\"eglCodecCommon\" +LOCAL_MODULE_TAGS := debug +LOCAL_MODULE := libOpenglCodecCommon + +include $(BUILD_STATIC_LIBRARY) + +### OpenglCodecCommon host ############################################## +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(OpenglCodecCommon) + +LOCAL_C_INCLUDES += $(emulatorOpengl)/host/include/libOpenGLRender + +LOCAL_MODULE_TAGS := debug +LOCAL_MODULE := libOpenglCodecCommon +LOCAL_PRELINK_MODULE := false + +# XXX - enable the next line for host debugging - JR +# LOCAL_CFLAGS := -O0 -g +include $(BUILD_HOST_STATIC_LIBRARY) diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/ErrorLog.h b/tools/emulator/opengl/shared/OpenglCodecCommon/ErrorLog.h new file mode 100644 index 000000000..8502bb0e5 --- /dev/null +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/ErrorLog.h @@ -0,0 +1,29 @@ +/* +* 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. +*/ +#ifndef _ERROR_LOG_H_ +#define _ERROR_LOG_H_ + +#if (HAVE_ANDROID_OS == 1) +# include +# define ERR(...) LOGE(__VA_ARGS__) +# define DBG(...) LOGD(__VA_ARGS__) +#else +# include +# define ERR(...) fprintf(stderr, __VA_ARGS__) +# define DBG(...) fprintf(stderr, __VA_ARGS__) +#endif + +#endif diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/FixedBuffer.h b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/FixedBuffer.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/GLClientState.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/GLClientState.cpp rename to tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.cpp diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/GLClientState.h b/tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/GLClientState.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/GLClientState.h diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/GLDecoderContextData.h b/tools/emulator/opengl/shared/OpenglCodecCommon/GLDecoderContextData.h similarity index 63% rename from tools/emulator/opengl/system/OpenglCodecCommon/GLDecoderContextData.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/GLDecoderContextData.h index faf6ad677..b0874475a 100644 --- a/tools/emulator/opengl/system/OpenglCodecCommon/GLDecoderContextData.h +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/GLDecoderContextData.h @@ -1,3 +1,18 @@ +/* +* 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. +*/ #ifndef _GL_DECODER_CONTEXT_DATA_H_ #define _GL_DECODER_CONTEXT_DATA_H_ diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/IOStream.h b/tools/emulator/opengl/shared/OpenglCodecCommon/IOStream.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/IOStream.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/IOStream.h diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/Makefile b/tools/emulator/opengl/shared/OpenglCodecCommon/Makefile similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/Makefile rename to tools/emulator/opengl/shared/OpenglCodecCommon/Makefile diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/TcpStream.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/TcpStream.cpp rename to tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.cpp diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/TcpStream.h b/tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/TcpStream.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/TcpStream.h diff --git a/tools/emulator/opengl/tests/ut_renderer/TimeUtils.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp similarity index 100% rename from tools/emulator/opengl/tests/ut_renderer/TimeUtils.cpp rename to tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.cpp diff --git a/tools/emulator/opengl/tests/ut_renderer/TimeUtils.h b/tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.h similarity index 100% rename from tools/emulator/opengl/tests/ut_renderer/TimeUtils.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/TimeUtils.h diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/codec_defs.h b/tools/emulator/opengl/shared/OpenglCodecCommon/codec_defs.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/codec_defs.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/codec_defs.h diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/glUtils.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/glUtils.cpp rename to tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.cpp diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/glUtils.h b/tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.h similarity index 100% rename from tools/emulator/opengl/system/OpenglCodecCommon/glUtils.h rename to tools/emulator/opengl/shared/OpenglCodecCommon/glUtils.h diff --git a/tools/emulator/opengl/system/Android.mk b/tools/emulator/opengl/system/Android.mk deleted file mode 100644 index 7125f0a81..000000000 --- a/tools/emulator/opengl/system/Android.mk +++ /dev/null @@ -1,77 +0,0 @@ - -LOCAL_PATH := $(call my-dir) - -### OpenglCodecCommon ############################################## - -include $(CLEAR_VARS) - -OpenglCodecCommon := \ - OpenglCodecCommon/GLClientState.cpp \ - OpenglCodecCommon/glUtils.cpp \ - OpenglCodecCommon/TcpStream.cpp - -LOCAL_SRC_FILES := $(OpenglCodecCommon) - -LOCAL_CFLAGS += -DLOG_TAG=\"eglCodecCommon\" -LOCAL_MODULE_TAGS := debug -LOCAL_MODULE := libOpenglCodecCommon - -include $(BUILD_STATIC_LIBRARY) - -### OpenglCodecCommon host ############################################## -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := $(OpenglCodecCommon) - -LOCAL_MODULE_TAGS := debug -LOCAL_MODULE := libOpenglCodecCommon -LOCAL_PRELINK_MODULE := false - -# XXX - enable the next line for host debugging - JR -# LOCAL_CFLAGS := -O0 -g -include $(BUILD_HOST_STATIC_LIBRARY) - - -### GLESv1_enc Encoder ########################################### -include $(CLEAR_VARS) - - -LOCAL_SRC_FILES := \ - GLESv1_enc/GLEncoder.cpp \ - GLESv1_enc/GLEncoderUtils.cpp - -LOCAL_MODULE_TAGS := debug -LOCAL_MODULE := libGLESv1_enc -LOCAL_MODULE_CLASS := SHARED_LIBRARIES - -glesv1_intermediates := $(local-intermediates-dir) - -LOCAL_PRELINK_MODULE := false -LOCAL_CFLAGS += -DLOG_TAG=\"egl_GLESv1_enc\" -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/OpenglCodecCommon \ - $(LOCAL_PATH)/GLESv1_enc $(glesv1_intermediates) - -LOCAL_STATIC_LIBRARIES := \ - libOpenglCodecCommon -LOCAL_SHARED_LIBRARIES := libcutils - -EMUGEN := $(HOST_OUT_EXECUTABLES)/emugen - -GEN_GL := \ - $(glesv1_intermediates)/gl_entry.cpp \ - $(glesv1_intermediates)/gl_enc.cpp \ - $(glesv1_intermediates)/gl_enc.h - -$(GEN_GL) : PRIVATE_PATH := $(LOCAL_PATH) -$(GEN_GL) : PRIVATE_CUSTOM_TOOL := \ - $(EMUGEN) -E $(glesv1_intermediates) -i $(PRIVATE_PATH)/GLESv1_enc gl -$(GEN_GL) : $(EMUGEN) \ - $(LOCAL_PATH)/GLESv1_enc/gl.attrib \ - $(LOCAL_PATH)/GLESv1_enc/gl.in \ - $(LOCAL_PATH)/GLESv1_enc/gl.types - $(transform-generated-source) - -LOCAL_GENERATED_SOURCES += $(GEN_GL) -include $(BUILD_SHARED_LIBRARY) - diff --git a/tools/emulator/opengl/system/GLESv1_enc/Android.mk b/tools/emulator/opengl/system/GLESv1_enc/Android.mk new file mode 100644 index 000000000..bf4943bd9 --- /dev/null +++ b/tools/emulator/opengl/system/GLESv1_enc/Android.mk @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) +emulatorOpengl := $(LOCAL_PATH)/../.. + +### GLESv1_enc Encoder ########################################### +include $(CLEAR_VARS) + + +LOCAL_SRC_FILES := \ + GLEncoder.cpp \ + GLEncoderUtils.cpp + +LOCAL_MODULE_TAGS := debug +LOCAL_MODULE := libGLESv1_enc +LOCAL_MODULE_CLASS := SHARED_LIBRARIES + +glesv1_intermediates := $(local-intermediates-dir) + +LOCAL_PRELINK_MODULE := false +LOCAL_CFLAGS += -DLOG_TAG=\"egl_GLESv1_enc\" +LOCAL_C_INCLUDES += \ + $(emulatorOpengl)/shared/OpenglCodecCommon \ + $(glesv1_intermediates) + +LOCAL_STATIC_LIBRARIES := \ + libOpenglCodecCommon +LOCAL_SHARED_LIBRARIES := libcutils + +EMUGEN := $(HOST_OUT_EXECUTABLES)/emugen + +GEN_GL := \ + $(glesv1_intermediates)/gl_entry.cpp \ + $(glesv1_intermediates)/gl_enc.cpp \ + $(glesv1_intermediates)/gl_enc.h + +$(GEN_GL) : PRIVATE_PATH := $(LOCAL_PATH) +$(GEN_GL) : PRIVATE_CUSTOM_TOOL := \ + $(EMUGEN) -E $(glesv1_intermediates) -i $(PRIVATE_PATH) gl +$(GEN_GL) : $(EMUGEN) \ + $(LOCAL_PATH)/gl.attrib \ + $(LOCAL_PATH)/gl.in \ + $(LOCAL_PATH)//gl.types + $(transform-generated-source) + +LOCAL_GENERATED_SOURCES += $(GEN_GL) +include $(BUILD_SHARED_LIBRARY) diff --git a/tools/emulator/opengl/system/OpenglCodecCommon/ErrorLog.h b/tools/emulator/opengl/system/OpenglCodecCommon/ErrorLog.h deleted file mode 100644 index 35002ab4f..000000000 --- a/tools/emulator/opengl/system/OpenglCodecCommon/ErrorLog.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _ERROR_LOG_H_ -#define _ERROR_LOG_H_ - -#if (HAVE_ANDROID_OS == 1) -# include -# define ERR(...) LOGE(__VA_ARGS__) -# define DBG(...) LOGD(__VA_ARGS__) -#else -# include -# define ERR(...) fprintf(stderr, __VA_ARGS__) -# define DBG(...) fprintf(stderr, __VA_ARGS__) -#endif - -#endif diff --git a/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk b/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk index ade82a40c..5ae33446f 100644 --- a/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk +++ b/tools/emulator/opengl/tests/gles_android_wrapper/Android.mk @@ -20,7 +20,7 @@ LOCAL_ADDITIONAL_DEPENDENCIES := \ emulatorOpengl := $(LOCAL_PATH)/../.. -LOCAL_C_INCLUDES := $(emulatorOpengl)/system/OpenglCodecCommon \ +LOCAL_C_INCLUDES := $(emulatorOpengl)/shared/OpenglCodecCommon \ $(call intermediates-dir-for, SHARED_LIBRARIES, libut_rendercontrol_enc) \ $(call intermediates-dir-for, SHARED_LIBRARIES, libGLESv1_enc) \ $(emulatorOpengl)/system/GLESv1_enc \ diff --git a/tools/emulator/opengl/tests/ut_rendercontrol_dec/Android.mk b/tools/emulator/opengl/tests/ut_rendercontrol_dec/Android.mk index 2ae22d340..a3a2c4a2a 100644 --- a/tools/emulator/opengl/tests/ut_rendercontrol_dec/Android.mk +++ b/tools/emulator/opengl/tests/ut_rendercontrol_dec/Android.mk @@ -18,7 +18,7 @@ intermediates := $(local-intermediates-dir) LOCAL_STATIC_LIBRARIES := \ libOpenglCodecCommon \ liblog -LOCAL_C_INCLUDES += $(emulatorOpengl)/system/OpenglCodecCommon $(emulatorOpengl)/tests/ut_rendercontrol_enc +LOCAL_C_INCLUDES += $(emulatorOpengl)/shared/OpenglCodecCommon $(emulatorOpengl)/tests/ut_rendercontrol_enc #we use only *_dec.h as a sentinel for the other generated headers GEN := $(intermediates)/ut_rendercontrol_dec.cpp $(intermediates)/ut_rendercontrol_dec.h diff --git a/tools/emulator/opengl/tests/ut_rendercontrol_enc/Android.mk b/tools/emulator/opengl/tests/ut_rendercontrol_enc/Android.mk index 1b5d4329d..bfcd69944 100644 --- a/tools/emulator/opengl/tests/ut_rendercontrol_enc/Android.mk +++ b/tools/emulator/opengl/tests/ut_rendercontrol_enc/Android.mk @@ -12,7 +12,7 @@ LOCAL_MODULE_CLASS := SHARED_LIBRARIES ut_intermediates := $(local-intermediates-dir) -LOCAL_C_INCLUDES += $(emulatorOpengl)/system/OpenglCodecCommon +LOCAL_C_INCLUDES += $(emulatorOpengl)/shared/OpenglCodecCommon LOCAL_STATIC_LIBRARIES := \ libOpenglCodecCommon diff --git a/tools/emulator/opengl/tests/ut_renderer/Android.mk b/tools/emulator/opengl/tests/ut_renderer/Android.mk index d48dec4ac..d51beabe6 100644 --- a/tools/emulator/opengl/tests/ut_renderer/Android.mk +++ b/tools/emulator/opengl/tests/ut_renderer/Android.mk @@ -30,8 +30,7 @@ LOCAL_SRC_FILES := ut_renderer.cpp \ Renderer.cpp \ RendererContext.cpp \ RendererSurface.cpp \ - X11Windowing.cpp \ - TimeUtils.cpp + X11Windowing.cpp # define PVR_WAR to support imgtec PVR opengl-ES implementation # @@ -43,7 +42,7 @@ LOCAL_SRC_FILES := ut_renderer.cpp \ LOCAL_CFLAGS := -DPVR_WAR #LOCAL_CFLAGS += -g -O0 -LOCAL_C_INCLUDES := $(emulatorOpengl)/system/OpenglCodecCommon \ +LOCAL_C_INCLUDES := $(emulatorOpengl)/shared/OpenglCodecCommon \ $(call intermediates-dir-for, SHARED_LIBRARIES, libut_rendercontrol_dec, HOST) \ $(call intermediates-dir-for, SHARED_LIBRARIES, libGLESv1_dec, HOST) \ $(emulatorOpengl)/host/libs/GLESv1_dec \