aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-11-13 06:06:03 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-13 06:06:03 -0800
commit9c8605144a0f15e3e69a4e1dcd5d3e63f339380e (patch)
tree1917c14e2ade64311654c27353a32eb7e637cb37 /src/gpu/GrContext.cpp
parent7fdda6091ca0579e823cc014a000828dd53571e6 (diff)
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 Review URL: https://codereview.chromium.org/1441533003
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index bd4ca40a34..348cdbaaca 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -118,14 +118,17 @@ GrContext::~GrContext() {
void GrContext::abandonContext() {
fResourceProvider->abandon();
+
+ // Need to abandon the drawing manager first so all the render targets
+ // will be released/forgotten before they too are abandoned.
+ fDrawingManager->abandon();
+
// abandon first to so destructors
// don't try to free the resources in the API.
fResourceCache->abandonAll();
fGpu->contextAbandoned();
- fDrawingManager->abandon();
-
fBatchFontCache->freeAll();
fLayerCache->freeAll();
fTextBlobCache->freeAll();