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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBlitRow_opts.h
diff --git a/src/opts/SkBlitRow_opts.h b/src/opts/SkBlitRow_opts.h
index 94d9ee996eb258737e22d623e13063b134ac3d45..2a123f2dd7b0687fd7c2f2675e99c8c8cc834cc5 100644
--- a/src/opts/SkBlitRow_opts.h
+++ b/src/opts/SkBlitRow_opts.h
@@ -190,7 +190,11 @@ void blit_row_s32a_opaque(SkPMColor* dst, const SkPMColor* src, int len, U8CPU a
#endif
while (len-- > 0) {
- if (*src) {
+ // This 0xFF000000 is not semantically necessary, but for compatibility
+ // with chromium:611002 we need to keep it until we figure out where
+ // the non-premultiplied src values (like 0x00FFFFFF) are coming from.
+ // TODO(mtklein): sort this out and assert *src is premul here.
+ if (*src & 0xFF000000) {
*dst = (*src >= 0xFF000000) ? *src : SkPMSrcOver(*src, *dst);
}
src++;
« 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