aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLPathRendering.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-04-01 11:54:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-01 11:54:31 -0700
commit6e2aad4e9f6280aa2b710e7324458fdc6d699ec5 (patch)
tree77bf09c049b5afe4aaccd66b7926050c53bbebff /src/gpu/gl/GrGLPathRendering.cpp
parent895f3f0544ce38d35999771754cbb1d876c14b5a (diff)
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
Diffstat (limited to 'src/gpu/gl/GrGLPathRendering.cpp')
-rw-r--r--src/gpu/gl/GrGLPathRendering.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 47274f9d69..0ecf58a8e1 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -91,7 +91,10 @@ GrGLPathRendering::~GrGLPathRendering() {
}
}
-void GrGLPathRendering::abandonGpuResources() {
+void GrGLPathRendering::disconnect(GrGpu::DisconnectType type) {
+ if (GrGpu::DisconnectType::kCleanup == type) {
+ this->deletePaths(fFirstPreallocatedPathID, fPreallocatedPathCount);
+ };
fPreallocatedPathCount = 0;
}