summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-08-02 16:59:35 -0700
committerDianne Hackborn <hackbod@google.com>2011-08-02 16:59:35 -0700
commit43cfe8a4521b5c153055fbfa181940bc56bb3b06 (patch)
tree8179738aec9036656e5765421e72df331838aa6f
parent133d09d6cfb8afd9ac6dcea238c2f94eda6e46d4 (diff)
downloadpackages_apps_Browser-43cfe8a4521b5c153055fbfa181940bc56bb3b06.zip
packages_apps_Browser-43cfe8a4521b5c153055fbfa181940bc56bb3b06.tar.gz
packages_apps_Browser-43cfe8a4521b5c153055fbfa181940bc56bb3b06.tar.bz2
Clear bitmap from canvas after done drawing to it.
Change-Id: I0ebc8510021a2dd0b147ced7890d939ec47809f6
-rw-r--r--src/com/android/browser/BookmarkUtils.java1
-rw-r--r--src/com/android/browser/Controller.java1
-rw-r--r--src/com/android/browser/Tab.java1
-rw-r--r--src/com/android/browser/TabBar.java1
-rw-r--r--src/com/android/browser/WallpaperHandler.java1
5 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/browser/BookmarkUtils.java b/src/com/android/browser/BookmarkUtils.java
index 2e96613..ca0cfbc 100644
--- a/src/com/android/browser/BookmarkUtils.java
+++ b/src/com/android/browser/BookmarkUtils.java
@@ -104,6 +104,7 @@ public class BookmarkUtils {
drawFaviconToCanvas(context, favicon, canvas, iconBounds, type);
}
}
+ canvas.setBitmap(null);
return bm;
}
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 0d22af0..142375d 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1967,6 +1967,7 @@ public class Controller
thumbnail.draw(canvas);
Bitmap ret = Bitmap.createScaledBitmap(bm, width / filter_scale,
height / filter_scale, true);
+ canvas.setBitmap(null);
bm.recycle();
return ret;
}
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index cd209ed..6aa8683 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -1993,6 +1993,7 @@ class Tab implements PictureListener {
float scale = mCaptureWidth / (float) mMainView.getWidth();
c.scale(scale, scale, left, top);
mMainView.draw(c);
+ c.setBitmap(null);
persistThumbnail();
}
diff --git a/src/com/android/browser/TabBar.java b/src/com/android/browser/TabBar.java
index 2b4dd63..d1652dd 100644
--- a/src/com/android/browser/TabBar.java
+++ b/src/com/android/browser/TabBar.java
@@ -243,6 +243,7 @@ public class TabBar extends LinearLayout implements OnClickListener {
Canvas c = new Canvas(b);
drawable.setBounds(0, 0, width, height);
drawable.draw(c);
+ c.setBitmap(null);
return b;
}
diff --git a/src/com/android/browser/WallpaperHandler.java b/src/com/android/browser/WallpaperHandler.java
index cd896da..6437b1a 100644
--- a/src/com/android/browser/WallpaperHandler.java
+++ b/src/com/android/browser/WallpaperHandler.java
@@ -162,6 +162,7 @@ public class WallpaperHandler extends Thread
Canvas canvas = new Canvas(bm);
oldWallpaper.setBounds(0, 0, width, height);
oldWallpaper.draw(canvas);
+ canvas.setBitmap(null);
try {
wm.setBitmap(bm);
} catch (IOException e) {