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

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

Issue 985003003: Make Sk4f(float) constructor explicit. (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 | tests/PMFloatTest.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 "Sk4x_sse.h" 8 #include "Sk4x_sse.h"
9 #elif defined(SK_ARM_HAS_NEON) 9 #elif defined(SK_ARM_HAS_NEON)
10 #include "Sk4x_neon.h" 10 #include "Sk4x_neon.h"
11 #else 11 #else
12 #include "Sk4x_portable.h" 12 #include "Sk4x_portable.h"
13 #endif 13 #endif
14 #undef SK4X_PREAMBLE 14 #undef SK4X_PREAMBLE
15 15
16 template <typename T> class Sk4x; 16 template <typename T> class Sk4x;
17 typedef Sk4x<float> Sk4f; 17 typedef Sk4x<float> Sk4f;
18 typedef Sk4x<int32_t> Sk4i; 18 typedef Sk4x<int32_t> Sk4i;
19 19
20 // Some Sk4x methods are implemented only for Sk4f or Sk4i. 20 // Some Sk4x methods are implemented only for Sk4f or Sk4i.
21 // They might be unavailable, really slow, or just a bad idea. 21 // They might be unavailable, really slow, or just a bad idea.
22 // Talk to mtklein if you find yourself unable to link and 22 // Talk to mtklein if you find yourself unable to link and
23 // really need one of those methods. 23 // really need one of those methods.
24 24
25 template <typename T> class Sk4x { 25 template <typename T> class Sk4x {
26 public: 26 public:
27 Sk4x(); // Uninitialized; use Sk4x(0) for zero. 27 Sk4x(); // Uninitialized; use Sk4x(0) for zero.
28 /*implicit*/ Sk4x(T); // Same as Sk4x(T,T,T,T); 28 explicit Sk4x(T); // Same as Sk4x(T,T,T,T);
29 Sk4x(T, T, T, T); 29 Sk4x(T, T, T, T);
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;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 94 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
95 #include "Sk4x_sse.h" 95 #include "Sk4x_sse.h"
96 #elif defined(SK_ARM_HAS_NEON) 96 #elif defined(SK_ARM_HAS_NEON)
97 #include "Sk4x_neon.h" 97 #include "Sk4x_neon.h"
98 #else 98 #else
99 #include "Sk4x_portable.h" 99 #include "Sk4x_portable.h"
100 #endif 100 #endif
101 101
102 #endif//Sk4x_DEFINED 102 #endif//Sk4x_DEFINED
OLDNEW
« no previous file with comments | « no previous file | tests/PMFloatTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698