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

Side by Side Diff: src/core/SkXfermode.cpp

Issue 257393004: Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whitespace change Created 6 years, 7 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkXfermode.h" 10 #include "SkXfermode.h"
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 AddLumFunction(builder, &setLum); 1069 AddLumFunction(builder, &setLum);
1070 builder->fsCodeAppendf("\t\tvec4 srcDstAlpha = %s * %s.a;\n" , 1070 builder->fsCodeAppendf("\t\tvec4 srcDstAlpha = %s * %s.a;\n" ,
1071 inputColor, dstColor); 1071 inputColor, dstColor);
1072 builder->fsCodeAppendf("\t\t%s.rgb = %s(%s.rgb * %s.a, srcDs tAlpha.a, srcDstAlpha.rgb);\n", 1072 builder->fsCodeAppendf("\t\t%s.rgb = %s(%s.rgb * %s.a, srcDs tAlpha.a, srcDstAlpha.rgb);\n",
1073 outputColor, setLum.c_str(), dstColor , inputColor); 1073 outputColor, setLum.c_str(), dstColor , inputColor);
1074 builder->fsCodeAppendf("\t\t%s.rgb += (1.0 - %s.a) * %s.rgb + (1.0 - %s.a) * %s.rgb;\n", 1074 builder->fsCodeAppendf("\t\t%s.rgb += (1.0 - %s.a) * %s.rgb + (1.0 - %s.a) * %s.rgb;\n",
1075 outputColor, inputColor, dstColor, ds tColor, inputColor); 1075 outputColor, inputColor, dstColor, ds tColor, inputColor);
1076 break; 1076 break;
1077 } 1077 }
1078 default: 1078 default:
1079 GrCrash("Unknown XferEffect mode."); 1079 SkFAIL("Unknown XferEffect mode.");
1080 break; 1080 break;
1081 } 1081 }
1082 } 1082 }
1083 1083
1084 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG LCaps&) { 1084 static inline EffectKey GenKey(const GrDrawEffect& drawEffect, const GrG LCaps&) {
1085 // The background may come from the dst or from a texture. 1085 // The background may come from the dst or from a texture.
1086 int numTextures = (*drawEffect.effect())->numTextures(); 1086 int numTextures = (*drawEffect.effect())->numTextures();
1087 SkASSERT(numTextures <= 1); 1087 SkASSERT(numTextures <= 1);
1088 return (drawEffect.castEffect<XferEffect>().mode() << 1) | numTextur es; 1088 return (drawEffect.castEffect<XferEffect>().mode() << 1) | numTextur es;
1089 } 1089 }
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode) 2082 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSrcXfermode)
2083 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode) 2083 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstInXfermode)
2084 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode) 2084 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDstOutXfermode)
2085 #if !SK_ARM_NEON_IS_NONE 2085 #if !SK_ARM_NEON_IS_NONE
2086 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkNEONProcCoeffXfermode) 2086 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkNEONProcCoeffXfermode)
2087 #endif 2087 #endif
2088 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS) 2088 #if defined(SK_CPU_X86) && !defined(SK_BUILD_FOR_IOS)
2089 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSSE2ProcCoeffXfermode) 2089 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSSE2ProcCoeffXfermode)
2090 #endif 2090 #endif
2091 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2091 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698