summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Canvas.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 32ecd9f..06d53e3 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -112,7 +112,9 @@ public class Canvas {
* on behalf of the Canvas. Any subsequent drawing with a GL-backed Canvas
* will have to recreate those resources.
*/
- public static native void freeGlCaches();
+ public static void freeGlCaches() {
+ freeCaches();
+ }
/**
* Specify a bitmap for the canvas to draw into.
@@ -1405,6 +1407,14 @@ public class Canvas {
finalizer(mNativeCanvas);
}
+ /**
+ * Free up as much memory as possible from private caches (e.g. fonts,
+ * images)
+ *
+ * @hide - for now
+ */
+ public static native void freeCaches();
+
private static native int initRaster(int nativeBitmapOrZero);
private static native int initGL();
private static native void native_setBitmap(int nativeCanvas, int bitmap);