Update testing frameworks/tests for MDB
This CL:
Fixes an ordering problem w.r.t. drawTarget clean up in GrContext::abandonContext (for text test that abandons context)
Fixes when the lastDrawTarget field is set on a RenderTarget (now in GrDrawTarget ctor) due to GrTestTarget use case
Updates the ProgramUnitTest to use multiple drawTargets
Adds renderTarget creation to GrTestTargets (in MDB drawTargets require them)
BUG=skia:4094
Committed: https://skia.googlesource.com/skia/+/9c8605144a0f15e3e69a4e1dcd5d3e63f339380e
Review URL: https://codereview.chromium.org/1441533003
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 3f898ab..a7f4d92 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -42,6 +42,8 @@
fContext = fGpu->getContext();
fClipMaskManager.reset(new GrClipMaskManager(this));
+ rt->setLastDrawTarget(this);
+
#ifdef SK_DEBUG
static int debugID = 0;
fDebugID = debugID++;