diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkColor.h | 34 | ||||
-rw-r--r-- | include/core/SkXfermode.h | 3 |
2 files changed, 4 insertions, 33 deletions
diff --git a/include/core/SkColor.h b/include/core/SkColor.h index 101a9bdbed..a40e5f1f15 100644 --- a/include/core/SkColor.h +++ b/include/core/SkColor.h @@ -160,39 +160,7 @@ typedef SkPMColor (*SkXfermodeProc)(SkPMColor src, SkPMColor dst); /////////////////////////////////////////////////////////////////////////////////////////////////// -struct SkColor4f; - -/* - * The float values are 0...1 premultiplied - */ -struct SkPM4f { - enum { - A = SK_A32_SHIFT/8, - R = SK_R32_SHIFT/8, - G = SK_G32_SHIFT/8, - B = SK_B32_SHIFT/8, - }; - float fVec[4]; - - float a() const { return fVec[A]; } - - SkColor4f unpremul() const; - - static SkPM4f FromPMColor(SkPMColor); - - // half-float routines - void toF16(uint16_t[4]) const; - uint64_t toF16() const; // 4 float16 values packed into uint64_t - static SkPM4f FromF16(const uint16_t[4]); - -#ifdef SK_DEBUG - void assertIsUnit() const; -#else - void assertIsUnit() const {} -#endif -}; - -typedef SkPM4f (*SkXfermodeProc4f)(const SkPM4f& src, const SkPM4f& dst); +struct SkPM4f; /* * The float values are 0...1 unpremultiplied diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h index 3b0f49d22e..94f49fac26 100644 --- a/include/core/SkXfermode.h +++ b/include/core/SkXfermode.h @@ -18,6 +18,9 @@ class GrTexture; class GrXPFactory; class SkString; +struct SkPM4f; +typedef SkPM4f (*SkXfermodeProc4f)(const SkPM4f& src, const SkPM4f& dst); + /** \class SkXfermode * * SkXfermode is the base class for objects that are called to implement custom |