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

Side by Side Diff: src/opts/Sk4px_none.h

Issue 1245673002: 565 support for SIMD xfermodes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix typo Created 5 years, 5 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 | « src/opts/Sk4px_SSE2.h ('k') | no next file » | 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 #include "SkUtils.h" 8 #include "SkUtils.h"
9 9
10 namespace { // See Sk4px.h 10 namespace { // See Sk4px.h
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 inline Sk4px Sk4px::zeroColors() const { 95 inline Sk4px Sk4px::zeroColors() const {
96 static_assert(SK_A32_SHIFT == 24, "This method assumes little-endian."); 96 static_assert(SK_A32_SHIFT == 24, "This method assumes little-endian.");
97 return Sk16b(0,0,0, this->kth< 3>(), 97 return Sk16b(0,0,0, this->kth< 3>(),
98 0,0,0, this->kth< 7>(), 98 0,0,0, this->kth< 7>(),
99 0,0,0, this->kth<11>(), 99 0,0,0, this->kth<11>(),
100 0,0,0, this->kth<15>()); 100 0,0,0, this->kth<15>());
101 } 101 }
102 102
103 inline Sk4px Sk4px::Load4(const SkPMColor16 src[4]) {
104 SkPMColor src32[4];
105 for (int i = 0; i < 4; i++) { src32[i] = SkPixel16ToPixel32(src[i]); }
106 return Load4(src32);
107 }
108 inline Sk4px Sk4px::Load2(const SkPMColor16 src[2]) {
109 SkPMColor src32[2];
110 for (int i = 0; i < 2; i++) { src32[i] = SkPixel16ToPixel32(src[i]); }
111 return Load2(src32);
112 }
113 inline Sk4px Sk4px::Load1(const SkPMColor16 src[1]) {
114 SkPMColor src32 = SkPixel16ToPixel32(src[0]);
115 return Load1(&src32);
116 }
117
118 inline void Sk4px::store4(SkPMColor16 dst[4]) const {
119 SkPMColor dst32[4];
120 this->store4(dst32);
121 for (int i = 0; i < 4; i++) { dst[i] = SkPixel32ToPixel16(dst32[i]); }
122 }
123 inline void Sk4px::store2(SkPMColor16 dst[2]) const {
124 SkPMColor dst32[2];
125 this->store2(dst32);
126 for (int i = 0; i < 2; i++) { dst[i] = SkPixel32ToPixel16(dst32[i]); }
127 }
128 inline void Sk4px::store1(SkPMColor16 dst[1]) const {
129 SkPMColor dst32;
130 this->store1(&dst32);
131 dst[0] = SkPixel32ToPixel16(dst32);
132 }
133
103 } // namespace 134 } // namespace
OLDNEW
« no previous file with comments | « src/opts/Sk4px_SSE2.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698