1 // Copyright 2019 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 #ifndef GrContextHolder_DEFINED
4 #define GrContextHolder_DEFINED
10 // A struct to take ownership of a GrDirectContext.
11 struct GrContextRelease { void operator()(GrDirectContext*); };
12 using GrContextHolder = std::unique_ptr<GrDirectContext, GrContextRelease>;
14 // Wrapper around GrDirectContext::MakeGL
15 GrContextHolder SkMakeGLContext();
17 #endif // GrContextHolder_DEFINED