Flutter Engine
The Flutter Engine
third_party
skia
tools
skottie_ios_app
GrContextHolder.mm
Go to the documentation of this file.
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
4
#include "
tools/skottie_ios_app/GrContextHolder.h
"
5
6
#include "
include/core/SkTypes.h
"
7
8
#if defined(SK_GANESH)
9
10
#include "
include/gpu/GrContextOptions.h
"
11
#include "
include/gpu/GrDirectContext.h
"
12
#include "
include/gpu/ganesh/gl/GrGLDirectContext.h
"
13
#include "
include/gpu/gl/GrGLInterface.h
"
14
15
#ifdef SK_GL
16
GrContextHolder
SkMakeGLContext
() {
17
return
GrContextHolder
(
GrDirectContexts::MakeGL
(
nullptr
,
GrContextOptions
()).release());
18
}
19
#endif
20
21
void
GrContextRelease::operator()
(
GrDirectContext
* ptr) {
SkSafeUnref
(ptr); }
22
23
#else
24
25
void
GrContextRelease::operator()
(
GrDirectContext
*) {
SkDEBUGFAIL
(
""
); }
26
27
#endif
GrContextHolder.h
SkMakeGLContext
GrContextHolder SkMakeGLContext()
GrContextHolder
std::unique_ptr< GrDirectContext, GrContextRelease > GrContextHolder
Definition:
GrContextHolder.h:12
GrContextOptions.h
GrDirectContext.h
GrGLDirectContext.h
GrGLInterface.h
SkDEBUGFAIL
#define SkDEBUGFAIL(message)
Definition:
SkAssert.h:118
SkSafeUnref
static void SkSafeUnref(T *obj)
Definition:
SkRefCnt.h:149
SkTypes.h
GrDirectContext
Definition:
GrDirectContext.h:60
GrDirectContexts::MakeGL
SK_API sk_sp< GrDirectContext > MakeGL(sk_sp< const GrGLInterface >, const GrContextOptions &)
Definition:
GrGLDirectContext.cpp:83
GrContextOptions
Definition:
GrContextOptions.h:23
GrContextRelease::operator()
void operator()(GrDirectContext *)
Definition:
GrContextHolder.mm:25
Generated on Sun Jun 23 2024 21:56:51 for Flutter Engine by
1.9.4