Remove libgui and libui dependencies for vendor libs.
- This CL removes dependencies on libgui, libui and other remaining
dependences, if build with RS_VENDOR_LIB defined.
- We cannot remove the dependencies for platform RenderScript CPU
fallback, because of the legacy graphics APIs.
- Vendor drivers will be built without graphics APIs, the reference
build file will be posted in another CL.
Bug: 34396220
Test: mm, CTS test pass with the vendor libs.
Change-Id: If90b600a58d0f81488f56a1e21ca332f1a235162
diff --git a/rsScriptC.cpp b/rsScriptC.cpp
index 628d063..5566398 100644
--- a/rsScriptC.cpp
+++ b/rsScriptC.cpp
@@ -127,7 +127,7 @@
}
void ScriptC::setupGLState(Context *rsc) {
-#ifndef RS_COMPATIBILITY_LIB
+#if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
if (mEnviroment.mFragmentStore.get()) {
rsc->setProgramStore(mEnviroment.mFragmentStore.get());
}
@@ -258,7 +258,6 @@
static const bool kDebugBitcode = false;
#ifndef RS_COMPATIBILITY_LIB
-#ifndef ANDROID_RS_SERIALIZE
static bool dumpBitcodeFile(const char *cacheDir, const char *resName,
const char *suffix, const uint8_t *bitcode,
@@ -289,7 +288,6 @@
return true;
}
-#endif // !ANDROID_RS_SERIALIZE
#endif // !RS_COMPATIBILITY_LIB
@@ -301,7 +299,6 @@
ATRACE_CALL();
//ALOGE("runCompiler %p %p %p %p %p %i", rsc, this, resName, cacheDir, bitcode, bitcodeLen);
#ifndef RS_COMPATIBILITY_LIB
-#ifndef ANDROID_RS_SERIALIZE
uint32_t sdkVersion = 0;
bcinfo::BitcodeWrapper bcWrapper((const char *)bitcode, bitcodeLen);
if (!bcWrapper.unwrap()) {
@@ -343,7 +340,6 @@
// optimization level used to compile the bitcode.
rsc->setOptLevel(bcWrapper.getOptimizationLevel());
-#endif
if (!cacheDir) {
// MUST BE FIXED BEFORE ANYTHING USING C++ API IS RELEASED
cacheDir = getenv("EXTERNAL_STORAGE");
@@ -361,7 +357,7 @@
}
mInitialized = true;
-#ifndef RS_COMPATIBILITY_LIB
+#if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
mEnviroment.mFragment.set(rsc->getDefaultProgramFragment());
mEnviroment.mVertex.set(rsc->getDefaultProgramVertex());
mEnviroment.mFragmentStore.set(rsc->getDefaultProgramStore());
@@ -382,7 +378,7 @@
return false;
}
-#ifndef RS_COMPATIBILITY_LIB
+#if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
if (!strcmp(key, "stateVertex")) {
if (!strcmp(value, "default")) {
continue;