Ejemplo n.º 1
0
 /**
  * Creates a hardware renderer using OpenGL.
  *
  * @param glVersion The version of OpenGL to use (1 for OpenGL 1, 11 for OpenGL 1.1, etc.)
  * @param translucent True if the surface is translucent, false otherwise
  * @return A hardware renderer backed by OpenGL.
  */
 static HardwareRenderer createGlRenderer(int glVersion, boolean translucent) {
   switch (glVersion) {
     case 2:
       return Gl20Renderer.create(translucent);
   }
   throw new IllegalArgumentException("Unknown GL version: " + glVersion);
 }
Ejemplo n.º 2
0
 /**
  * Finishes the process of trimming memory. This method will usually cleanup special resources
  * used by the memory trimming process.
  */
 static void endTrimMemory() {
   Gl20Renderer.endTrimMemory();
 }
Ejemplo n.º 3
0
 /**
  * Starts the process of trimming memory. Usually this call will setup hardware rendering context
  * and reclaim memory.Extra cleanup might be required by calling {@link #endTrimMemory()}.
  *
  * @param level Hint about the amount of memory that should be trimmed, see {@link
  *     android.content.ComponentCallbacks}
  */
 static void startTrimMemory(int level) {
   Gl20Renderer.startTrimMemory(level);
 }