summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-08-02 22:02:30 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-02 22:02:30 -0700
commitb2cdfb5f86bcf3e97598f9dd88415980d5a51f84 (patch)
tree3e485a4063e78d8bbab87c035dfae1135fd188a7 /src
parent0a7c914be6929f63dab74d420348d21970143ee2 (diff)
parent9b9d48f28926371eab94c425b1d54150732fa08f (diff)
downloadandroid_packages_apps_Trebuchet-b2cdfb5f86bcf3e97598f9dd88415980d5a51f84.tar.gz
android_packages_apps_Trebuchet-b2cdfb5f86bcf3e97598f9dd88415980d5a51f84.tar.bz2
android_packages_apps_Trebuchet-b2cdfb5f86bcf3e97598f9dd88415980d5a51f84.zip
Merge "Clear the bitmap associated with canvases."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java3
-rw-r--r--src/com/android/launcher2/BubbleTextView.java1
-rw-r--r--src/com/android/launcher2/CachedTextView.java1
-rw-r--r--src/com/android/launcher2/HolographicOutlineHelper.java1
-rw-r--r--src/com/android/launcher2/IconCache.java1
-rw-r--r--src/com/android/launcher2/Utilities.java4
-rw-r--r--src/com/android/launcher2/Workspace.java4
7 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index e9c22ff07..e5fe7bd26 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -419,6 +419,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
mCanvas.save();
preview.draw(mCanvas);
mCanvas.restore();
+ mCanvas.setBitmap(null);
createItemInfo.spanX = createItemInfo.spanY = 1;
}
@@ -699,6 +700,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
c.save();
c.drawBitmap(b, 0, 0, null);
c.restore();
+ c.setBitmap(null);
images.add(outline);
}
@@ -747,6 +749,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
d.setBounds(x, y, x + w, y + h);
d.draw(c);
d.setBounds(oldBounds); // Restore the bounds
+ c.setBitmap(null);
}
}
private Bitmap getShortcutPreview(ResolveInfo info, int cellWidth, int cellHeight) {
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 476d06374..bd3a4bde5 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -200,6 +200,7 @@ public class BubbleTextView extends TextView implements VisibilityChangedBroadca
canvas.setBitmap(b);
drawWithPadding(canvas, padding);
mOutlineHelper.applyExtraThickExpensiveOutlineWithBlur(b, canvas, glowColor, outlineColor);
+ canvas.setBitmap(null);
return b;
}
diff --git a/src/com/android/launcher2/CachedTextView.java b/src/com/android/launcher2/CachedTextView.java
index ac2cc3b5c..f9f68a0d4 100644
--- a/src/com/android/launcher2/CachedTextView.java
+++ b/src/com/android/launcher2/CachedTextView.java
@@ -130,6 +130,7 @@ public class CachedTextView extends TextView {
setAlpha(prevAlpha);
mIsBuildingCache = false;
mCacheCanvas.restore();
+ mCacheCanvas.setBitmap(null);
// A hack-- we set the text to be one space (we don't make it empty just to avoid any
// potential issues with text measurement, like line height, etc.) so that the text view
diff --git a/src/com/android/launcher2/HolographicOutlineHelper.java b/src/com/android/launcher2/HolographicOutlineHelper.java
index d2e1e7eb9..748d89e09 100644
--- a/src/com/android/launcher2/HolographicOutlineHelper.java
+++ b/src/com/android/launcher2/HolographicOutlineHelper.java
@@ -199,6 +199,7 @@ public class HolographicOutlineHelper {
mHolographicPaint);
// cleanup
+ srcDstCanvas.setBitmap(null);
brightOutline.recycle();
thickOuterBlur.recycle();
thickInnerBlur.recycle();
diff --git a/src/com/android/launcher2/IconCache.java b/src/com/android/launcher2/IconCache.java
index 2977383a9..20c5f34ad 100644
--- a/src/com/android/launcher2/IconCache.java
+++ b/src/com/android/launcher2/IconCache.java
@@ -101,6 +101,7 @@ public class IconCache {
Canvas c = new Canvas(b);
d.setBounds(0, 0, b.getWidth(), b.getHeight());
d.draw(c);
+ c.setBitmap(null);
return b;
}
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index 775833391..c63c82206 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -145,6 +145,7 @@ final class Utilities {
icon.setBounds(left, top, left+width, top+height);
icon.draw(canvas);
icon.setBounds(sOldBounds);
+ canvas.setBitmap(null);
return bitmap;
}
@@ -211,6 +212,8 @@ final class Utilities {
canvas.drawBitmap(bitmap, 0.0f, 0.0f, sDisabledPaint);
+ canvas.setBitmap(null);
+
return disabled;
}
}
@@ -327,6 +330,7 @@ final class Utilities {
c.drawText(lineText, x, y, mTextPaint);
}
+ c.setBitmap(null);
return b;
}
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 390159426..2c244405f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -1983,6 +1983,7 @@ public class Workspace extends SmoothPagedView
canvas.setBitmap(b);
drawDragView(v, canvas, padding, true);
mOutlineHelper.applyOuterBlur(b, canvas, outlineColor);
+ canvas.setBitmap(null);
return b;
}
@@ -1999,6 +2000,7 @@ public class Workspace extends SmoothPagedView
canvas.setBitmap(b);
drawDragView(v, canvas, padding, false);
mOutlineHelper.applyMediumExpensiveOutlineWithBlur(b, canvas, outlineColor, outlineColor);
+ canvas.setBitmap(null);
return b;
}
@@ -2025,6 +2027,7 @@ public class Workspace extends SmoothPagedView
p.setFilterBitmap(true);
canvas.drawBitmap(orig, src, dst, p);
mOutlineHelper.applyMediumExpensiveOutlineWithBlur(b, canvas, outlineColor, outlineColor);
+ canvas.setBitmap(null);
return b;
}
@@ -2048,6 +2051,7 @@ public class Workspace extends SmoothPagedView
canvas.drawRoundRect(new RectF(inset, inset, iconWidth - inset, iconHeight - inset),
rectRadius, rectRadius, mExternalDragOutlinePaint);
mOutlineHelper.applyMediumExpensiveOutlineWithBlur(b, canvas, outlineColor, outlineColor);
+ canvas.setBitmap(null);
return b;
}