Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Unified Diff: src/core/SkHalf.h

Issue 762923003: Add support for half float alpha textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix config setup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkHalf.h
diff --git a/src/core/SkHalf.h b/src/core/SkHalf.h
index 3fd07793e9bfb59398dbac6651c7267e18dd6b2d..7e41c6ff0c6494022c0f99649ccd88b3a46499c7 100644
--- a/src/core/SkHalf.h
+++ b/src/core/SkHalf.h
@@ -15,6 +15,10 @@
// only used for storage
typedef uint16_t SkHalf;
+#define SK_HalfMin 0x0400 // 2^-24 (minimum positive normal value)
+#define SK_HalfMax 0x7bff // 65504
+#define SK_HalfEpsilon 0x1400 // 2^-10
+
// convert between half and single precision floating point
float SkHalfToFloat(SkHalf h);
SkHalf SkFloatToHalf(float f);
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698