Renderscript samples. Merged two model related projects. Cleanup.

Change-Id: I6fdc70420eee7dfecf0b051fd687e5797c6580ce
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 1ef9c93..7661d499 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -218,6 +218,7 @@
 
 Font * Font::create(Context *rsc, const char *name, uint32_t fontSize, uint32_t dpi)
 {
+    rsc->mStateFont.checkInit();
     Vector<Font*> &activeFonts = rsc->mStateFont.mActiveFonts;
 
     for(uint32_t i = 0; i < activeFonts.size(); i ++) {
@@ -513,6 +514,12 @@
 
     initVertexArrayBuffers();
 
+    // We store a string with letters in a rough frequency of occurrence
+    mLatinPrecache = String8(" eisarntolcdugpmhbyfvkwzxjq");
+    mLatinPrecache += String8("EISARNTOLCDUGPMHBYFVKWZXJQ");
+    mLatinPrecache += String8(",.?!()-+@;:`'");
+    mLatinPrecache += String8("0123456789");
+
     mInitialized = true;
 }
 
@@ -622,7 +629,7 @@
 
 uint32_t FontState::getRemainingCacheCapacity() {
     uint32_t remainingCapacity = 0;
-    float totalPixels = 0;
+    uint32_t totalPixels = 0;
     for(uint32_t i = 0; i < mCacheLines.size(); i ++) {
          remainingCapacity += (mCacheLines[i]->mMaxWidth - mCacheLines[i]->mCurrentCol);
          totalPixels += mCacheLines[i]->mMaxWidth;
@@ -666,12 +673,6 @@
         issueDrawCommand();
         mCurrentQuadIndex = 0;
     }
-
-    // We store a string with letters in a rough frequency of occurrence
-    mLatinPrecache = String8(" eisarntolcdugpmhbyfvkwzxjq");
-    mLatinPrecache += String8("EISARNTOLCDUGPMHBYFVKWZXJQ");
-    mLatinPrecache += String8(",.?!()-+@;:`'");
-    mLatinPrecache += String8("0123456789");
 }
 
 void FontState::renderText(const char *text, int x, int y)