aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/codec
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2016-12-14 10:23:41 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-14 15:59:15 +0000
commit8dcc84f7dc8523dd90501a4feb1f632808337c34 (patch)
tree3923f83afa4c29f3c7817ff33735bb90da3a8d79 /include/codec
parent60c05f98aa22d89e4ef25acb4799936f5df3cff2 (diff)
Prefer F16 in SkAndroidCodec for high precision images
Adapted from: https://googleplex-android-review.git.corp.google.com/#/c/1707531/ TBR=djsollen@google.com BUG=skia: Change-Id: I21b99e8452e728aed70e8913677c253c1ae9f751 Reviewed-on: https://skia-review.googlesource.com/6023 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'include/codec')
-rw-r--r--include/codec/SkAndroidCodec.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/codec/SkAndroidCodec.h b/include/codec/SkAndroidCodec.h
index ecf0a08c15..e30a2aa0b3 100644
--- a/include/codec/SkAndroidCodec.h
+++ b/include/codec/SkAndroidCodec.h
@@ -56,9 +56,13 @@ public:
/**
* @param requestedColorType Color type requested by the client
*
- * If it is possible to decode to requestedColorType, this returns
- * requestedColorType. Otherwise, this returns whichever color type
- * is suggested by the codec as the best match for the encoded data.
+ * |requestedColorType| may be overriden. We will default to kF16
+ * for high precision images and kIndex8 for GIF and WBMP.
+ *
+ * In the general case, if it is possible to decode to
+ * |requestedColorType|, this returns |requestedColorType|.
+ * Otherwise, this returns a color type that is an appropriate
+ * match for the the encoded data.
*/
SkColorType computeOutputColorType(SkColorType requestedColorType);