From b4aab9ae6d27c446af8302b79d15b832c816c633 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Wed, 16 Aug 2017 10:53:04 -0400 Subject: 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 Commit-Queue: Ben Wagner --- tools/gpu/gl/GLTestContext.h | 2 +- tools/gpu/gl/debug/DebugGLTestContext.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tools/gpu/gl') 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; } } -- cgit v1.2.3