From dd9ffea9ce051a49dbc6544e6aa3cb68fe987f47 Mon Sep 17 00:00:00 2001 From: reed Date: Thu, 18 Feb 2016 12:39:14 -0800 Subject: make SkPM4f private BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713653002 Review URL: https://codereview.chromium.org/1713653002 --- include/core/SkColor.h | 34 +--------------------------------- include/core/SkXfermode.h | 3 +++ 2 files changed, 4 insertions(+), 33 deletions(-) (limited to 'include') 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 -- cgit v1.2.3