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

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

Issue 2197683002: SkNx: add Sk4u (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | src/core/SkRasterPipelineBlitter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 typedef SkNx<16, SkScalar> Sk16s; 286 typedef SkNx<16, SkScalar> Sk16s;
287 287
288 typedef SkNx<4, uint8_t> Sk4b; 288 typedef SkNx<4, uint8_t> Sk4b;
289 typedef SkNx<8, uint8_t> Sk8b; 289 typedef SkNx<8, uint8_t> Sk8b;
290 typedef SkNx<16, uint8_t> Sk16b; 290 typedef SkNx<16, uint8_t> Sk16b;
291 291
292 typedef SkNx<4, uint16_t> Sk4h; 292 typedef SkNx<4, uint16_t> Sk4h;
293 typedef SkNx<8, uint16_t> Sk8h; 293 typedef SkNx<8, uint16_t> Sk8h;
294 typedef SkNx<16, uint16_t> Sk16h; 294 typedef SkNx<16, uint16_t> Sk16h;
295 295
296 typedef SkNx<4, int> Sk4i; 296 typedef SkNx<4, int32_t> Sk4i;
297 typedef SkNx<4, uint32_t> Sk4u;
297 298
298 // Include platform specific specializations if available. 299 // Include platform specific specializations if available.
299 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 300 #if !defined(SKNX_NO_SIMD) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
300 #include "../opts/SkNx_sse.h" 301 #include "../opts/SkNx_sse.h"
301 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON) 302 #elif !defined(SKNX_NO_SIMD) && defined(SK_ARM_HAS_NEON)
302 #include "../opts/SkNx_neon.h" 303 #include "../opts/SkNx_neon.h"
303 #else 304 #else
304 305
305 SI Sk4i Sk4f_round(const Sk4f& x) { 306 SI Sk4i Sk4f_round(const Sk4f& x) {
306 return { (int) lrintf (x[0]), 307 return { (int) lrintf (x[0]),
(...skipping 26 matching lines...) Expand all
333 334
334 #endif 335 #endif
335 336
336 SI void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d) { 337 SI void Sk4f_ToBytes(uint8_t p[16], const Sk4f& a, const Sk4f& b, const Sk4f& c, const Sk4f& d) {
337 SkNx_cast<uint8_t>(SkNx_join(SkNx_join(a,b), SkNx_join(c,d))).store(p); 338 SkNx_cast<uint8_t>(SkNx_join(SkNx_join(a,b), SkNx_join(c,d))).store(p);
338 } 339 }
339 340
340 #undef SI 341 #undef SI
341 342
342 #endif//SkNx_DEFINED 343 #endif//SkNx_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRasterPipelineBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698