summaryrefslogtreecommitdiff
path: root/graphics/java
diff options
context:
space:
mode:
author Leon Scroggins III <scroggo@google.com> 2019-03-05 10:02:12 -0500
committer Leon Scroggins III <scroggo@google.com> 2019-03-05 10:02:12 -0500
commit4580ae129359fb56467ed125af8fd77ad521dbf8 (patch)
tree4371aff843aa1f70858a10a67d92dd9b48ccfa69 /graphics/java
parent0718be8cfa86546f2e3b0b3fd90ee092e16775ae (diff)
Explain why Bitmap#setColorSpace is @NonNull
Bug: 127282638 Test: No change in behavior Change-Id: I167893b1d80ae37982804ec0dfa98b68d6eaab53
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/Bitmap.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 18eafa61aa48..2e56e09522e9 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -1718,6 +1718,11 @@ public final class Bitmap implements Parcelable {
* <p>Modifies the bitmap to have the specified {@link ColorSpace}, without
* affecting the underlying allocation backing the bitmap.</p>
*
+ * <p>This affects how the framework will interpret the color at each pixel. A bitmap
+ * with {@link Config#ALPHA_8} never has a color space, since a color space does not
+ * affect the alpha channel. Other {@code Config}s must always have a non-null
+ * {@code ColorSpace}.</p>
+ *
* @throws IllegalArgumentException If the specified color space is {@code null}, not
* {@link ColorSpace.Model#RGB RGB}, has a transfer function that is not an
* {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}, or whose