Pass file and line number when asserting single owner
Working on debugging some multithreading and when a bot fails single owner, currently we get the unhelpful message "GrSingleOwner.h:33" with no backtrace. With this at least we get the real function.
Bug: skia:10305
Change-Id: I201ae96839bf9c043d009abc44a6ba784a9b9742
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293246
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceProvider.cpp b/src/gpu/GrResourceProvider.cpp
index f079c7d..2c9d9b1 100644
--- a/src/gpu/GrResourceProvider.cpp
+++ b/src/gpu/GrResourceProvider.cpp
@@ -31,8 +31,7 @@
const int GrResourceProvider::kMinScratchTextureSize = 16;
-#define ASSERT_SINGLE_OWNER \
- SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fSingleOwner);)
+#define ASSERT_SINGLE_OWNER GR_ASSERT_SINGLE_OWNER(fSingleOwner)
GrResourceProvider::GrResourceProvider(GrGpu* gpu, GrResourceCache* cache, GrSingleOwner* owner)
: fCache(cache)