OLD | NEW |
1 #ifndef SkPM_DEFINED | 1 #ifndef SkPM_DEFINED |
2 #define SkPM_DEFINED | 2 #define SkPM_DEFINED |
3 | 3 |
4 #include "SkTypes.h" | 4 #include "SkTypes.h" |
5 #include "SkColor.h" | 5 #include "SkColor.h" |
6 #include "Sk4x.h" | 6 #include "Sk4x.h" |
7 | 7 |
8 // A pre-multiplied color storing each component as a float in the range [0, 255
]. | 8 // A pre-multiplied color storing each component as a float in the range [0, 255
]. |
9 class SK_STRUCT_ALIGN(16) SkPMFloat { | 9 class SK_STRUCT_ALIGN(16) SkPMFloat { |
10 public: | 10 public: |
(...skipping 27 matching lines...) Expand all Loading... |
38 && this->r() >= 0 && this->r() <= this->a() | 38 && this->r() >= 0 && this->r() <= this->a() |
39 && this->g() >= 0 && this->g() <= this->a() | 39 && this->g() >= 0 && this->g() <= this->a() |
40 && this->b() >= 0 && this->b() <= this->a(); | 40 && this->b() >= 0 && this->b() <= this->a(); |
41 } | 41 } |
42 | 42 |
43 private: | 43 private: |
44 // We mirror SkPMColor order only to make set()/get()/clamped() as fast as p
ossible. | 44 // We mirror SkPMColor order only to make set()/get()/clamped() as fast as p
ossible. |
45 float fColor[4]; | 45 float fColor[4]; |
46 }; | 46 }; |
47 | 47 |
48 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 | 48 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 |
| 49 #include "../opts/SkPMFloat_SSSE3.h" |
| 50 #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 |
49 #include "../opts/SkPMFloat_SSE2.h" | 51 #include "../opts/SkPMFloat_SSE2.h" |
50 #elif defined(__ARM_NEON__) | 52 #elif defined(__ARM_NEON__) |
51 #include "../opts/SkPMFloat_neon.h" | 53 #include "../opts/SkPMFloat_neon.h" |
52 #else | 54 #else |
53 #include "../opts/SkPMFloat_none.h" | 55 #include "../opts/SkPMFloat_none.h" |
54 #endif | 56 #endif |
55 | 57 |
56 #endif//SkPM_DEFINED | 58 #endif//SkPM_DEFINED |
OLD | NEW |