Flutter Engine
The Flutter Engine
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Properties
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
y
Enumerator
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
third_party
skia
src
base
SkScopeExit.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#ifndef SkScopeExit_DEFINED
9
#define SkScopeExit_DEFINED
10
11
#include "
include/private/base/SkMacros.h
"
12
13
#include <functional>
14
#include <utility>
15
16
/** SkScopeExit calls a std:::function<void()> in its destructor. */
17
class
SkScopeExit
{
18
public
:
19
SkScopeExit
() =
default
;
20
SkScopeExit
(
std::function
<
void
()>
f
) : fFn(
std
::move(
f
)) {}
21
SkScopeExit
(
SkScopeExit
&& that) : fFn(
std
::move(that.fFn)) {}
22
23
~SkScopeExit
() {
24
if
(fFn) {
25
fFn();
26
}
27
}
28
29
void
clear
() { fFn = {}; }
30
31
SkScopeExit
&
operator=
(
SkScopeExit
&& that) {
32
fFn = std::move(that.fFn);
33
return
*
this
;
34
}
35
36
private
:
37
std::function
<void()> fFn;
38
39
SkScopeExit
(
const
SkScopeExit
& ) =
delete
;
40
SkScopeExit
&
operator=
(
const
SkScopeExit
& ) =
delete
;
41
};
42
43
/**
44
* SK_AT_SCOPE_EXIT(stmt) evaluates stmt when the current scope ends.
45
*
46
* E.g.
47
* {
48
* int x = 5;
49
* {
50
* SK_AT_SCOPE_EXIT(x--);
51
* SkASSERT(x == 5);
52
* }
53
* SkASSERT(x == 4);
54
* }
55
*/
56
#define SK_AT_SCOPE_EXIT(stmt) \
57
SkScopeExit SK_MACRO_APPEND_LINE(at_scope_exit_)([&]() { stmt; })
58
59
#endif
// SkScopeExit_DEFINED
SkMacros.h
SkScopeExit
Definition:
SkScopeExit.h:17
SkScopeExit::clear
void clear()
Definition:
SkScopeExit.h:29
SkScopeExit::~SkScopeExit
~SkScopeExit()
Definition:
SkScopeExit.h:23
SkScopeExit::SkScopeExit
SkScopeExit()=default
SkScopeExit::SkScopeExit
SkScopeExit(SkScopeExit &&that)
Definition:
SkScopeExit.h:21
SkScopeExit::SkScopeExit
SkScopeExit(std::function< void()> f)
Definition:
SkScopeExit.h:20
SkScopeExit::operator=
SkScopeExit & operator=(SkScopeExit &&that)
Definition:
SkScopeExit.h:31
function
Dart_NativeFunction function
Definition:
fuchsia.cc:51
skcms_private::f
float f
Definition:
skcms_Transform.h:121
std
Definition:
ref_ptr.h:256
Generated on Sun Jun 23 2024 21:56:09 for Flutter Engine by
1.9.4