Add GM::gpuTeardown entry point
This call will bookend gpuSetup calls. Any GM that implements onGpuSetup should also implement onGpuTeardown.
This is pulled out of the gpuSetup refactoring.
Change-Id: If55599dc26370f589c5cafd20a7ccb9019b424cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299138
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/gm/gm.cpp b/gm/gm.cpp
index d999e27..8f7d8a8 100644
--- a/gm/gm.cpp
+++ b/gm/gm.cpp
@@ -76,6 +76,10 @@
return this->onGpuSetup(context, errorMsg);
}
+void GM::gpuTeardown() {
+ this->onGpuTeardown();
+}
+
DrawResult GM::draw(SkCanvas* canvas, SkString* errorMsg) {
TRACE_EVENT1("GM", TRACE_FUNC, "name", TRACE_STR_COPY(this->getName()));
this->drawBackground(canvas);