skia2/tools/skottie_ios_app/GrContextHolder.mm
Robert Phillips 70743df812 Update iOS Skottie App for GrContext changes
Change-Id: Iddfd7c483a5fc734284a4e28a64c3cd249e22e5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310116
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-08-14 12:55:56 +00:00

27 lines
665 B
Plaintext

// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/skottie_ios_app/GrContextHolder.h"
#include "include/core/SkTypes.h"
#if SK_SUPPORT_GPU
#include "include/gpu/GrContextOptions.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/gl/GrGLInterface.h"
#ifdef SK_GL
GrContextHolder SkMakeGLContext() {
return GrContextHolder(GrContext::MakeGL(nullptr, GrContextOptions()).release());
}
#endif
void GrContextRelease::operator()(GrContext* ptr) { SkSafeUnref(ptr); }
#else
void GrContextRelease::operator()(GrContext*) { SkASSERT(false); }
#endif