1 /* 2 * Copyright 2014 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkXfermode_opts_SSE2_DEFINED 9 #define SkXfermode_opts_SSE2_DEFINED 10 11 #include "SkTypes.h" 12 #include "SkXfermode_proccoeff.h" 13 14 class SK_API SkSSE2ProcCoeffXfermode : public SkProcCoeffXfermode { 15 public: 16 SkSSE2ProcCoeffXfermode(const ProcCoeff& rec, SkXfermode::Mode mode, 17 void* procSIMD) 18 : INHERITED(rec, mode), fProcSIMD(procSIMD) {} 19 20 virtual void xfer32(SkPMColor dst[], const SkPMColor src[], int count, 21 const SkAlpha aa[]) const SK_OVERRIDE; 22 virtual void xfer16(uint16_t dst[], const SkPMColor src[], 23 int count, const SkAlpha aa[]) const SK_OVERRIDE; 24 25 SK_TO_STRING_OVERRIDE() 26 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSSE2ProcCoeffXfermode) 27 28 private: 29 SkSSE2ProcCoeffXfermode(SkReadBuffer& buffer); 30 31 void* fProcSIMD; 32 typedef SkProcCoeffXfermode INHERITED; 33 }; 34 35 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_SSE2(const ProcCoeff& rec, 36 SkXfermode::Mode mode); 37 38 #endif // SkXfermode_opts_SSE2_DEFINED 39