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

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

Issue 1019773004: Port to real Sk2f. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 9 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/SkGeometry.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 #ifndef Sk4x_DEFINED 1 #ifndef Sk4x_DEFINED
2 #define Sk4x_DEFINED 2 #define Sk4x_DEFINED
3 3
4 #include "SkTypes.h" 4 #include "SkTypes.h"
5 5
6 #define SK4X_PREAMBLE 1 6 #define SK4X_PREAMBLE 1
7 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 7 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
8 #include "../opts/Sk4x_sse.h" 8 #include "../opts/Sk4x_sse.h"
9 #elif defined(SK_ARM_HAS_NEON) 9 #elif defined(SK_ARM_HAS_NEON)
10 #include "../opts/Sk4x_neon.h" 10 #include "../opts/Sk4x_neon.h"
(...skipping 19 matching lines...) Expand all
30 30
31 Sk4x(const Sk4x&); 31 Sk4x(const Sk4x&);
32 Sk4x& operator=(const Sk4x&); 32 Sk4x& operator=(const Sk4x&);
33 33
34 static Sk4x Load (const T[4]); 34 static Sk4x Load (const T[4]);
35 static Sk4x LoadAligned(const T[4]); 35 static Sk4x LoadAligned(const T[4]);
36 36
37 void store (T[4]) const; 37 void store (T[4]) const;
38 void storeAligned(T[4]) const; 38 void storeAligned(T[4]) const;
39 39
40 // Experimental!
41 static Sk4x Load2(const T src[2]) {
42 const T padded[4] = { src[0], src[1], 0, 0 };
43 return Load(padded);
44 }
45 void store2(T dst[2]) const {
46 T padded[4];
47 this->store(padded);
48 dst[0] = padded[0];
49 dst[1] = padded[1];
50 }
51
52 template <typename Dst> Dst reinterpret() const; 40 template <typename Dst> Dst reinterpret() const;
53 template <typename Dst> Dst cast() const; 41 template <typename Dst> Dst cast() const;
54 42
55 bool allTrue() const; 43 bool allTrue() const;
56 bool anyTrue() const; 44 bool anyTrue() const;
57 45
58 Sk4x bitNot() const; 46 Sk4x bitNot() const;
59 Sk4x bitAnd(const Sk4x&) const; 47 Sk4x bitAnd(const Sk4x&) const;
60 Sk4x bitOr(const Sk4x&) const; 48 Sk4x bitOr(const Sk4x&) const;
61 // TODO: Sk4x bitAndNot(const Sk4x&) const; is efficient in SSE. 49 // TODO: Sk4x bitAndNot(const Sk4x&) const; is efficient in SSE.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 93
106 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 94 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
107 #include "../opts/Sk4x_sse.h" 95 #include "../opts/Sk4x_sse.h"
108 #elif defined(SK_ARM_HAS_NEON) 96 #elif defined(SK_ARM_HAS_NEON)
109 #include "../opts/Sk4x_neon.h" 97 #include "../opts/Sk4x_neon.h"
110 #else 98 #else
111 #include "../opts/Sk4x_none.h" 99 #include "../opts/Sk4x_none.h"
112 #endif 100 #endif
113 101
114 #endif//Sk4x_DEFINED 102 #endif//Sk4x_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGeometry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698