Index: src/gpu/GrTest.cpp |
diff --git a/src/gpu/GrTest.cpp b/src/gpu/GrTest.cpp |
index 8d6208de7908fd3657cbdfc067c250f40f516646..9096ef8bb2f265f8c21a273cf14153e3d69bf8dc 100644 |
--- a/src/gpu/GrTest.cpp |
+++ b/src/gpu/GrTest.cpp |
@@ -54,7 +54,8 @@ void GrContext::getTestTarget(GrTestTarget* tar) { |
// then disconnects. This would help prevent test writers from mixing using the returned |
// GrDrawTarget and regular drawing. We could also assert or fail in GrContext drawing methods |
// until ~GrTestTarget(). |
- tar->init(this, fDrawingMgr.fDrawTarget); |
+ SkAutoTUnref<GrDrawTarget> dt(fDrawingMgr.newDrawTarget(nullptr)); |
+ tar->init(this, dt); |
} |
void GrContext::setTextBlobCacheLimit_ForTesting(size_t bytes) { |