Reduce debugging spew and add props to selectivly re-enable it.

change-id: Ib59ed5d7a9d479ccd1af456029735dbc65ae1efe
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp
index fc2744f..fb8180f 100644
--- a/libs/rs/rsScriptC.cpp
+++ b/libs/rs/rsScriptC.cpp
@@ -130,8 +130,8 @@
     rsc->appendNameDefines(&tmp);
     appendDecls(&tmp);
     rsc->appendVarDefines(&tmp);
-    appendVarDefines(&tmp);
-    appendTypes(&tmp);
+    appendVarDefines(rsc, &tmp);
+    appendTypes(rsc, &tmp);
     tmp.append("#line 1\n");
 
     const char* scriptSource[] = {tmp.string(), s->mEnviroment.mScriptText};
@@ -260,11 +260,13 @@
     s->append("}");
 }
 
-void ScriptCState::appendVarDefines(String8 *str)
+void ScriptCState::appendVarDefines(const Context *rsc, String8 *str)
 {
     char buf[256];
-    LOGD("appendVarDefines mInt32Defines.size()=%d mFloatDefines.size()=%d\n",
-            mInt32Defines.size(), mFloatDefines.size());
+    if (rsc->props.mLogScripts) {
+        LOGD("appendVarDefines mInt32Defines.size()=%d mFloatDefines.size()=%d\n",
+                mInt32Defines.size(), mFloatDefines.size());
+    }
     for (size_t ct=0; ct < mInt32Defines.size(); ct++) {
         str->append("#define ");
         str->append(mInt32Defines.keyAt(ct));
@@ -283,7 +285,7 @@
 
 
 
-void ScriptCState::appendTypes(String8 *str)
+void ScriptCState::appendTypes(const Context *rsc, String8 *str)
 {
     char buf[256];
     String8 tmp;
@@ -308,7 +310,9 @@
             s.append("_t struct struct_");
             s.append(e->getName());
             s.append("\n\n");
-            LOGD(s);
+            if (rsc->props.mLogScripts) {
+                LOGV(s);
+            }
             str->append(s);
         }
 
@@ -321,7 +325,9 @@
                 tmp.append(c->getComponentName());
                 sprintf(buf, " %i\n", ct2);
                 tmp.append(buf);
-                LOGD(tmp);
+                if (rsc->props.mLogScripts) {
+                    LOGV(tmp);
+                }
                 str->append(tmp);
             }
         }
@@ -351,7 +357,9 @@
             }
             s.append(mSlotNames[ct]);
             s.append(";\n");
-            LOGD(s);
+            if (rsc->props.mLogScripts) {
+                LOGV(s);
+            }
             str->append(s);
         }
     }