Chromium Code Reviews| Index: include/core/SkXfermode.h |
| diff --git a/include/core/SkXfermode.h b/include/core/SkXfermode.h |
| index 261f580ea842fd1ce599265903026b5d04641b44..890a0b97fda0c4be8bbd6c77705d7240431de466 100644 |
| --- a/include/core/SkXfermode.h |
| +++ b/include/core/SkXfermode.h |
| @@ -229,6 +229,23 @@ public: |
| SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| SK_DEFINE_FLATTENABLE_TYPE(SkXfermode) |
| + enum PM4fFlags { |
|
mtklein
2016/02/01 22:53:52
We may want to split these up / mark these as requ
reed1
2016/02/02 14:20:54
I combined them just for convenience. Happy to con
|
| + kSrcIsOpaque_PM4fFlag = 1 << 0, |
| + kDstIsSRGB_PM4fFlag = 1 << 1, |
| + }; |
| + struct PM4fState { |
| + const SkXfermode* fXfer; |
| + uint32_t fFlags; |
| + }; |
| + typedef void (*PM4fProc1)(const PM4fState&, uint32_t dst[], const SkPM4f& src, |
| + int count, const SkAlpha coverage[]); |
| + typedef void (*PM4fProcN)(const PM4fState&, uint32_t dst[], const SkPM4f src[], |
| + int count, const SkAlpha coverage[]); |
| + static PM4fProc1 GetPM4fProc1(Mode, uint32_t flags); |
| + static PM4fProcN GetPM4fProcN(Mode, uint32_t flags); |
| + virtual PM4fProc1 getPM4fProc1(uint32_t flags) const; |
| + virtual PM4fProcN getPM4fProcN(uint32_t flags) const; |
| + |
| protected: |
| SkXfermode() {} |
| /** The default implementation of xfer32/xfer16/xferA8 in turn call this |