From 5627d65146cb92624b682389e017d488872228c7 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 16 Nov 2017 10:17:20 -0500 Subject: Add method to sk_gpu_test::TestContext to automatically restore the previous context. The motivation for this is to allow a GM to create a GL context, do some some work in it, and then return to the context that was set when it was invoked. Change-Id: Ie8496072a10f8f3ff36a08889e593a6ca961b61a Reviewed-on: https://skia-review.googlesource.com/70720 Commit-Queue: Brian Salomon Reviewed-by: Brian Osman --- tools/gpu/gl/debug/DebugGLTestContext.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/gpu/gl/debug') diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp index f16692e8e0..e28a3a7f13 100644 --- a/tools/gpu/gl/debug/DebugGLTestContext.cpp +++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp @@ -1203,6 +1203,7 @@ public: private: void onPlatformMakeCurrent() const override {} + std::function onPlatformGetAutoContextRestore() const override { return nullptr; } void onPlatformSwapBuffers() const override {} GrGLFuncPtr onPlatformGetProcAddress(const char*) const override { return nullptr; } }; -- cgit v1.2.3