diff options
author | Shih-wei Liao <sliao@google.com> | 2010-10-23 02:15:57 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-10-23 22:12:29 -0700 |
commit | 0175e01f54670d0133d131222826f7033e2e2c03 (patch) | |
tree | 409ae836e4dcfbf82c55529f09f742f598cee28a /libs | |
parent | 4de82c7885bd41f9fa5ca3938d617cae5edacbdf (diff) | |
download | frameworks_base-0175e01f54670d0133d131222826f7033e2e2c03.zip frameworks_base-0175e01f54670d0133d131222826f7033e2e2c03.tar.gz frameworks_base-0175e01f54670d0133d131222826f7033e2e2c03.tar.bz2 |
Enable optimized bitcode that is also jitted faster.
Change-Id: I08832cfaf4e8465c16b445eeb1b82f72d874d0ef
Diffstat (limited to 'libs')
-rw-r--r-- | libs/rs/Android.mk | 10 | ||||
-rw-r--r-- | libs/rs/rsScriptC.cpp | 6 | ||||
-rw-r--r-- | libs/rs/rslib.bc | bin | 0 -> 716 bytes |
3 files changed, 12 insertions, 4 deletions
diff --git a/libs/rs/Android.mk b/libs/rs/Android.mk index 05c1a48..2ec003f 100644 --- a/libs/rs/Android.mk +++ b/libs/rs/Android.mk @@ -23,7 +23,13 @@ include $(BUILD_HOST_EXECUTABLE) # TODO: This should go into build/core/config.mk RSG_GENERATOR:=$(LOCAL_BUILT_MODULE) - +include $(CLEAR_VARS) +input_data_file := $(LOCAL_PATH)/rslib.bc +slangdata_output_var_name := rs_runtime_lib_bc +LOCAL_MODULE := librslib_rt +LOCAL_MODULE_TAGS := optional +include frameworks/compile/slang/SlangData.mk +include $(BUILD_STATIC_LIBRARY) # Build render script lib ==================== @@ -109,7 +115,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL libGLESv1_CM libGLESv2 libui libbcc -LOCAL_STATIC_LIBRARIES := libft2 +LOCAL_STATIC_LIBRARIES := libft2 librslib_rt LOCAL_C_INCLUDES += external/freetype/include diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 165fa71..9dce158 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -390,6 +390,9 @@ static BCCvoid* symbolLookup(BCCvoid* pContext, const BCCchar* name) return NULL; } +extern const char rs_runtime_lib_bc[]; +extern unsigned rs_runtime_lib_bc_size; + void ScriptCState::runCompiler(Context *rsc, ScriptC *s) { LOGV("%p ScriptCState::runCompiler ", rsc); @@ -398,6 +401,7 @@ void ScriptCState::runCompiler(Context *rsc, ScriptC *s) s->mBccScript = bccCreateScript(); s->mEnviroment.mIsThreadable = true; bccScriptBitcode(s->mBccScript, s->mEnviroment.mScriptText, s->mEnviroment.mScriptTextLength); + //bccLinkBitcode(s->mBccScript, rs_runtime_lib_bc, rs_runtime_lib_bc_size); bccRegisterSymbolCallback(s->mBccScript, symbolLookup, s); bccCompileScript(s->mBccScript); bccGetScriptLabel(s->mBccScript, "root", (BCCvoid**) &s->mProgram.mRoot); @@ -533,5 +537,3 @@ RsScript rsi_ScriptCCreate(Context * rsc) } } - - diff --git a/libs/rs/rslib.bc b/libs/rs/rslib.bc Binary files differnew file mode 100644 index 0000000..1897c3b --- /dev/null +++ b/libs/rs/rslib.bc |