Index: src/gpu/gl/GrGLInterface.cpp |
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp |
index 5bf0efb7671004b6e80a3948a8613c13e73af3f2..056a60187437b9fd2d31364159654ce34586fe35 100644 |
--- a/src/gpu/gl/GrGLInterface.cpp |
+++ b/src/gpu/gl/GrGLInterface.cpp |
@@ -116,9 +116,15 @@ GrGLInterface* GrGLInterface::NewClone(const GrGLInterface* interface) { |
return clone; |
} |
-#define RETURN_FALSE_INTERFACE \ |
- SkDEBUGFAIL("GrGLInterface::validate() failed."); \ |
- return false; \ |
+#ifdef SK_DEBUG |
+ static int kIsDebug = 1; |
+#else |
+ static int kIsDebug = 0; |
+#endif |
+ |
+#define RETURN_FALSE_INTERFACE \ |
+ if (kIsDebug) { SkDebugf("%s:%d GrGLInterface::validate() failed.\n", __FILE__, __LINE__); } \ |
+ return false; |
bool GrGLInterface::validate() const { |