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

Side by Side Diff: src/core/SkNx.h

Issue 1704583003: Simplified linear pipeline. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix unaligned size problem. Created 4 years, 10 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkNx_DEFINED 8 #ifndef SkNx_DEFINED
9 #define SkNx_DEFINED 9 #define SkNx_DEFINED
10 10
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 typedef SkNx<2, float> Sk2f; 192 typedef SkNx<2, float> Sk2f;
193 typedef SkNx<4, float> Sk4f; 193 typedef SkNx<4, float> Sk4f;
194 typedef SkNx<2, SkScalar> Sk2s; 194 typedef SkNx<2, SkScalar> Sk2s;
195 typedef SkNx<4, SkScalar> Sk4s; 195 typedef SkNx<4, SkScalar> Sk4s;
196 196
197 typedef SkNx<4, uint8_t> Sk4b; 197 typedef SkNx<4, uint8_t> Sk4b;
198 typedef SkNx<16, uint8_t> Sk16b; 198 typedef SkNx<16, uint8_t> Sk16b;
199 typedef SkNx<4, uint16_t> Sk4h; 199 typedef SkNx<4, uint16_t> Sk4h;
200 typedef SkNx<16, uint16_t> Sk16h; 200 typedef SkNx<16, uint16_t> Sk16h;
201 typedef SkNx<4, int> Sk4i;
201 202
202 typedef SkNx<4, int> Sk4i; 203 typedef SkNx<4, int> Sk4i;
203 204
204 // Include platform specific specializations if available. 205 // Include platform specific specializations if available.
205 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 206 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
206 #include "../opts/SkNx_sse.h" 207 #include "../opts/SkNx_sse.h"
207 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) 208 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON)
208 #include "../opts/SkNx_neon.h" 209 #include "../opts/SkNx_neon.h"
209 #else 210 #else
210 static inline 211 static inline
211 void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c , const Sk4f& d) { 212 void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c , const Sk4f& d) {
212 SkNx_cast<uint8_t>(a).store(p+ 0); 213 SkNx_cast<uint8_t>(a).store(p+ 0);
213 SkNx_cast<uint8_t>(b).store(p+ 4); 214 SkNx_cast<uint8_t>(b).store(p+ 4);
214 SkNx_cast<uint8_t>(c).store(p+ 8); 215 SkNx_cast<uint8_t>(c).store(p+ 8);
215 SkNx_cast<uint8_t>(d).store(p+12); 216 SkNx_cast<uint8_t>(d).store(p+12);
216 } 217 }
217 #endif 218 #endif
218 219
219 #endif//SkNx_DEFINED 220 #endif//SkNx_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698