summaryrefslogtreecommitdiff
path: root/graphics/java/android
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2012-08-06 14:51:10 -0700
committer Romain Guy <romainguy@google.com> 2012-08-06 14:51:10 -0700
commit4ff0cf4b83605bff630c4e6f1fabe4f72a3f93a1 (patch)
tree2616ad1230b8ebc22a720945c5841a36572b9545 /graphics/java/android
parentbec1d13da2ef3c8c2c4cc4f740474d095068bd8b (diff)
Add new debug tool to track hardware layers updates
You can setprop debug.hwui.show_layers_updates true to flash hw layers in green when they update. This is also a setting in the Dev. section of the settings app. Change-Id: Ibe1d63a4f81567dc1d590c9b088d2e7505df8abf
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/Bitmap.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 128adcbf53a2..6ba57809f3e6 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -881,15 +881,17 @@ public final class Bitmap implements Parcelable {
* <code>(128, 128, 0, 0)</code>.</p>
*
* <p>This method always returns false if {@link #getConfig()} is
- * {@link Bitmap.Config#ALPHA_8} or {@link Bitmap.Config#RGB_565}.</p>
+ * {@link Bitmap.Config#RGB_565}.</p>
+ *
+ * <p>This method only returns true if {@link #hasAlpha()} returns true.
+ * A bitmap with no alpha channel can be used both as a pre-multiplied and
+ * as a non pre-multiplied bitmap.</p>
*
* @return true if the underlying pixels have been pre-multiplied, false
* otherwise
*/
public final boolean isPremultiplied() {
- final Config config = getConfig();
- //noinspection deprecation
- return config == Config.ARGB_8888 || config == Config.ARGB_4444;
+ return getConfig() != Config.RGB_565 && hasAlpha();
}
/** Returns the bitmap's width */