aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-16 10:53:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-16 15:37:54 +0000
commitb4aab9ae6d27c446af8302b79d15b832c816c633 (patch)
tree27e7f87a7a5e3d61990bc2742d9b9f167d26e0c3
parentedf3dc094b0fc55bfc932539da1127484051b474 (diff)
Replace SkFAIL with SK_ABORT.
SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
-rw-r--r--bench/CubicKLMBench.cpp2
-rw-r--r--bench/GLVec4ScalarBench.cpp2
-rw-r--r--bench/RotatedRectBench.cpp6
-rw-r--r--bench/SKPAnimationBench.h2
-rw-r--r--gm/aaxfermodes.cpp2
-rw-r--r--gm/all_bitmap_configs.cpp2
-rw-r--r--gm/glyph_pos_align.cpp2
-rw-r--r--gm/occludedrrectblur.cpp4
-rw-r--r--include/core/SkTextBlob.h2
-rw-r--r--include/gpu/GrTypes.h16
-rw-r--r--include/private/GrGLSL.h4
-rw-r--r--include/private/GrSwizzle.h2
-rw-r--r--include/private/GrTypesPriv.h20
-rw-r--r--samplecode/SamplePathText.cpp2
-rw-r--r--src/core/SkBlitter_ARGB32.cpp4
-rw-r--r--src/core/SkBlurImageFilter.cpp2
-rw-r--r--src/core/SkDevice.cpp2
-rw-r--r--src/core/SkFindAndPlaceGlyph.h12
-rw-r--r--src/core/SkPath.cpp2
-rw-r--r--src/core/SkRasterClip.cpp2
-rw-r--r--src/core/SkScan_AAAPath.cpp2
-rw-r--r--src/core/SkTextBlob.cpp2
-rw-r--r--src/effects/SkLightingImageFilter.cpp2
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp6
-rw-r--r--src/fonts/SkFontMgr_indirect.cpp4
-rw-r--r--src/gpu/GrBlend.cpp2
-rw-r--r--src/gpu/GrCaps.cpp2
-rw-r--r--src/gpu/GrFragmentProcessor.h2
-rw-r--r--src/gpu/GrPathRange.cpp4
-rw-r--r--src/gpu/GrPathRendering.cpp2
-rw-r--r--src/gpu/GrPathRendering.h2
-rw-r--r--src/gpu/GrProcessor.cpp8
-rw-r--r--src/gpu/GrProcessor.h2
-rw-r--r--src/gpu/GrProcessorUnitTest.cpp2
-rw-r--r--src/gpu/GrRenderTargetContext.cpp2
-rw-r--r--src/gpu/GrResourceCache.cpp4
-rw-r--r--src/gpu/GrShaderCaps.cpp2
-rw-r--r--src/gpu/GrShaderVar.cpp8
-rw-r--r--src/gpu/GrShape.cpp4
-rw-r--r--src/gpu/SkGr.h2
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageOpsBuilder.cpp10
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageProcessor.cpp4
-rw-r--r--src/gpu/ccpr/GrCCPRCoverageProcessor.h2
-rw-r--r--src/gpu/effects/GrBezierEffect.cpp6
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp2
-rw-r--r--src/gpu/effects/GrConstColorProcessor.cpp2
-rw-r--r--src/gpu/effects/GrCoverageSetOpXP.cpp2
-rw-r--r--src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp4
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.cpp4
-rw-r--r--src/gpu/effects/GrRRectEffect.cpp6
-rw-r--r--src/gpu/effects/GrXfermodeFragmentProcessor.cpp4
-rw-r--r--src/gpu/gl/GrGLCaps.cpp4
-rw-r--r--src/gpu/gl/GrGLCreateNullInterface.cpp16
-rw-r--r--src/gpu/gl/GrGLGLSL.cpp2
-rw-r--r--src/gpu/gl/GrGLGpu.cpp12
-rw-r--r--src/gpu/gl/GrGLPath.cpp2
-rw-r--r--src/gpu/gl/GrGLPathRendering.cpp2
-rw-r--r--src/gpu/gl/GrGLVertexArray.cpp2
-rw-r--r--src/gpu/glsl/GrGLSL.cpp2
-rw-r--r--src/gpu/glsl/GrGLSLBlend.cpp6
-rw-r--r--src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp2
-rw-r--r--src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp4
-rw-r--r--src/gpu/glsl/GrGLSLXferProcessor.h4
-rw-r--r--src/gpu/instanced/InstanceProcessor.cpp8
-rw-r--r--src/gpu/mtl/GrMtlCaps.mm2
-rw-r--r--src/gpu/mtl/GrMtlUtil.mm2
-rw-r--r--src/gpu/ops/GrAAConvexPathRenderer.cpp2
-rw-r--r--src/gpu/ops/GrDrawPathOp.cpp4
-rw-r--r--src/gpu/ops/GrDrawVerticesOp.cpp4
-rw-r--r--src/gpu/ops/GrOp.h2
-rw-r--r--src/gpu/ops/GrOvalOpFactory.cpp6
-rw-r--r--src/gpu/ops/GrShadowRRectOp.cpp6
-rw-r--r--src/gpu/text/GrAtlasGlyphCache.cpp2
-rw-r--r--src/gpu/text/GrAtlasTextBlob.h2
-rw-r--r--src/gpu/vk/GrVkCommandBuffer.cpp4
-rw-r--r--src/gpu/vk/GrVkGpu.cpp8
-rw-r--r--src/gpu/vk/GrVkPipeline.cpp4
-rw-r--r--src/gpu/vk/GrVkPipelineStateDataManager.h2
-rw-r--r--src/gpu/vk/GrVkRenderPass.cpp2
-rw-r--r--src/gpu/vk/GrVkTransferBuffer.h2
-rw-r--r--src/gpu/vk/GrVkUniformHandler.cpp4
-rw-r--r--src/gpu/vk/GrVkUniformHandler.h4
-rw-r--r--src/gpu/vk/GrVkUtil.cpp2
-rw-r--r--src/gpu/vk/GrVkVaryingHandler.cpp2
-rw-r--r--src/ports/SkFontMgr_FontConfigInterface.cpp4
-rw-r--r--src/shaders/gradients/SkGradientShader.cpp2
-rw-r--r--src/svg/SkSVGDevice.cpp2
-rw-r--r--src/utils/SkShadowUtils.cpp4
-rw-r--r--tests/GrPorterDuffTest.cpp6
-rw-r--r--tests/SurfaceSemaphoreTest.cpp2
-rw-r--r--tests/TextBlobTest.cpp2
-rw-r--r--tools/debugger/SkDrawCommand.cpp2
-rw-r--r--tools/gpu/GrContextFactory.h2
-rw-r--r--tools/gpu/gl/GLTestContext.h2
-rw-r--r--tools/gpu/gl/debug/DebugGLTestContext.cpp18
95 files changed, 190 insertions, 190 deletions
diff --git a/bench/CubicKLMBench.cpp b/bench/CubicKLMBench.cpp
index cbf3d13ea4..191e1804aa 100644
--- a/bench/CubicKLMBench.cpp
+++ b/bench/CubicKLMBench.cpp
@@ -30,7 +30,7 @@ public:
fName.append("loop");
break;
default:
- SkFAIL("Unexpected cubic type");
+ SK_ABORT("Unexpected cubic type");
break;
}
}
diff --git a/bench/GLVec4ScalarBench.cpp b/bench/GLVec4ScalarBench.cpp
index 8cc329a33b..fab397b220 100644
--- a/bench/GLVec4ScalarBench.cpp
+++ b/bench/GLVec4ScalarBench.cpp
@@ -245,7 +245,7 @@ void GLVec4ScalarBench::setupSingleVbo(const GrGLInterface* gl, const SkMatrix*
void GLVec4ScalarBench::setup(const GrGLContext* ctx) {
const GrGLInterface* gl = ctx->interface();
if (!gl) {
- SkFAIL("GL interface is nullptr in setup()!\n");
+ SK_ABORT("GL interface is nullptr in setup()!\n");
}
fFboTextureId = SetupFramebuffer(gl, kScreenWidth, kScreenHeight);
diff --git a/bench/RotatedRectBench.cpp b/bench/RotatedRectBench.cpp
index d9ee5823bf..6a11c2305c 100644
--- a/bench/RotatedRectBench.cpp
+++ b/bench/RotatedRectBench.cpp
@@ -35,7 +35,7 @@ static inline SkColor start_color(ColorType ct) {
case kChangingTransparent_ColorType:
return 0x80A07040;
}
- SkFAIL("Shouldn't reach here.");
+ SK_ABORT("Shouldn't reach here.");
return 0;
}
@@ -52,9 +52,9 @@ static inline SkColor advance_color(SkColor old, ColorType ct, int step) {
case kChangingTransparent_ColorType:
return (0x00FFFFFF & (old + 0x00010307)) | 0x80000000;
case kAlternatingOpaqueAndTransparent_ColorType:
- SkFAIL("Can't get here");
+ SK_ABORT("Can't get here");
}
- SkFAIL("Shouldn't reach here.");
+ SK_ABORT("Shouldn't reach here.");
return 0;
}
diff --git a/bench/SKPAnimationBench.h b/bench/SKPAnimationBench.h
index 7701595691..b7a4ae1378 100644
--- a/bench/SKPAnimationBench.h
+++ b/bench/SKPAnimationBench.h
@@ -35,7 +35,7 @@ protected:
void onPerCanvasPreDraw(SkCanvas* canvas) override;
void drawMPDPicture() override {
- SkFAIL("MPD not supported\n");
+ SK_ABORT("MPD not supported\n");
}
void drawPicture() override;
diff --git a/gm/aaxfermodes.cpp b/gm/aaxfermodes.cpp
index eab68b4e81..1420e3d579 100644
--- a/gm/aaxfermodes.cpp
+++ b/gm/aaxfermodes.cpp
@@ -259,7 +259,7 @@ protected:
break;
default:
- SkFAIL("Invalid shape.");
+ SK_ABORT("Invalid shape.");
}
}
diff --git a/gm/all_bitmap_configs.cpp b/gm/all_bitmap_configs.cpp
index 32fb86c9cd..699a55bfd2 100644
--- a/gm/all_bitmap_configs.cpp
+++ b/gm/all_bitmap_configs.cpp
@@ -195,7 +195,7 @@ static uint32_t make_pixel(int x, int y, SkAlphaType alphaType) {
component = 0xFF;
break;
default:
- SkFAIL("Should not get here - invalid alpha type");
+ SK_ABORT("Should not get here - invalid alpha type");
return 0xFF000000;
}
return alpha << 24 | component;
diff --git a/gm/glyph_pos_align.cpp b/gm/glyph_pos_align.cpp
index e0bf83e4f2..50bcf82742 100644
--- a/gm/glyph_pos_align.cpp
+++ b/gm/glyph_pos_align.cpp
@@ -51,7 +51,7 @@ void drawTestCase(SkCanvas* canvas, const char* text, SkScalar y, const SkPaint&
case SkPaint::kRight_Align: originX = 1; break;
case SkPaint::kCenter_Align: originX = 0.5f; break;
case SkPaint::kLeft_Align: originX = 0; break;
- default: SkFAIL("Invalid paint origin"); return;
+ default: SK_ABORT("Invalid paint origin"); return;
}
float x = kTextHeight;
diff --git a/gm/occludedrrectblur.cpp b/gm/occludedrrectblur.cpp
index f488f22028..b43f451490 100644
--- a/gm/occludedrrectblur.cpp
+++ b/gm/occludedrrectblur.cpp
@@ -90,7 +90,7 @@ static void draw_45(SkCanvas* canvas, SkRRect::Corner corner,
dir.set(-SK_ScalarRoot2Over2, SK_ScalarRoot2Over2);
break;
default:
- SkFAIL("Invalid shape.");
+ SK_ABORT("Invalid shape.");
}
SkRect r = SkRect::MakeWH(kSize, kSize);
@@ -196,7 +196,7 @@ static void draw_30_60(SkCanvas* canvas, SkRRect::Corner corner, const SkVector&
right = SkRRect::kUpperLeft_Corner;
break;
default:
- SkFAIL("Invalid shape.");
+ SK_ABORT("Invalid shape.");
}
SkIRect r;
diff --git a/include/core/SkTextBlob.h b/include/core/SkTextBlob.h
index 05b3c5fd68..f3cde25482 100644
--- a/include/core/SkTextBlob.h
+++ b/include/core/SkTextBlob.h
@@ -87,7 +87,7 @@ private:
// be freed with sk_free.
void operator delete(void* p) { sk_free(p); }
void* operator new(size_t) {
- SkFAIL("All blobs are created by placement new.");
+ SK_ABORT("All blobs are created by placement new.");
return sk_malloc_throw(0);
}
void* operator new(size_t, void* p) { return p; }
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index 9b683aa7ad..7401fa49ee 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -365,7 +365,7 @@ static inline bool GrPixelConfigIs8888Unorm(GrPixelConfig config) {
case kRGBA_half_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return false;
}
@@ -390,7 +390,7 @@ static inline bool GrPixelConfigIsSRGB(GrPixelConfig config) {
case kRGBA_half_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return false;
}
@@ -418,7 +418,7 @@ static inline GrPixelConfig GrPixelConfigSwapRAndB(GrPixelConfig config) {
case kRGBA_half_GrPixelConfig:
return kUnknown_GrPixelConfig;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return kUnknown_GrPixelConfig;
}
@@ -446,7 +446,7 @@ static inline size_t GrBytesPerPixel(GrPixelConfig config) {
case kUnknown_GrPixelConfig:
return 0;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return 0;
}
@@ -469,7 +469,7 @@ static inline bool GrPixelConfigIsOpaque(GrPixelConfig config) {
case kUnknown_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return false;
}
@@ -492,7 +492,7 @@ static inline bool GrPixelConfigIsAlphaOnly(GrPixelConfig config) {
case kRGBA_half_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config.");
+ SK_ABORT("Invalid pixel config.");
return false;
}
@@ -515,7 +515,7 @@ static inline bool GrPixelConfigIsFloatingPoint(GrPixelConfig config) {
case kRGBA_8888_sint_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return false;
}
@@ -542,7 +542,7 @@ static inline bool GrPixelConfigIsUnorm(GrPixelConfig config) {
case kRGBA_half_GrPixelConfig:
return false;
}
- SkFAIL("Invalid pixel config.");
+ SK_ABORT("Invalid pixel config.");
return false;
}
diff --git a/include/private/GrGLSL.h b/include/private/GrGLSL.h
index 9a32508766..087b869044 100644
--- a/include/private/GrGLSL.h
+++ b/include/private/GrGLSL.h
@@ -77,7 +77,7 @@ static inline const char* GrGLSLPrecisionString(GrSLPrecision p) {
case kDefault_GrSLPrecision:
return "";
default:
- SkFAIL("Unexpected precision type.");
+ SK_ABORT("Unexpected precision type.");
return "";
}
}
@@ -134,7 +134,7 @@ static inline const char* GrGLSLTypeString(GrSLType t) {
case kIImageStorage2D_GrSLType:
return "iimage2D";
}
- SkFAIL("Unknown shader var type.");
+ SK_ABORT("Unknown shader var type.");
return ""; // suppress warning
}
diff --git a/include/private/GrSwizzle.h b/include/private/GrSwizzle.h
index 391740be72..db645dbe49 100644
--- a/include/private/GrSwizzle.h
+++ b/include/private/GrSwizzle.h
@@ -126,7 +126,7 @@ public:
case 3:
return AAAA();
default:
- SkFAIL("Mod is broken?!?");
+ SK_ABORT("Mod is broken?!?");
return RGBA();
}
}
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index 2bed765de7..d2df9b26a8 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -49,7 +49,7 @@ static inline bool GrAATypeIsHW(GrAAType type) {
case GrAAType::kMixedSamples:
return true;
}
- SkFAIL("Unknown AA Type");
+ SK_ABORT("Unknown AA Type");
return false;
}
@@ -170,7 +170,7 @@ static inline bool GrSLTypeIsFloatType(GrSLType type) {
case kIImageStorage2D_GrSLType:
return false;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return false;
}
@@ -203,7 +203,7 @@ static inline bool GrSLTypeIs2DCombinedSamplerType(GrSLType type) {
case kIImageStorage2D_GrSLType:
return false;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return false;
}
@@ -236,7 +236,7 @@ static inline bool GrSLTypeIsCombinedSamplerType(GrSLType type) {
case kIImageStorage2D_GrSLType:
return false;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return false;
}
@@ -269,7 +269,7 @@ static inline bool GrSLTypeIsImageStorage(GrSLType type) {
case kBufferSampler_GrSLType:
return false;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return false;
}
@@ -302,7 +302,7 @@ static inline bool GrSLTypeAcceptsPrecision(GrSLType type) {
case kBool_GrSLType:
return false;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return false;
}
@@ -363,7 +363,7 @@ static inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return sizeof(uint32_t);
}
- SkFAIL("Unexpected attribute type");
+ SK_ABORT("Unexpected attribute type");
return 0;
}
@@ -397,7 +397,7 @@ static inline bool GrVertexAttribTypeIsIntType(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return true;
}
- SkFAIL("Unexpected attribute type");
+ SK_ABORT("Unexpected attribute type");
return false;
}
@@ -428,7 +428,7 @@ static inline GrSLType GrVertexAttribTypeToSLType(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return kUint_GrSLType;
}
- SkFAIL("Unsupported type conversion");
+ SK_ABORT("Unsupported type conversion");
return kVoid_GrSLType;
}
@@ -511,7 +511,7 @@ static inline GrPrimitiveEdgeType GrInvertProcessorEdgeType(const GrPrimitiveEdg
case kInverseFillAA_GrProcessorEdgeType:
return kFillAA_GrProcessorEdgeType;
case kHairlineAA_GrProcessorEdgeType:
- SkFAIL("Hairline fill isn't invertible.");
+ SK_ABORT("Hairline fill isn't invertible.");
}
return kFillAA_GrProcessorEdgeType; // suppress warning.
}
diff --git a/samplecode/SamplePathText.cpp b/samplecode/SamplePathText.cpp
index 22a1cd5d2c..5df223b32d 100644
--- a/samplecode/SamplePathText.cpp
+++ b/samplecode/SamplePathText.cpp
@@ -287,7 +287,7 @@ public:
case SkPath::kCubic_Verb:
case SkPath::kConic_Verb:
case SkPath::kDone_Verb:
- SkFAIL("Unexpected path verb");
+ SK_ABORT("Unexpected path verb");
break;
}
}
diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp
index ce0b14bb27..c0f10535f6 100644
--- a/src/core/SkBlitter_ARGB32.cpp
+++ b/src/core/SkBlitter_ARGB32.cpp
@@ -182,7 +182,7 @@ void SkARGB32_Blitter::blitMask(const SkMask& mask, const SkIRect& clip) {
SkARGB32_Blit32(fDevice, mask, clip, fPMColor);
break;
default:
- SkFAIL("Mask format not handled.");
+ SK_ABORT("Mask format not handled.");
}
}
@@ -202,7 +202,7 @@ void SkARGB32_Opaque_Blitter::blitMask(const SkMask& mask,
SkARGB32_Blit32(fDevice, mask, clip, fPMColor);
break;
default:
- SkFAIL("Mask format not handled.");
+ SK_ABORT("Mask format not handled.");
}
}
diff --git a/src/core/SkBlurImageFilter.cpp b/src/core/SkBlurImageFilter.cpp
index a349b961f6..70489737ab 100644
--- a/src/core/SkBlurImageFilter.cpp
+++ b/src/core/SkBlurImageFilter.cpp
@@ -128,7 +128,7 @@ static GrTextureDomain::Mode to_texture_domain_mode(SkBlurImageFilter::TileMode
case SkBlurImageFilter::TileMode::kRepeat_TileMode:
return GrTextureDomain::kRepeat_Mode;
default:
- SkFAIL("Unsupported tile mode.");
+ SK_ABORT("Unsupported tile mode.");
return GrTextureDomain::kDecal_Mode;
}
}
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index bf71fdebd6..b69c441913 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -169,7 +169,7 @@ void SkBaseDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
SkPoint::Make(x, y), runPaint);
break;
default:
- SkFAIL("unhandled positioning mode");
+ SK_ABORT("unhandled positioning mode");
}
if (drawFilter) {
diff --git a/src/core/SkFindAndPlaceGlyph.h b/src/core/SkFindAndPlaceGlyph.h
index 5d7c46bf27..a11c4ecc7d 100644
--- a/src/core/SkFindAndPlaceGlyph.h
+++ b/src/core/SkFindAndPlaceGlyph.h
@@ -150,7 +150,7 @@ private:
case SkPaint::kGlyphID_TextEncoding:
return arena->make<GlyphIdGlyphFinder>(cache);
}
- SkFAIL("Should not get here.");
+ SK_ABORT("Should not get here.");
return nullptr;
}
@@ -262,7 +262,7 @@ private:
SkFloatToScalar(glyph.fAdvanceY)};
}
// Even though the entire enum is covered above, MVSC doesn't think so. Make it happy.
- SkFAIL("Should never get here.");
+ SK_ABORT("Should never get here.");
return {0.0f, 0.0f};
}
@@ -281,7 +281,7 @@ private:
case kNone_SkAxisAlignment:
return {kSubpixelRounding, kSubpixelRounding};
}
- SkFAIL("Should not get here.");
+ SK_ABORT("Should not get here.");
return {0.0f, 0.0f};
}
@@ -300,7 +300,7 @@ private:
return {SkScalarToFixed(SkScalarFraction(position.fX) + kSubpixelRounding),
SkScalarToFixed(SkScalarFraction(position.fY) + kSubpixelRounding)};
}
- SkFAIL("Should not get here.");
+ SK_ABORT("Should not get here.");
return {0, 0};
}
@@ -325,7 +325,7 @@ private:
// See GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60277
virtual SkPoint findAndPositionGlyph(
const char** text, SkPoint position, ProcessOneGlyph&& processOneGlyph) {
- SkFAIL("Should never get here.");
+ SK_ABORT("Should never get here.");
return {0.0f, 0.0f};
}
};
@@ -435,7 +435,7 @@ private:
return arena->make<GlyphFindAndPlaceSubpixel<
ProcessOneGlyph, kTextAlignment, kY_SkAxisAlignment>>(glyphFinder);
}
- SkFAIL("Should never get here.");
+ SK_ABORT("Should never get here.");
return nullptr;
}
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index 09783051ee..1cc92a41b4 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2437,7 +2437,7 @@ private:
fLastVec = vec;
break;
case kInvalid_DirChange:
- SkFAIL("Use of invalid direction change flag");
+ SK_ABORT("Use of invalid direction change flag");
break;
}
}
diff --git a/src/core/SkRasterClip.cpp b/src/core/SkRasterClip.cpp
index a08119a34d..b2b0bdcd0b 100644
--- a/src/core/SkRasterClip.cpp
+++ b/src/core/SkRasterClip.cpp
@@ -56,7 +56,7 @@ static MutateResult mutate_conservative_op(SkRegion::Op* op, bool inverseFilled)
return kContinue_MutateResult;
}
}
- SkFAIL("should not get here");
+ SK_ABORT("should not get here");
return kDoNothing_MutateResult;
}
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp
index 1a74ce1a35..e5478eaf69 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -226,7 +226,7 @@ MaskAdditiveBlitter::MaskAdditiveBlitter(
}
void MaskAdditiveBlitter::blitAntiH(int x, int y, const SkAlpha antialias[], int len) {
- SkFAIL("Don't use this; directly add alphas to the mask.");
+ SK_ABORT("Don't use this; directly add alphas to the mask.");
}
void MaskAdditiveBlitter::blitAntiH(int x, int y, const SkAlpha alpha) {
diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp
index 355bafeb84..77ec429325 100644
--- a/src/core/SkTextBlob.cpp
+++ b/src/core/SkTextBlob.cpp
@@ -489,7 +489,7 @@ SkRect SkTextBlobBuilder::ConservativeRunBounds(const SkTextBlob::RunRecord& run
bounds.setBounds(glyphPosPts, run.glyphCount());
} break;
default:
- SkFAIL("unsupported positioning mode");
+ SK_ABORT("unsupported positioning mode");
}
// Expand by typeface glyph bounds.
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index fa02104627..1b8849a982 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -1790,7 +1790,7 @@ static SkImageFilterLight* create_random_light(SkRandom* random) {
random->nextUScalar1(), random->nextUScalar1(), random->nextU());
}
default:
- SkFAIL("Unexpected value.");
+ SK_ABORT("Unexpected value.");
return nullptr;
}
}
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 1585c9d352..5f59637e51 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -234,7 +234,7 @@ void GrGLMorphologyEffect::emitCode(EmitArgs& args) {
func = "max";
break;
default:
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
func = ""; // suppress warning
break;
}
@@ -248,7 +248,7 @@ void GrGLMorphologyEffect::emitCode(EmitArgs& args) {
dir = "y";
break;
default:
- SkFAIL("Unknown filter direction.");
+ SK_ABORT("Unknown filter direction.");
dir = ""; // suppress warning
}
@@ -306,7 +306,7 @@ void GrGLMorphologyEffect::onSetData(const GrGLSLProgramDataManager& pdman,
pixelSize = 1.0f / texture.height();
break;
default:
- SkFAIL("Unknown filter direction.");
+ SK_ABORT("Unknown filter direction.");
}
pdman.set1f(fPixelSizeUni, pixelSize);
diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp
index f3ba9d1c25..c04c2b851d 100644
--- a/src/fonts/SkFontMgr_indirect.cpp
+++ b/src/fonts/SkFontMgr_indirect.cpp
@@ -64,11 +64,11 @@ int SkFontMgr_Indirect::onCountFamilies() const {
}
void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const {
- SkFAIL("Not implemented");
+ SK_ABORT("Not implemented");
}
SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
- SkFAIL("Not implemented");
+ SK_ABORT("Not implemented");
return nullptr;
}
diff --git a/src/gpu/GrBlend.cpp b/src/gpu/GrBlend.cpp
index 72a89d838d..1bb4dd3c9c 100644
--- a/src/gpu/GrBlend.cpp
+++ b/src/gpu/GrBlend.cpp
@@ -102,7 +102,7 @@ static MaskedColor get_term(GrBlendCoeff coeff, const MaskedColor& src, const Ma
case kISA_GrBlendCoeff:
return MaskedColor::Mul(MaskedColor::ExtractInverseAlpha(src), value);
default:
- SkFAIL("Illegal coefficient");
+ SK_ABORT("Illegal coefficient");
return MaskedColor();
}
}
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index a41845227d..3d1987a22a 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -27,7 +27,7 @@ static const char* pixel_config_name(GrPixelConfig config) {
case kAlpha_half_GrPixelConfig: return "AlphaHalf";
case kRGBA_half_GrPixelConfig: return "RGBAHalf";
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return "<invalid>";
}
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index 29a302b100..8bf30d5979 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -319,7 +319,7 @@ protected:
private:
virtual GrColor4f constantOutputForConstantInput(GrColor4f /* inputColor */) const {
- SkFAIL("Subclass must override this if advertising this optimization.");
+ SK_ABORT("Subclass must override this if advertising this optimization.");
return GrColor4f::TransparentBlack();
}
diff --git a/src/gpu/GrPathRange.cpp b/src/gpu/GrPathRange.cpp
index 6cf9de281c..8ed4fd62a7 100644
--- a/src/gpu/GrPathRange.cpp
+++ b/src/gpu/GrPathRange.cpp
@@ -33,7 +33,7 @@ void GrPathRange::loadPathsIfNeeded(const void* indices, PathIndexType indexType
case kU32_PathIndexType:
return this->loadPathsIfNeeded(reinterpret_cast<const uint32_t*>(indices), count);
default:
- SkFAIL("Unknown path index type");
+ SK_ABORT("Unknown path index type");
}
}
@@ -48,7 +48,7 @@ void GrPathRange::assertPathsLoaded(const void* indices, PathIndexType indexType
case kU32_PathIndexType:
return this->assertPathsLoaded(reinterpret_cast<const uint32_t*>(indices), count);
default:
- SkFAIL("Unknown path index type");
+ SK_ABORT("Unknown path index type");
}
}
diff --git a/src/gpu/GrPathRendering.cpp b/src/gpu/GrPathRendering.cpp
index a40f0af369..0e947d5570 100644
--- a/src/gpu/GrPathRendering.cpp
+++ b/src/gpu/GrPathRendering.cpp
@@ -16,7 +16,7 @@
const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fill) {
switch (fill) {
default:
- SkFAIL("Unexpected path fill.");
+ SK_ABORT("Unexpected path fill.");
case GrPathRendering::kWinding_FillType: {
constexpr static GrUserStencilSettings kWindingStencilPass(
GrUserStencilSettings::StaticInit<
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index ac203eddeb..bc122de2c4 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -60,7 +60,7 @@ public:
return 6;
default:
- SkFAIL("Unknown path transform type");
+ SK_ABORT("Unknown path transform type");
return 0;
}
}
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 52aae6854c..a7dd63c5e1 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -64,7 +64,7 @@ void GrFragmentProcessorTestFactory::VerifyFactoryCount() {
if (kFPFactoryCount != GetFactories()->count()) {
SkDebugf("\nExpected %d fragment processor factories, found %d.\n",
kFPFactoryCount, GetFactories()->count());
- SkFAIL("Wrong number of fragment processor factories!");
+ SK_ABORT("Wrong number of fragment processor factories!");
}
}
@@ -73,7 +73,7 @@ void GrGeometryProcessorTestFactory::VerifyFactoryCount() {
if (kGPFactoryCount != GetFactories()->count()) {
SkDebugf("\nExpected %d geometry processor factories, found %d.\n",
kGPFactoryCount, GetFactories()->count());
- SkFAIL("Wrong number of geometry processor factories!");
+ SK_ABORT("Wrong number of geometry processor factories!");
}
}
@@ -81,7 +81,7 @@ void GrXPFactoryTestFactory::VerifyFactoryCount() {
if (kXPFactoryCount != GetFactories()->count()) {
SkDebugf("\nExpected %d xp factory factories, found %d.\n",
kXPFactoryCount, GetFactories()->count());
- SkFAIL("Wrong number of xp factory factories!");
+ SK_ABORT("Wrong number of xp factory factories!");
}
}
@@ -280,7 +280,7 @@ GrResourceIOProcessor::ImageStorageAccess::ImageStorageAccess(sk_sp<GrTexturePro
fFormat = GrImageStorageFormat::kRGBA32f;
break;
default:
- SkFAIL("Config is not (yet) supported as image storage.");
+ SK_ABORT("Config is not (yet) supported as image storage.");
break;
}
}
diff --git a/src/gpu/GrProcessor.h b/src/gpu/GrProcessor.h
index e4bf5919ff..721f7c230a 100644
--- a/src/gpu/GrProcessor.h
+++ b/src/gpu/GrProcessor.h
@@ -133,7 +133,7 @@ private:
// 1 to the returned value.
uint32_t id = static_cast<uint32_t>(sk_atomic_inc(&gCurrProcessorClassID)) + 1;
if (!id) {
- SkFAIL("This should never wrap as it should only be called once for each GrProcessor "
+ SK_ABORT("This should never wrap as it should only be called once for each GrProcessor "
"subclass.");
}
return id;
diff --git a/src/gpu/GrProcessorUnitTest.cpp b/src/gpu/GrProcessorUnitTest.cpp
index 473903d8d8..7e8d7132e8 100644
--- a/src/gpu/GrProcessorUnitTest.cpp
+++ b/src/gpu/GrProcessorUnitTest.cpp
@@ -19,7 +19,7 @@ std::unique_ptr<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcesso
} while (fp->numChildProcessors() != 0);
return fp;
#else
- SkFAIL("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
+ SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
return nullptr;
#endif
}
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 03b120c2c1..39515adc0a 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -78,7 +78,7 @@ GrAAType GrChooseAAType(GrAA aa, GrFSAAType fsaaType, GrAllowMixedSamples allowM
return GrAllowMixedSamples::kYes == allowMixedSamples ? GrAAType::kMixedSamples
: GrAAType::kCoverage;
}
- SkFAIL("Unexpected fsaa type");
+ SK_ABORT("Unexpected fsaa type");
return GrAAType::kNone;
}
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 5c4cd570ea..b781e42be1 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -27,7 +27,7 @@ GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() {
int32_t type = sk_atomic_inc(&gType);
if (type > SK_MaxU16) {
- SkFAIL("Too many Resource Types");
+ SK_ABORT("Too many Resource Types");
}
return static_cast<ResourceType>(type);
@@ -38,7 +38,7 @@ GrUniqueKey::Domain GrUniqueKey::GenerateDomain() {
int32_t domain = sk_atomic_inc(&gDomain);
if (domain > SK_MaxU16) {
- SkFAIL("Too many GrUniqueKey Domains");
+ SK_ABORT("Too many GrUniqueKey Domains");
}
return static_cast<Domain>(domain);
diff --git a/src/gpu/GrShaderCaps.cpp b/src/gpu/GrShaderCaps.cpp
index f73d218929..06fe03a5aa 100644
--- a/src/gpu/GrShaderCaps.cpp
+++ b/src/gpu/GrShaderCaps.cpp
@@ -34,7 +34,7 @@ static const char* precision_to_string(GrSLPrecision p) {
case kHigh_GrSLPrecision:
return "high";
default:
- SkFAIL("Unexpected precision type.");
+ SK_ABORT("Unexpected precision type.");
return "";
}
}
diff --git a/src/gpu/GrShaderVar.cpp b/src/gpu/GrShaderVar.cpp
index e938c36d01..e6d774c329 100644
--- a/src/gpu/GrShaderVar.cpp
+++ b/src/gpu/GrShaderVar.cpp
@@ -17,7 +17,7 @@ static const char* type_modifier_string(GrShaderVar::TypeModifier t) {
case GrShaderVar::kOut_TypeModifier: return "out";
case GrShaderVar::kUniform_TypeModifier: return "uniform";
}
- SkFAIL("Unknown shader variable type modifier.");
+ SK_ABORT("Unknown shader variable type modifier.");
return "";
}
@@ -52,7 +52,7 @@ void GrShaderVar::setMemoryModel(GrSLMemoryModel model) {
this->addModifier("volatile");
return;
}
- SkFAIL("Unknown memory model.");
+ SK_ABORT("Unknown memory model.");
}
void GrShaderVar::setRestrict(GrSLRestrict restrict) {
@@ -63,7 +63,7 @@ void GrShaderVar::setRestrict(GrSLRestrict restrict) {
this->addModifier("restrict");
return;
}
- SkFAIL("Unknown restrict.");
+ SK_ABORT("Unknown restrict.");
}
void GrShaderVar::setIOType(GrIOType ioType) {
@@ -77,7 +77,7 @@ void GrShaderVar::setIOType(GrIOType ioType) {
this->addModifier("writeonly");
return;
}
- SkFAIL("Unknown io type.");
+ SK_ABORT("Unknown io type.");
}
void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const {
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index 7e0a3a4449..eb07ffc558 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -59,7 +59,7 @@ SkRect GrShape::bounds() const {
case Type::kPath:
return this->path().getBounds();
}
- SkFAIL("Unknown shape type");
+ SK_ABORT("Unknown shape type");
return kInverted;
}
@@ -143,7 +143,7 @@ int GrShape::unstyledKeySize() const {
return 2;
}
}
- SkFAIL("Should never get here.");
+ SK_ABORT("Should never get here.");
return 0;
}
diff --git a/src/gpu/SkGr.h b/src/gpu/SkGr.h
index 126dc4c66c..d228894bc5 100644
--- a/src/gpu/SkGr.h
+++ b/src/gpu/SkGr.h
@@ -172,7 +172,7 @@ static inline GrPrimitiveType SkVertexModeToGrPrimitiveType(SkVertices::VertexMo
case SkVertices::kTriangleFan_VertexMode:
return GrPrimitiveType::kTriangleFan;
}
- SkFAIL("Invalid mode");
+ SK_ABORT("Invalid mode");
return GrPrimitiveType::kPoints;
}
diff --git a/src/gpu/ccpr/GrCCPRCoverageOpsBuilder.cpp b/src/gpu/ccpr/GrCCPRCoverageOpsBuilder.cpp
index 4c61570760..19b4049516 100644
--- a/src/gpu/ccpr/GrCCPRCoverageOpsBuilder.cpp
+++ b/src/gpu/ccpr/GrCCPRCoverageOpsBuilder.cpp
@@ -88,7 +88,7 @@ static int num_pts(uint8_t verb) {
case SkPath::kClose_Verb:
case SkPath::kDone_Verb:
default:
- SkFAIL("Path verb does not have an endpoint.");
+ SK_ABORT("Path verb does not have an endpoint.");
return 0;
case SkPath::kMove_Verb:
case SkPath::kLine_Verb:
@@ -203,9 +203,9 @@ void MaxBufferItems::countPathItems(GrCCPRCoverageOpsBuilder::ScissorMode scisso
continue;
case SkPath::kConic_Verb:
SkASSERT(currFanPts > 0);
- SkFAIL("Conics are not supported.");
+ SK_ABORT("Conics are not supported.");
default:
- SkFAIL("Unexpected path verb.");
+ SK_ABORT("Unexpected path verb.");
}
}
@@ -254,9 +254,9 @@ void GrCCPRCoverageOpsBuilder::parsePath(ScissorMode scissorMode, const SkMatrix
m.transform(pts[ptsIdx + 2]));
break;
case SkPath::kConic_Verb:
- SkFAIL("Conics are not supported.");
+ SK_ABORT("Conics are not supported.");
default:
- SkFAIL("Unexpected path verb.");
+ SK_ABORT("Unexpected path verb.");
}
ptsIdx += num_pts(verb);
diff --git a/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp b/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
index 05a3242f43..e4e59ffa40 100644
--- a/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
+++ b/src/gpu/ccpr/GrCCPRCoverageProcessor.cpp
@@ -39,7 +39,7 @@ const char* GrCCPRCoverageProcessor::GetProcessorName(Mode mode) {
case Mode::kLoopBorders:
return "GrCCPRCubicBorderProcessor (loop)";
}
- SkFAIL("Unexpected ccpr coverage processor mode.");
+ SK_ABORT("Unexpected ccpr coverage processor mode.");
return nullptr;
}
@@ -85,7 +85,7 @@ GrGLSLPrimitiveProcessor* GrCCPRCoverageProcessor::createGLSLInstance(const GrSh
case Mode::kLoopBorders:
return new GrCCPRCubicBorderProcessor(GrCCPRCubicProcessor::Type::kLoop);
}
- SkFAIL("Unexpected ccpr coverage processor mode.");
+ SK_ABORT("Unexpected ccpr coverage processor mode.");
return nullptr;
}
diff --git a/src/gpu/ccpr/GrCCPRCoverageProcessor.h b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
index c9198d3508..198956a00a 100644
--- a/src/gpu/ccpr/GrCCPRCoverageProcessor.h
+++ b/src/gpu/ccpr/GrCCPRCoverageProcessor.h
@@ -182,7 +182,7 @@ protected:
// TODO: subclasses might have good spots to stuff the winding information without burning a
// whole new varying slot. Consider requiring them to generate the correct coverage sign.
virtual void emitShaderCoverage(GrGLSLFragmentBuilder*, const char* outputCoverage) const {
- SkFAIL("Shader coverage not implemented when using CoverageType::kShader.");
+ SK_ABORT("Shader coverage not implemented when using CoverageType::kShader.");
}
// Emits one wedge of the conservative raster hull of a convex polygon. The complete hull has
diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
index 706353a08f..aa9a509887 100644
--- a/src/gpu/effects/GrBezierEffect.cpp
+++ b/src/gpu/effects/GrBezierEffect.cpp
@@ -196,7 +196,7 @@ void GrGLConicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
default:
- SkFAIL("Shouldn't get here");
+ SK_ABORT("Shouldn't get here");
}
// TODO should we really be doing this?
@@ -401,7 +401,7 @@ void GrGLQuadEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
default:
- SkFAIL("Shouldn't get here");
+ SK_ABORT("Shouldn't get here");
}
if (0xff != gp.coverageScale()) {
@@ -642,7 +642,7 @@ void GrGLCubicEffect::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) {
break;
}
default:
- SkFAIL("Shouldn't get here");
+ SK_ABORT("Shouldn't get here");
}
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index e784ed78fc..2cf7919543 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -44,7 +44,7 @@ public:
break;
default:
- SkFAIL("Unknown conversion op.");
+ SK_ABORT("Unknown conversion op.");
break;
}
fragBuilder->codeAppendf("%s = color;", args.fOutputColor);
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp
index 08592244ca..a8b328e9b9 100644
--- a/src/gpu/effects/GrConstColorProcessor.cpp
+++ b/src/gpu/effects/GrConstColorProcessor.cpp
@@ -75,7 +75,7 @@ GrColor4f GrConstColorProcessor::constantOutputForConstantInput(GrColor4f input)
case kModulateRGBA_InputMode:
return fColor.modulate(input);
}
- SkFAIL("Unexpected mode");
+ SK_ABORT("Unexpected mode");
return GrColor4f::TransparentBlack();
}
diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp
index 344762dd19..267f43d5e7 100644
--- a/src/gpu/effects/GrCoverageSetOpXP.cpp
+++ b/src/gpu/effects/GrCoverageSetOpXP.cpp
@@ -203,7 +203,7 @@ const GrXPFactory* GrCoverageSetOpXPFactory::Get(SkRegion::Op regionOp, bool inv
}
}
#undef _CONSTEXPR_
- SkFAIL("Unknown region op.");
+ SK_ABORT("Unknown region op.");
return nullptr;
}
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index b54ca53f4e..23b617849c 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -102,7 +102,7 @@ void GrGLConvolutionEffect::emitCode(EmitArgs& args) {
break;
}
default: {
- SkFAIL("Unsupported operation.");
+ SK_ABORT("Unsupported operation.");
}
}
}
@@ -134,7 +134,7 @@ void GrGLConvolutionEffect::onSetData(const GrGLSLProgramDataManager& pdman,
imageIncrement[1] = ySign / texture.height();
break;
default:
- SkFAIL("Unknown filter direction.");
+ SK_ABORT("Unknown filter direction.");
}
pdman.set2fv(fImageIncrementUni, 1, imageIncrement);
if (conv.useBounds()) {
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index c571b837fd..658f190621 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -459,7 +459,7 @@ static void append_color_output(const PorterDuffXferProcessor& xp,
fragBuilder->codeAppendf("%s = (float4(1.0) - %s) * %s;", output, inColor, inCoverage);
break;
default:
- SkFAIL("Unsupported output type.");
+ SK_ABORT("Unsupported output type.");
break;
}
}
@@ -753,7 +753,7 @@ const GrXPFactory* GrPorterDuffXPFactory::Get(SkBlendMode blendMode) {
case SkBlendMode::kScreen:
return &gScreenPDXPF;
default:
- SkFAIL("Unexpected blend mode.");
+ SK_ABORT("Unexpected blend mode.");
return nullptr;
}
}
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index f253dfef86..6d47e58292 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -367,7 +367,7 @@ void GLCircularRRectEffect::onSetData(const GrGLSLProgramDataManager& pdman,
rect.fBottom -= radius;
break;
default:
- SkFAIL("Should have been one of the above cases.");
+ SK_ABORT("Should have been one of the above cases.");
}
pdman.set4f(fInnerRectUniform, rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
radius += 0.5f;
@@ -583,7 +583,7 @@ void GLEllipticalRRectEffect::emitCode(EmitArgs& args) {
break;
}
default:
- SkFAIL("RRect should always be simple or nine-patch.");
+ SK_ABORT("RRect should always be simple or nine-patch.");
}
// implicit is the evaluation of (x/a)^2 + (y/b)^2 - 1.
fragBuilder->codeAppend("float implicit = dot(Z, dxy) - 1.0;");
@@ -664,7 +664,7 @@ void GLEllipticalRRectEffect::onSetData(const GrGLSLProgramDataManager& pdman,
break;
}
default:
- SkFAIL("RRect should always be simple or nine-patch.");
+ SK_ABORT("RRect should always be simple or nine-patch.");
}
pdman.set4f(fInnerRectUniform, rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
fPrevRRect = rrect;
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index f2c026fdfc..3b9b44cd57 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -73,7 +73,7 @@ private:
case SkBlendMode::kClear:
case SkBlendMode::kSrc:
case SkBlendMode::kDst:
- SkFAIL("Should never create clear, src, or dst compose two FP.");
+ SK_ABORT("Should never create clear, src, or dst compose two FP.");
flags = kNone_OptimizationFlags;
break;
@@ -303,7 +303,7 @@ private:
OptimizationFlags flags;
switch (mode) {
case SkBlendMode::kClear:
- SkFAIL("Should never create clear compose one FP.");
+ SK_ABORT("Should never create clear compose one FP.");
flags = kNone_OptimizationFlags;
break;
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 6e7a94972a..3434852f0a 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1368,7 +1368,7 @@ static GrGLenum precision_to_gl_float_type(GrSLPrecision p) {
case kHigh_GrSLPrecision:
return GR_GL_HIGH_FLOAT;
default:
- SkFAIL("Unexpected precision type.");
+ SK_ABORT("Unexpected precision type.");
return -1;
}
}
@@ -1382,7 +1382,7 @@ static GrGLenum shader_type_to_gl_shader(GrShaderType type) {
case kFragment_GrShaderType:
return GR_GL_FRAGMENT_SHADER;
}
- SkFAIL("Unknown shader type.");
+ SK_ABORT("Unknown shader type.");
return -1;
}
diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp
index 7611f597c1..e130247862 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -527,7 +527,7 @@ public:
break;
}
default:
- SkFAIL("Unexpected pname to GetIntegerv");
+ SK_ABORT("Unexpected pname to GetIntegerv");
}
}
@@ -553,7 +553,7 @@ public:
*params = 32;
break;
default:
- SkFAIL("Unexpected pname passed GetQueryiv.");
+ SK_ABORT("Unexpected pname passed GetQueryiv.");
}
}
@@ -595,7 +595,7 @@ public:
case GR_GL_RENDERER:
return (const GrGLubyte*)"The Null (Non-)Renderer";
default:
- SkFAIL("Unexpected name passed to GetString");
+ SK_ABORT("Unexpected name passed to GetString");
return nullptr;
}
}
@@ -612,7 +612,7 @@ public:
}
}
default:
- SkFAIL("Unexpected name passed to GetStringi");
+ SK_ABORT("Unexpected name passed to GetStringi");
return nullptr;
}
}
@@ -673,7 +673,7 @@ public:
}
break; }
default:
- SkFAIL("Unexpected pname to GetBufferParamateriv");
+ SK_ABORT("Unexpected pname to GetBufferParamateriv");
break;
}
}
@@ -687,7 +687,7 @@ public:
private:
inline int static GetBufferIndex(GrGLenum glTarget) {
switch (glTarget) {
- default: SkFAIL("Unexpected GL target to GetBufferIndex");
+ default: SK_ABORT("Unexpected GL target to GetBufferIndex");
case GR_GL_ARRAY_BUFFER: return 0;
case GR_GL_ELEMENT_ARRAY_BUFFER: return 1;
case GR_GL_TEXTURE_BUFFER: return 2;
@@ -794,7 +794,7 @@ private:
break;
// we don't expect any other pnames
default:
- SkFAIL("Unexpected pname to GetProgramiv");
+ SK_ABORT("Unexpected pname to GetProgramiv");
break;
}
}
@@ -809,7 +809,7 @@ private:
*params = 0;
break;
default:
- SkFAIL("Unexpected pname passed to GetQueryObject.");
+ SK_ABORT("Unexpected pname passed to GetQueryObject.");
break;
}
}
diff --git a/src/gpu/gl/GrGLGLSL.cpp b/src/gpu/gl/GrGLGLSL.cpp
index 7ceb639ee0..ab92358c13 100644
--- a/src/gpu/gl/GrGLGLSL.cpp
+++ b/src/gpu/gl/GrGLGLSL.cpp
@@ -48,7 +48,7 @@ bool GrGLGetGLSLGeneration(const GrGLInterface* gl, GrGLSLGeneration* generation
}
return true;
default:
- SkFAIL("Unknown GL Standard");
+ SK_ABORT("Unknown GL Standard");
return false;
}
}
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 2ce2995021..be5df4eee4 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -819,7 +819,7 @@ static inline GrGLint config_alignment(GrPixelConfig config) {
case kUnknown_GrPixelConfig:
return 0;
}
- SkFAIL("Invalid pixel config");
+ SK_ABORT("Invalid pixel config");
return 0;
}
@@ -1239,7 +1239,7 @@ static bool renderbuffer_storage_msaa(const GrGLContext& ctx,
width, height));
break;
case GrGLCaps::kNone_MSFBOType:
- SkFAIL("Shouldn't be here if we don't support multisampled renderbuffers.");
+ SK_ABORT("Shouldn't be here if we don't support multisampled renderbuffers.");
break;
}
return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));
@@ -2332,7 +2332,7 @@ bool GrGLGpu::onReadPixels(GrSurface* surface,
GL_CALL(BindFramebuffer(GR_GL_READ_FRAMEBUFFER, renderTarget->textureFBOID()));
break;
default:
- SkFAIL("Unknown resolve type");
+ SK_ABORT("Unknown resolve type");
}
glvp = renderTarget->getViewport();
} else {
@@ -2575,7 +2575,7 @@ static GrGLenum gr_primitive_type_to_gl_mode(GrPrimitiveType primitiveType) {
case GrPrimitiveType::kLinesAdjacency:
return GR_GL_LINES_ADJACENCY;
}
- SkFAIL("invalid GrPrimitiveType");
+ SK_ABORT("invalid GrPrimitiveType");
return GR_GL_TRIANGLES;
}
@@ -2908,7 +2908,7 @@ static GrGLenum get_component_enum_from_char(char component) {
case 'a':
return GR_GL_ALPHA;
default:
- SkFAIL("Unsupported component");
+ SK_ABORT("Unsupported component");
return 0;
}
}
@@ -4399,7 +4399,7 @@ int GrGLGpu::TextureToCopyProgramIdx(GrTexture* texture) {
case kTextureExternalSampler_GrSLType:
return 3;
default:
- SkFAIL("Unexpected samper type");
+ SK_ABORT("Unexpected samper type");
return 0;
}
}
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index f7e6bd16de..a989c4f65f 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -196,7 +196,7 @@ inline bool init_path_object_for_general_path(GrGLGpu* gpu, GrGLuint pathID,
static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill) {
switch (fill) {
default:
- SkFAIL("Incomplete Switch\n");
+ SK_ABORT("Incomplete Switch\n");
case SkPath::kWinding_FillType:
case SkPath::kInverseWinding_FillType:
return GrPathRendering::kWinding_FillType;
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 0b3baca566..d907e86559 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -68,7 +68,7 @@ static void verify_floats(const float* floats, int count) {
static GrGLenum gr_stencil_op_to_gl_path_rendering_fill_mode(GrStencilOp op) {
switch (op) {
default:
- SkFAIL("Unexpected path fill.");
+ SK_ABORT("Unexpected path fill.");
/* fallthrough */;
case GrStencilOp::kIncWrap:
return GR_GL_COUNT_UP;
diff --git a/src/gpu/gl/GrGLVertexArray.cpp b/src/gpu/gl/GrGLVertexArray.cpp
index 59f2be9831..745e532645 100644
--- a/src/gpu/gl/GrGLVertexArray.cpp
+++ b/src/gpu/gl/GrGLVertexArray.cpp
@@ -44,7 +44,7 @@ static AttribLayout attrib_layout(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return {false, 1, GR_GL_UNSIGNED_INT};
}
- SkFAIL("Unknown vertex attrib type");
+ SK_ABORT("Unknown vertex attrib type");
return {false, 0, 0};
};
diff --git a/src/gpu/glsl/GrGLSL.cpp b/src/gpu/glsl/GrGLSL.cpp
index 76ffb826a7..b580f0b8a7 100644
--- a/src/gpu/glsl/GrGLSL.cpp
+++ b/src/gpu/glsl/GrGLSL.cpp
@@ -41,7 +41,7 @@ void GrGLSLAppendDefaultFloatPrecisionDeclaration(GrSLPrecision p,
out->append("precision lowp float;\n");
break;
default:
- SkFAIL("Unknown precision value.");
+ SK_ABORT("Unknown precision value.");
}
}
}
diff --git a/src/gpu/glsl/GrGLSLBlend.cpp b/src/gpu/glsl/GrGLSLBlend.cpp
index 5afb984528..34df0df410 100644
--- a/src/gpu/glsl/GrGLSLBlend.cpp
+++ b/src/gpu/glsl/GrGLSLBlend.cpp
@@ -380,7 +380,7 @@ static void emit_advanced_xfermode_code(GrGLSLFragmentBuilder* fsBuilder, const
break;
}
default:
- SkFAIL("Unknown Custom Xfer mode.");
+ SK_ABORT("Unknown Custom Xfer mode.");
break;
}
}
@@ -427,7 +427,7 @@ static bool append_porterduff_term(GrGLSLFragmentBuilder* fsBuilder, SkBlendMode
fsBuilder->codeAppendf(" * (1.0 - %s.a)", dstColorName);
break;
default:
- SkFAIL("Unsupported Blend Coeff");
+ SK_ABORT("Unsupported Blend Coeff");
}
return true;
}
@@ -494,7 +494,7 @@ void GrGLSLBlend::AppendRegionOp(GrGLSLFragmentBuilder* fsBuilder, const char* s
dstCoeff = SkBlendModeCoeff::kZero;
break;
default:
- SkFAIL("Unsupported Op");
+ SK_ABORT("Unsupported Op");
// We should never get here but to make compiler happy
srcCoeff = SkBlendModeCoeff::kZero;
dstCoeff = SkBlendModeCoeff::kZero;
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index 7f16136fd0..afbfa09a62 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -106,7 +106,7 @@ bool GrGLSLFragmentShaderBuilder::enableFeature(GLSLFeature feature) {
}
return true;
default:
- SkFAIL("Unexpected GLSLFeature requested.");
+ SK_ABORT("Unexpected GLSLFeature requested.");
return false;
}
}
diff --git a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
index ea8e73f7b8..d9f34c2113 100644
--- a/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLGeometryShaderBuilder.cpp
@@ -18,7 +18,7 @@ static const char* input_type_name(GrGLSLGeometryBuilder::InputType in) {
case InputType::kTriangles: return "triangles";
case InputType::kTrianglesAdjacency: return "triangles_adjacency";
}
- SkFAIL("invalid input type");
+ SK_ABORT("invalid input type");
return "unknown_input";
}
@@ -29,7 +29,7 @@ static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) {
case OutputType::kLineStrip: return "line_strip";
case OutputType::kTriangleStrip: return "triangle_strip";
}
- SkFAIL("invalid output type");
+ SK_ABORT("invalid output type");
return "unknown_output";
}
diff --git a/src/gpu/glsl/GrGLSLXferProcessor.h b/src/gpu/glsl/GrGLSLXferProcessor.h
index 791bb068e2..763fcfa87d 100644
--- a/src/gpu/glsl/GrGLSLXferProcessor.h
+++ b/src/gpu/glsl/GrGLSLXferProcessor.h
@@ -89,7 +89,7 @@ private:
* it can construct a GrXferProcessor that will not read the dst color.
*/
virtual void emitOutputsForBlendState(const EmitArgs&) {
- SkFAIL("emitOutputsForBlendState not implemented.");
+ SK_ABORT("emitOutputsForBlendState not implemented.");
}
/**
@@ -105,7 +105,7 @@ private:
const char* outColor,
const char* outColorSecondary,
const GrXferProcessor&) {
- SkFAIL("emitBlendCodeForDstRead not implemented.");
+ SK_ABORT("emitBlendCodeForDstRead not implemented.");
}
virtual void onSetData(const GrGLSLProgramDataManager&, const GrXferProcessor&) = 0;
diff --git a/src/gpu/instanced/InstanceProcessor.cpp b/src/gpu/instanced/InstanceProcessor.cpp
index d3cc9fa9b0..ab6832687d 100644
--- a/src/gpu/instanced/InstanceProcessor.cpp
+++ b/src/gpu/instanced/InstanceProcessor.cpp
@@ -1674,7 +1674,7 @@ GLSLInstanceProcessor::Backend* GLSLInstanceProcessor::Backend::Create(const GrP
const VertexInputs& inputs) {
switch (opInfo.aaType()) {
default:
- SkFAIL("Unexpected antialias mode.");
+ SK_ABORT("Unexpected antialias mode.");
case GrAAType::kNone:
return new BackendNonAA(opInfo, inputs);
case GrAAType::kCoverage:
@@ -2035,7 +2035,7 @@ IndexRange InstanceProcessor::GetIndexRangeForRect(GrAAType aaType) {
case GrAAType::kMixedSamples:
return {kRect_FirstIndex, 3 * kRect_TriCount};
}
- SkFAIL("Unexpected aa type!");
+ SK_ABORT("Unexpected aa type!");
return {0, 0};
}
@@ -2054,7 +2054,7 @@ IndexRange InstanceProcessor::GetIndexRangeForOval(GrAAType aaType, const SkRect
case GrAAType::kMixedSamples:
return {kOctagonsFanned_FirstIndex, 3 * kOctagonsFanned_TriCount};
}
- SkFAIL("Unexpected aa type!");
+ SK_ABORT("Unexpected aa type!");
return {0, 0};
}
@@ -2068,7 +2068,7 @@ IndexRange InstanceProcessor::GetIndexRangeForRRect(GrAAType aaType) {
case GrAAType::kMixedSamples:
return {kCorneredRectFanned_FirstIndex, 3 * kCorneredRectFanned_TriCount};
}
- SkFAIL("Unexpected aa type!");
+ SK_ABORT("Unexpected aa type!");
return {0, 0};
}
diff --git a/src/gpu/mtl/GrMtlCaps.mm b/src/gpu/mtl/GrMtlCaps.mm
index 29e28cff03..57832c412b 100644
--- a/src/gpu/mtl/GrMtlCaps.mm
+++ b/src/gpu/mtl/GrMtlCaps.mm
@@ -96,7 +96,7 @@ void GrMtlCaps::initFeatureSet(MTLFeatureSet featureSet) {
}
#endif
// No supported feature sets were found
- SkFAIL("Requested an unsupported feature set");
+ SK_ABORT("Requested an unsupported feature set");
}
void GrMtlCaps::initGrCaps(const id<MTLDevice> device) {
diff --git a/src/gpu/mtl/GrMtlUtil.mm b/src/gpu/mtl/GrMtlUtil.mm
index d1bbf6e6bc..24643669ea 100644
--- a/src/gpu/mtl/GrMtlUtil.mm
+++ b/src/gpu/mtl/GrMtlUtil.mm
@@ -64,7 +64,7 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) {
*format = MTLPixelFormatR16Float;
return true;
}
- SkFAIL("Unexpected config");
+ SK_ABORT("Unexpected config");
return false;
}
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index cdb0c66e81..425dbae148 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -207,7 +207,7 @@ static void update_degenerate_test(DegenerateTestData* data, const SkPoint& pt)
case DegenerateTestData::kNonDegenerate:
break;
default:
- SkFAIL("Unexpected degenerate test stage.");
+ SK_ABORT("Unexpected degenerate test stage.");
}
}
diff --git a/src/gpu/ops/GrDrawPathOp.cpp b/src/gpu/ops/GrDrawPathOp.cpp
index ad75abbd3b..7b7d394f20 100644
--- a/src/gpu/ops/GrDrawPathOp.cpp
+++ b/src/gpu/ops/GrDrawPathOp.cpp
@@ -232,7 +232,7 @@ inline void pre_translate_transform_values(const float* xforms,
}
switch (type) {
case GrPathRendering::kNone_PathTransformType:
- SkFAIL("Cannot pre-translate kNone_PathTransformType.");
+ SK_ABORT("Cannot pre-translate kNone_PathTransformType.");
break;
case GrPathRendering::kTranslateX_PathTransformType:
SkASSERT(0 == y);
@@ -263,7 +263,7 @@ inline void pre_translate_transform_values(const float* xforms,
}
break;
default:
- SkFAIL("Unknown transform type.");
+ SK_ABORT("Unknown transform type.");
break;
}
}
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index f00a8c2a79..17a4f74e4e 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -321,7 +321,7 @@ static uint32_t seed_vertices(GrPrimitiveType type) {
case GrPrimitiveType::kLinesAdjacency:
return 4;
}
- SkFAIL("Incomplete switch\n");
+ SK_ABORT("Incomplete switch\n");
return 0;
}
@@ -339,7 +339,7 @@ static uint32_t primitive_vertices(GrPrimitiveType type) {
case GrPrimitiveType::kLinesAdjacency:
return 4;
}
- SkFAIL("Incomplete switch\n");
+ SK_ABORT("Incomplete switch\n");
return 0;
}
diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h
index 254fc44237..ec4b746091 100644
--- a/src/gpu/ops/GrOp.h
+++ b/src/gpu/ops/GrOp.h
@@ -215,7 +215,7 @@ private:
// 1 to the returned value.
uint32_t id = static_cast<uint32_t>(sk_atomic_inc(idCounter)) + 1;
if (!id) {
- SkFAIL("This should never wrap as it should only be called once for each GrOp "
+ SK_ABORT("This should never wrap as it should only be called once for each GrOp "
"subclass.");
}
return id;
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index 247a4ea7bd..5677bcee30 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -1679,7 +1679,7 @@ static int rrect_type_to_vert_count(RRectType type) {
case kOverstroke_RRectType:
return kVertsPerOverstrokeRRect;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return 0;
}
@@ -1692,7 +1692,7 @@ static int rrect_type_to_index_count(RRectType type) {
case kOverstroke_RRectType:
return kIndicesPerOverstrokeRRect;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return 0;
}
@@ -1704,7 +1704,7 @@ static const uint16_t* rrect_type_to_indices(RRectType type) {
case kOverstroke_RRectType:
return gOverstrokeRRectIndices;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return 0;
}
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp
index 7a4047a149..b22dd06df1 100644
--- a/src/gpu/ops/GrShadowRRectOp.cpp
+++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -150,7 +150,7 @@ static int rrect_type_to_vert_count(RRectType type) {
case kOverstroke_RRectType:
return kVertsPerOverstrokeRRect;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return 0;
}
@@ -163,7 +163,7 @@ static int rrect_type_to_index_count(RRectType type) {
case kOverstroke_RRectType:
return kIndicesPerOverstrokeRRect;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return 0;
}
@@ -175,7 +175,7 @@ static const uint16_t* rrect_type_to_indices(RRectType type) {
case kOverstroke_RRectType:
return gRRectIndices;
}
- SkFAIL("Invalid type");
+ SK_ABORT("Invalid type");
return nullptr;
}
diff --git a/src/gpu/text/GrAtlasGlyphCache.cpp b/src/gpu/text/GrAtlasGlyphCache.cpp
index e0d3786502..782c3c17b3 100644
--- a/src/gpu/text/GrAtlasGlyphCache.cpp
+++ b/src/gpu/text/GrAtlasGlyphCache.cpp
@@ -318,7 +318,7 @@ static bool get_packed_glyph_image(SkGlyphCache* cache, const SkGlyph& glyph, in
break;
}
default:
- SkFAIL("Invalid GrMaskFormat");
+ SK_ABORT("Invalid GrMaskFormat");
}
} else if (srcRB == dstRB) {
memcpy(dst, src, dstRB * height);
diff --git a/src/gpu/text/GrAtlasTextBlob.h b/src/gpu/text/GrAtlasTextBlob.h
index 5d03d58b11..e300c66319 100644
--- a/src/gpu/text/GrAtlasTextBlob.h
+++ b/src/gpu/text/GrAtlasTextBlob.h
@@ -99,7 +99,7 @@ public:
blob->fPool->release(p);
}
void* operator new(size_t) {
- SkFAIL("All blobs are created by placement new.");
+ SK_ABORT("All blobs are created by placement new.");
return sk_malloc_throw(0);
}
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index 3713bfeba0..1f124a6e04 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -499,7 +499,7 @@ void GrVkPrimaryCommandBuffer::submitToQueue(
WaitForFences(gpu->device(), 1, &fSubmitFence, true, UINT64_MAX));
if (VK_TIMEOUT == err) {
SkDebugf("Fence failed to signal: %d\n", err);
- SkFAIL("failing");
+ SK_ABORT("failing");
}
SkASSERT(!err);
@@ -524,7 +524,7 @@ bool GrVkPrimaryCommandBuffer::finished(const GrVkGpu* gpu) const {
default:
SkDebugf("Error getting fence status: %d\n", err);
- SkFAIL("failing");
+ SK_ABORT("failing");
break;
}
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 866e1ac4c2..cd3054cd05 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -320,10 +320,10 @@ GrBuffer* GrVkGpu::onCreateBuffer(size_t size, GrBufferType type, GrAccessPatter
buff = GrVkTexelBuffer::Create(this, size, kDynamic_GrAccessPattern == accessPattern);
break;
case kDrawIndirect_GrBufferType:
- SkFAIL("DrawIndirect Buffers not supported in vulkan backend.");
+ SK_ABORT("DrawIndirect Buffers not supported in vulkan backend.");
return nullptr;
default:
- SkFAIL("Unknown buffer type.");
+ SK_ABORT("Unknown buffer type.");
return nullptr;
}
if (data && buff) {
@@ -1377,7 +1377,7 @@ GrBackendObject GrVkGpu::createTestingOnlyBackendTexture(void* srcData, int w, i
VK_CALL(FreeCommandBuffers(fDevice, fCmdPool, 1, &cmdBuffer));
VK_CALL(DestroyFence(fDevice, fence, nullptr));
SkDebugf("Fence failed to signal: %d\n", err);
- SkFAIL("failing");
+ SK_ABORT("failing");
}
SkASSERT(!err);
@@ -1829,7 +1829,7 @@ bool GrVkGpu::onReadPixels(GrSurface* surface,
this->internalResolveRenderTarget(rt, false);
break;
default:
- SkFAIL("Unknown resolve type");
+ SK_ABORT("Unknown resolve type");
}
image = rt;
} else {
diff --git a/src/gpu/vk/GrVkPipeline.cpp b/src/gpu/vk/GrVkPipeline.cpp
index e3561331c2..1a616054ba 100644
--- a/src/gpu/vk/GrVkPipeline.cpp
+++ b/src/gpu/vk/GrVkPipeline.cpp
@@ -41,7 +41,7 @@ static inline VkFormat attrib_type_to_vkformat(GrVertexAttribType type) {
case kUint_GrVertexAttribType:
return VK_FORMAT_R32_UINT;
}
- SkFAIL("Unknown vertex attrib type");
+ SK_ABORT("Unknown vertex attrib type");
return VK_FORMAT_UNDEFINED;
}
@@ -111,7 +111,7 @@ static VkPrimitiveTopology gr_primitive_type_to_vk_topology(GrPrimitiveType prim
case GrPrimitiveType::kLinesAdjacency:
return VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY;
}
- SkFAIL("invalid GrPrimitiveType");
+ SK_ABORT("invalid GrPrimitiveType");
return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
}
diff --git a/src/gpu/vk/GrVkPipelineStateDataManager.h b/src/gpu/vk/GrVkPipelineStateDataManager.h
index 25c7a6e648..250612d8e8 100644
--- a/src/gpu/vk/GrVkPipelineStateDataManager.h
+++ b/src/gpu/vk/GrVkPipelineStateDataManager.h
@@ -46,7 +46,7 @@ public:
// for nvpr only
void setPathFragmentInputTransform(VaryingHandle u, int components,
const SkMatrix& matrix) const override {
- SkFAIL("Only supported in NVPR, which is not in vulkan");
+ SK_ABORT("Only supported in NVPR, which is not in vulkan");
}
// Returns true if either the geometry or fragment buffers needed to generate a new underlying
diff --git a/src/gpu/vk/GrVkRenderPass.cpp b/src/gpu/vk/GrVkRenderPass.cpp
index a6a6afbbbd..7f8b20ad41 100644
--- a/src/gpu/vk/GrVkRenderPass.cpp
+++ b/src/gpu/vk/GrVkRenderPass.cpp
@@ -35,7 +35,7 @@ void setup_vk_attachment_description(VkAttachmentDescription* attachment,
attachment->stencilStoreOp = desc.fLoadStoreOps.fStoreOp;
break;
default:
- SkFAIL("Unexpected attachment layout");
+ SK_ABORT("Unexpected attachment layout");
}
attachment->initialLayout = layout;
diff --git a/src/gpu/vk/GrVkTransferBuffer.h b/src/gpu/vk/GrVkTransferBuffer.h
index a9756cbae9..588ee949cd 100644
--- a/src/gpu/vk/GrVkTransferBuffer.h
+++ b/src/gpu/vk/GrVkTransferBuffer.h
@@ -41,7 +41,7 @@ private:
}
bool onUpdateData(const void* src, size_t srcSizeInBytes) override {
- SkFAIL("Not implemented for transfer buffers.");
+ SK_ABORT("Not implemented for transfer buffers.");
return false;
}
diff --git a/src/gpu/vk/GrVkUniformHandler.cpp b/src/gpu/vk/GrVkUniformHandler.cpp
index f45d7955f1..be746cd653 100644
--- a/src/gpu/vk/GrVkUniformHandler.cpp
+++ b/src/gpu/vk/GrVkUniformHandler.cpp
@@ -55,7 +55,7 @@ uint32_t grsltype_to_alignment_mask(GrSLType type) {
case kIImageStorage2D_GrSLType:
break;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return 0;
}
@@ -104,7 +104,7 @@ static inline uint32_t grsltype_to_vk_size(GrSLType type) {
case kIImageStorage2D_GrSLType:
break;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return 0;
}
diff --git a/src/gpu/vk/GrVkUniformHandler.h b/src/gpu/vk/GrVkUniformHandler.h
index 862fbfcf82..f6dcbbbd8e 100644
--- a/src/gpu/vk/GrVkUniformHandler.h
+++ b/src/gpu/vk/GrVkUniformHandler.h
@@ -91,12 +91,12 @@ private:
ImageStorageHandle addImageStorage(uint32_t visibility, GrSLType, GrImageStorageFormat,
GrSLMemoryModel, GrSLRestrict, GrIOType,
const char* name) override {
- SkFAIL("Image storages not implemented for Vulkan.");
+ SK_ABORT("Image storages not implemented for Vulkan.");
return 0;
}
const GrShaderVar& imageStorageVariable(ImageStorageHandle handle) const override {
- SkFAIL("Image storages not implemented for Vulkan.");
+ SK_ABORT("Image storages not implemented for Vulkan.");
static const GrShaderVar* gVar = nullptr;
return *gVar;
}
diff --git a/src/gpu/vk/GrVkUtil.cpp b/src/gpu/vk/GrVkUtil.cpp
index 2ca701f60d..0ce47cb962 100644
--- a/src/gpu/vk/GrVkUtil.cpp
+++ b/src/gpu/vk/GrVkUtil.cpp
@@ -61,7 +61,7 @@ bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) {
*format = VK_FORMAT_R16_SFLOAT;
return true;
}
- SkFAIL("Unexpected config");
+ SK_ABORT("Unexpected config");
return false;
}
diff --git a/src/gpu/vk/GrVkVaryingHandler.cpp b/src/gpu/vk/GrVkVaryingHandler.cpp
index 9a38159849..8e43b76341 100644
--- a/src/gpu/vk/GrVkVaryingHandler.cpp
+++ b/src/gpu/vk/GrVkVaryingHandler.cpp
@@ -58,7 +58,7 @@ static inline int grsltype_to_location_size(GrSLType type) {
case kIImageStorage2D_GrSLType:
return 0;
}
- SkFAIL("Unexpected type");
+ SK_ABORT("Unexpected type");
return -1;
}
diff --git a/src/ports/SkFontMgr_FontConfigInterface.cpp b/src/ports/SkFontMgr_FontConfigInterface.cpp
index 6264710008..99092b6b98 100644
--- a/src/ports/SkFontMgr_FontConfigInterface.cpp
+++ b/src/ports/SkFontMgr_FontConfigInterface.cpp
@@ -176,11 +176,11 @@ protected:
}
void onGetFamilyName(int index, SkString* familyName) const override {
- SkFAIL("Not implemented.");
+ SK_ABORT("Not implemented.");
}
SkFontStyleSet* onCreateStyleSet(int index) const override {
- SkFAIL("Not implemented.");
+ SK_ABORT("Not implemented.");
return nullptr;
}
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index b92bf59ab6..1b24ef9ba3 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -894,7 +894,7 @@ void SkGradientShaderBase::getGradientTableBitmap(SkBitmap* bitmap,
SkColorSpace::MakeSRGBLinear());
break;
default:
- SkFAIL("Unexpected bitmap type");
+ SK_ABORT("Unexpected bitmap type");
return;
}
bitmap->allocPixels(info);
diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp
index 904a9a6ea0..4a1f2b750a 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -159,7 +159,7 @@ public:
}
} break;
default:
- SkFAIL("unknown text encoding");
+ SK_ABORT("unknown text encoding");
}
if (scalarsPerPos < 2) {
diff --git a/src/utils/SkShadowUtils.cpp b/src/utils/SkShadowUtils.cpp
index e95668ae2b..0e34c9105f 100644
--- a/src/utils/SkShadowUtils.cpp
+++ b/src/utils/SkShadowUtils.cpp
@@ -151,7 +151,7 @@ struct SpotVerticesFactory {
}
return false;
}
- SkFAIL("Uninitialized occluder type?");
+ SK_ABORT("Uninitialized occluder type?");
return false;
}
@@ -369,7 +369,7 @@ public:
bool isRRect(SkRRect* rrect) { return fShapeForKey.asRRect(rrect, nullptr, nullptr, nullptr); }
#else
int keyBytes() const { return -1; }
- void writeKey(void* key) const { SkFAIL("Should never be called"); }
+ void writeKey(void* key) const { SK_ABORT("Should never be called"); }
bool isRRect(SkRRect* rrect) { return false; }
#endif
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 37972d9379..096219bb9a 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -31,7 +31,7 @@ static void test_lcd_coverage_fallback_case(skiatest::Reporter* reporter, const
DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrPorterDuff, reporter, ctxInfo) {
const GrCaps& caps = *ctxInfo.grContext()->getGpu()->caps();
if (!caps.shaderCaps()->dualSourceBlendingSupport()) {
- SkFAIL("Null context does not support dual source blending.");
+ SK_ABORT("Null context does not support dual source blending.");
return;
}
@@ -1050,13 +1050,13 @@ DEF_GPUTEST(PorterDuffNoDualSourceBlending, reporter, /*factory*/) {
sk_gpu_test::GrContextFactory mockFactory(opts);
GrContext* ctx = mockFactory.get(sk_gpu_test::GrContextFactory::kNullGL_ContextType);
if (!ctx) {
- SkFAIL("Failed to create null context without ARB_blend_func_extended.");
+ SK_ABORT("Failed to create null context without ARB_blend_func_extended.");
return;
}
const GrCaps& caps = *ctx->caps();
if (caps.shaderCaps()->dualSourceBlendingSupport()) {
- SkFAIL("Null context failed to honor request for no ARB_blend_func_extended.");
+ SK_ABORT("Null context failed to honor request for no ARB_blend_func_extended.");
return;
}
diff --git a/tests/SurfaceSemaphoreTest.cpp b/tests/SurfaceSemaphoreTest.cpp
index bb726c2eec..09d3c35900 100644
--- a/tests/SurfaceSemaphoreTest.cpp
+++ b/tests/SurfaceSemaphoreTest.cpp
@@ -305,7 +305,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(EmptySurfaceSemaphoreTest, reporter, ctxInfo)
// device to hang when tearing down (even if just tearing down GL). So we Fail here to
// kill things.
if (err == VK_TIMEOUT) {
- SkFAIL("Waiting on semaphore indefinitely");
+ SK_ABORT("Waiting on semaphore indefinitely");
}
}
#endif
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index d8d4865b29..f20e3e15cf 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -333,7 +333,7 @@ private:
}
} break;
default:
- SkFAIL("unhandled positioning value");
+ SK_ABORT("unhandled positioning value");
}
}
};
diff --git a/tools/debugger/SkDrawCommand.cpp b/tools/debugger/SkDrawCommand.cpp
index 5ae0307439..251604e1d9 100644
--- a/tools/debugger/SkDrawCommand.cpp
+++ b/tools/debugger/SkDrawCommand.cpp
@@ -745,7 +745,7 @@ void SkDrawCommand::WritePNG(const uint8_t* rgba, unsigned width, unsigned heigh
png_infop info_ptr = png_create_info_struct(png);
SkASSERT(info_ptr != nullptr);
if (setjmp(png_jmpbuf(png))) {
- SkFAIL("png encode error");
+ SK_ABORT("png encode error");
}
png_set_write_fn(png, &out, write_png_callback, NULL);
int colorType = isOpaque ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_RGBA;
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h
index a13aeb7ab1..8d3e69c765 100644
--- a/tools/gpu/GrContextFactory.h
+++ b/tools/gpu/GrContextFactory.h
@@ -120,7 +120,7 @@ public:
case kMock_ContextType:
return "Mock";
}
- SkFAIL("Unreachable");
+ SK_ABORT("Unreachable");
return "Unknown";
}
diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h
index 701000e24b..fb63ac3140 100644
--- a/tools/gpu/gl/GLTestContext.h
+++ b/tools/gpu/gl/GLTestContext.h
@@ -64,7 +64,7 @@ public:
const char* name, const char* ext = nullptr) const {
using Proc = Ret(GR_GL_FUNCTION_TYPE*)(Args...);
if (!SkStrStartsWith(name, "gl")) {
- SkFAIL("getGLProcAddress: proc name must have 'gl' prefix");
+ SK_ABORT("getGLProcAddress: proc name must have 'gl' prefix");
*out = nullptr;
} else if (ext) {
SkString fullname(name);
diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp
index e8eea8f78e..3cecd07a0a 100644
--- a/tools/gpu/gl/debug/DebugGLTestContext.cpp
+++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp
@@ -662,7 +662,7 @@ public:
break;
}
default:
- SkFAIL("Unexpected pname to GetIntegerv");
+ SK_ABORT("Unexpected pname to GetIntegerv");
}
}
@@ -688,7 +688,7 @@ public:
*params = 32;
break;
default:
- SkFAIL("Unexpected pname passed GetQueryiv.");
+ SK_ABORT("Unexpected pname passed GetQueryiv.");
}
}
@@ -730,7 +730,7 @@ public:
case GR_GL_RENDERER:
return (const GrGLubyte*)"The Debug (Non-)Renderer";
default:
- SkFAIL("Unexpected name passed to GetString");
+ SK_ABORT("Unexpected name passed to GetString");
return nullptr;
}
}
@@ -747,7 +747,7 @@ public:
}
}
default:
- SkFAIL("Unexpected name passed to GetStringi");
+ SK_ABORT("Unexpected name passed to GetStringi");
return nullptr;
}
}
@@ -756,7 +756,7 @@ public:
GrGLint* params) override {
// we used to use this to query stuff about externally created textures,
// now we just require clients to tell us everything about the texture.
- SkFAIL("Should never query texture parameters.");
+ SK_ABORT("Should never query texture parameters.");
}
GrGLvoid deleteVertexArrays(GrGLsizei n, const GrGLuint* ids) override {
@@ -893,7 +893,7 @@ public:
*params = buffer->getUsage();
break;
default:
- SkFAIL("Unexpected value to glGetBufferParamateriv");
+ SK_ABORT("Unexpected value to glGetBufferParamateriv");
break;
}
}
@@ -901,7 +901,7 @@ public:
private:
inline int static GetBufferIndex(GrGLenum glTarget) {
switch (glTarget) {
- default: SkFAIL("Unexpected GL target to GetBufferIndex");
+ default: SK_ABORT("Unexpected GL target to GetBufferIndex");
case GR_GL_ARRAY_BUFFER: return 0;
case GR_GL_ELEMENT_ARRAY_BUFFER: return 1;
case GR_GL_TEXTURE_BUFFER: return 2;
@@ -987,7 +987,7 @@ private:
break;
// we don't expect any other pnames
default:
- SkFAIL("Unexpected pname to GetProgramiv");
+ SK_ABORT("Unexpected pname to GetProgramiv");
break;
}
}
@@ -1002,7 +1002,7 @@ private:
*params = 0;
break;
default:
- SkFAIL("Unexpected pname passed to GetQueryObject.");
+ SK_ABORT("Unexpected pname passed to GetQueryObject.");
break;
}
}