summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-08-02 17:08:58 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-02 17:08:58 -0700
commit7cff891f31311139e215e3948198843bcafd6137 (patch)
treeafc6621287c6019e0f05f0fcb7ceddbc84d9ea3f
parentaed9001553cdce6e9ad7512925c5ad4e0d51ea5f (diff)
parent43cfe8a4521b5c153055fbfa181940bc56bb3b06 (diff)
downloadpackages_apps_Browser-7cff891f31311139e215e3948198843bcafd6137.zip
packages_apps_Browser-7cff891f31311139e215e3948198843bcafd6137.tar.gz
packages_apps_Browser-7cff891f31311139e215e3948198843bcafd6137.tar.bz2
Merge "Clear bitmap from canvas after done drawing to it."
-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) {