本文整理汇总了Python中build_options.OPTIONS.enable_emugl方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.enable_emugl方法的具体用法?Python OPTIONS.enable_emugl怎么用?Python OPTIONS.enable_emugl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.enable_emugl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_emugl [as 别名]
def main():
OPTIONS.parse_configure_file()
libs = []
for lib in android_static_libraries.get_android_static_library_deps():
assert lib.endswith('.a')
lib = os.path.splitext(lib)[0]
# Strip unnecessary suffixes (e.g., libjpeg_static).
for unnecessary_suffix in ['_static', '_fake']:
if lib.endswith(unnecessary_suffix):
lib = lib[:-len(unnecessary_suffix)]
libs.append(lib)
# We are not building android/frameworks/native/opengl/libs/GLES2.
# As libGLESv2.so is just a wrapper of real GL implementations, GL
# related symbols linked in the main nexe work as symbols in
# libGLESv2.so.
libs.append('libGLESv2')
# Graphics translation builds all EGL/GLES libraries as static libraries
# so we need to register them here so that they can still be dlopen'ed.
if not OPTIONS.enable_emugl():
libs.append('libEGL')
libs.append('libEGL_emulation')
libs.append('libGLESv1_CM')
libs.append('libGLESv2_emulation')
libs_string_literals = [' "%s",' % lib for lib in libs]
sys.stdout.write(_ANDROID_STATIC_LIBRARIES_TEMPLATE.substitute({
'ANDROID_STATIC_LIBRARIES': '\n'.join(libs_string_literals)
}))
示例2: generate_binaries_depending_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_emugl [as 别名]
def generate_binaries_depending_ninjas(_):
if (not OPTIONS.is_nacl_x86_64() or
not OPTIONS.is_optimized_build() or
# emugl has a different set of static initializers than
# graphics_translation.
OPTIONS.enable_emugl() or
# None of the targets analyzed are currently built in the open source
# repository.
open_source.is_open_source_repo() or
# Run the checker only when --disable-debug-code is specified. Locations
# of static initializers differ depending on the debug-code option.
OPTIONS.is_debug_code_enabled() or
# The checker only works with debug symbols.
not OPTIONS.is_debug_info_enabled()):
# The static analysis tool's output varies between debug and non-debug
# builds, so we pick non-debug as the default.
return
n = ninja_generator.NinjaGenerator('analyze_static_initializers')
script = staging.as_staging(
'android/external/chromium_org/tools/linux/dump-static-initializers.py')
n.rule('analyze_static_initializers',
command=('python %s -d $in | head --lines=-1 | '
'egrep -ve \'^# .*\.cpp \' |'
'sed -e \'s/ T\.[0-9]*/ T.XXXXX/\' |'
'diff -u $expect - && touch $out' %
script),
description='analyze_static_initializers $in')
libraries = build_common.CHECKED_LIBRARIES
libraries_fullpath = [
os.path.join(build_common.get_load_library_path(), lib)
for lib in libraries]
for library in zip(libraries, libraries_fullpath):
# You can manually update the text files by running
# src/build/update_static_initializer_expectations.py.
expect = 'src/build/dump-static-initializers-%s-expected.txt' % library[0]
result_path = os.path.join(build_common.get_build_dir(),
'dump_static_initializers',
'dump_static_initializers.%s.result' %
library[0])
n.build(result_path, 'analyze_static_initializers', library[1],
variables={'out': result_path, 'expect': expect},
# Add |libraries_fullpath| to implicit= not to run the analyzer
# script until all libraries in |libraries_fullpath| become ready.
# This makes it easy to use
# update_static_initializer_expectations.py especially when you
# remove global variables from two or more libraries at the same
# time.
implicit=[script, expect] + libraries_fullpath)
示例3: get_android_static_library_deps
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import enable_emugl [as 别名]
#.........这里部分代码省略.........
'libcorkscrew.a',
'libcpustats.a',
'libcrypto_static.a',
'libcutils.a',
'libdrmframeworkcommon.a',
'libdrmserver.a',
'libeffects.a',
'libemoji.a',
'libetc1.a',
'libexpat.a',
'libFLAC.a', # used by libstagefright
'libft2.a', # used by libskia
'libgabi++.a',
'libgccdemangle.a',
'libgif.a', # used by libskia
'libgui.a',
'libhardware.a',
'libharfbuzz_ng.a',
'libicui18n.a',
'libicuuc.a',
'libinput.a',
'libinputservice.a',
'libjpeg_static.a',
'liblogcat.a',
'liblog_fake.a',
'libmedia.a',
'libmedia_helper.a', # used by audioflinger
'libmediaplayerservice.a',
'libmemtrack.a',
'libnbaio.a', # used by audioflinger
'libndk_libandroid.a',
'libndk_libandroid_runtime.a',
'libndk_libcrypto_unstable.a',
'libndk_libcutils_unstable.a',
'libndk_libEGL.a',
'libndk_libGLESv1_CM.a',
'libndk_libGLESv2.a',
'libndk_libOpenSLES.a',
'libndk_libjnigraphics.a',
'libndk_liblog.a',
'libndk_libnativehelper.a',
'libndk_libz.a',
'libOpenMAXAL.a',
'libopensles_helper.a', # used by libOpenMAXAL
'libOpenSLES.a', # used by libOpenMAXAL
'libOpenSLESUT.a', # used by libOpenMAXAL
'libpng.a', # used by libskia
'libpowermanager.a',
'libsafe_iop.a',
'libscheduling_policy.a', # used by audioflinger
'libsensorservice.a',
'libsfntly.a', # used by libskia
'libskia.a',
'libsonivox.a',
'libspeexresampler.a', # used by libaudioutils
'libsqlite3_android.a',
'libsqlite.a',
'libssl_static.a',
'libstagefright.a',
'libstagefright_amrnb_common.a', # used by libmedia_jni
'libstagefright_color_conversion.a', # used by libstagefright
'libstagefright_enc_common.a',
'libstagefright_foundation.a',
'libstagefright_httplive.a', # used by libstagefright
'libstagefright_id3.a', # used by libstagefright
'libstagefright_matroska.a', # used by libstagefright
'libstagefright_mpeg2ts.a', # used by libstagefright
'libstagefright_nuplayer.a', # used by libmediaplayerservice
'libstagefright_omx.a',
'libstagefright_rtsp.a', # used by libmediaplayerservice
'libstagefright_timedtext.a', # used by libstagefright
'libstagefright_wfd.a', # used by libmediaplayerservice
'libstagefright_yuv.a',
'libsync.a', # used by HW composer
'libui.a',
'libunwind.a',
'libvorbisidec.a', # used by libstagefright
'libvpx.a', # used by libstagefright
'libwebm.a', # used by libstagefright
'libwebp-decode.a', # used by libskia
'libwebp-encode.a', # used by libskia
'libwilhelm.a', # used by libOpenMAXAL
'libyuv_static.a',
'libz.a']
if OPTIONS.enable_emugl():
deps.append('libEGL.a')
deps.append('libGLESv1_CM.a')
else:
deps.append('libegl.a')
deps.append('libgles.a')
deps.append('libgralloc.a')
if not OPTIONS.disable_hwui():
deps.append('libhwui.a')
if OPTIONS.enable_aacenc():
deps.append('libstagefright_aacenc.a')
return deps