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

Side by Side Diff: src/effects/SkLightingImageFilter.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 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkLightingImageFilter.h" 8 #include "SkLightingImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 return SkNEW_ARGS(SkPointLight, (random_point3(random), random->next U())); 1108 return SkNEW_ARGS(SkPointLight, (random_point3(random), random->next U()));
1109 } 1109 }
1110 case 2: { 1110 case 2: {
1111 return SkNEW_ARGS(SkSpotLight, (random_point3(random), 1111 return SkNEW_ARGS(SkSpotLight, (random_point3(random),
1112 random_point3(random), 1112 random_point3(random),
1113 random->nextUScalar1(), 1113 random->nextUScalar1(),
1114 random->nextUScalar1(), 1114 random->nextUScalar1(),
1115 random->nextU())); 1115 random->nextU()));
1116 } 1116 }
1117 default: 1117 default:
1118 GrCrash(); 1118 SkFAIL("Unexpected value.");
1119 return NULL; 1119 return NULL;
1120 } 1120 }
1121 } 1121 }
1122 1122
1123 } 1123 }
1124 1124
1125 class GrGLLightingEffect : public GrGLEffect { 1125 class GrGLLightingEffect : public GrGLEffect {
1126 public: 1126 public:
1127 GrGLLightingEffect(const GrBackendEffectFactory& factory, 1127 GrGLLightingEffect(const GrBackendEffectFactory& factory,
1128 const GrDrawEffect& effect); 1128 const GrDrawEffect& effect);
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 1615
1616 builder->fsCodeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 1616 builder->fsCodeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
1617 } 1617 }
1618 1618
1619 #endif 1619 #endif
1620 1620
1621 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 1621 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
1622 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 1622 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
1623 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 1623 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
1624 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1624 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698