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

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

Issue 976493002: Add SSSE3 implementation for SkPMFloat, with faster get() and set(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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/opts/SkPMFloat_SSSE3.h » ('j') | src/opts/SkPMFloat_SSSE3.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | src/opts/SkPMFloat_SSSE3.h » ('j') | src/opts/SkPMFloat_SSSE3.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698