commit | 6e2aad4e9f6280aa2b710e7324458fdc6d699ec5 | [log] [tgz] |
---|---|---|
author | bsalomon <bsalomon@google.com> | Fri Apr 01 11:54:31 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Fri Apr 01 11:54:31 2016 -0700 |
tree | 77bf09c049b5afe4aaccd66b7926050c53bbebff | |
parent | 895f3f0544ce38d35999771754cbb1d876c14b5a [diff] [blame] |
Add GrContext::releaseAndAbandonContext() Like abandonContext() this disconnects the GrContext from the underlying 3D API. However, unlike abandonContext it first frees all allocated GPU resources. BUG=skia:5142 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852733002 Review URL: https://codereview.chromium.org/1852733002
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index e704f74..6584789 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp
@@ -1011,6 +1011,8 @@ canvas->readPixels(dst, 0, 0); if (FLAGS_abandonGpuContext) { factory.abandonContexts(); + } else if (FLAGS_releaseAndAbandonGpuContext) { + factory.releaseResourcesAndAbandonContexts(); } return ""; }