Index: include/gpu/GrTypesPriv.h |
diff --git a/include/gpu/GrTypesPriv.h b/include/gpu/GrTypesPriv.h |
index 412de897c6543b851dad3134020c0f9d1788deca..eaf1aa4050615805910e6719d9baa2f1343527ba 100644 |
--- a/include/gpu/GrTypesPriv.h |
+++ b/include/gpu/GrTypesPriv.h |
@@ -264,4 +264,14 @@ private: |
SkIRect fRect; |
}; |
+#ifdef SK_DEBUG |
+// Takes a pointer to a GrContext, and will suppress prints if required |
+#define GrContextDebugf(context, ...) \ |
+ if (!context->suppressPrints()) { \ |
+ SkDebugf(__VA_ARGS__); \ |
+ } |
+#else |
+#define GrContextDebugf(context, ...) |
+#endif |
+ |
#endif |