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

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

Issue 2075173002: Quick bandaid for chromium:611002. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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 | 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 #ifndef SkBlitRow_opts_DEFINED 8 #ifndef SkBlitRow_opts_DEFINED
9 #define SkBlitRow_opts_DEFINED 9 #define SkBlitRow_opts_DEFINED
10 10
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 vst1_u32(dst+0, vreinterpret_u32_u8(dst0)); 183 vst1_u32(dst+0, vreinterpret_u32_u8(dst0));
184 vst1_u32(dst+2, vreinterpret_u32_u8(dst2)); 184 vst1_u32(dst+2, vreinterpret_u32_u8(dst2));
185 185
186 src += 4; 186 src += 4;
187 dst += 4; 187 dst += 4;
188 len -= 4; 188 len -= 4;
189 } 189 }
190 #endif 190 #endif
191 191
192 while (len-- > 0) { 192 while (len-- > 0) {
193 if (*src) { 193 // This 0xFF000000 is not semantically necessary, but for compatibility
194 // with chromium:611002 we need to keep it until we figure out where
195 // the non-premultiplied src values (like 0x00FFFFFF) are coming from.
196 // TODO(mtklein): sort this out and assert *src is premul here.
197 if (*src & 0xFF000000) {
194 *dst = (*src >= 0xFF000000) ? *src : SkPMSrcOver(*src, *dst); 198 *dst = (*src >= 0xFF000000) ? *src : SkPMSrcOver(*src, *dst);
195 } 199 }
196 src++; 200 src++;
197 dst++; 201 dst++;
198 } 202 }
199 } 203 }
200 204
201 } // SK_OPTS_NS 205 } // SK_OPTS_NS
202 206
203 #endif//SkBlitRow_opts_DEFINED 207 #endif//SkBlitRow_opts_DEFINED
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698