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
gpu
graphite
dawn
DawnAsyncWait.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2022 Google LLC
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
#include "
src/gpu/graphite/dawn/DawnAsyncWait.h
"
9
10
#include "
src/gpu/graphite/Caps.h
"
11
#include "
src/gpu/graphite/dawn/DawnSharedContext.h
"
12
#include "
src/gpu/graphite/dawn/DawnUtilsPriv.h
"
13
14
namespace
skgpu::graphite
{
15
16
DawnAsyncWait::DawnAsyncWait
(
const
DawnSharedContext
* sharedContext)
17
: fSharedContext(sharedContext)
18
, fSignaled(
false
) {}
19
20
bool
DawnAsyncWait::yieldAndCheck
()
const
{
21
if
(fSharedContext->
hasTick
()) {
22
if
(fSignaled.load(std::memory_order_acquire)) {
23
return
true
;
24
}
25
26
fSharedContext->
tick
();
27
}
28
return
fSignaled.load(std::memory_order_acquire);
29
}
30
31
bool
DawnAsyncWait::mayBusyWait
()
const
{
return
fSharedContext->
caps
()->
allowCpuSync
(); }
32
33
void
DawnAsyncWait::busyWait
()
const
{
34
SkASSERT
(fSharedContext->
hasTick
());
35
while
(!this->
yieldAndCheck
()) {}
36
}
37
38
}
// namespace skgpu::graphite
Caps.h
DawnAsyncWait.h
DawnSharedContext.h
DawnUtilsPriv.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
skgpu::graphite::Caps::allowCpuSync
bool allowCpuSync() const
Definition:
Caps.h:232
skgpu::graphite::DawnAsyncWait::yieldAndCheck
bool yieldAndCheck() const
Definition:
DawnAsyncWait.cpp:20
skgpu::graphite::DawnAsyncWait::DawnAsyncWait
DawnAsyncWait(const DawnSharedContext *)
Definition:
DawnAsyncWait.cpp:16
skgpu::graphite::DawnAsyncWait::busyWait
void busyWait() const
Definition:
DawnAsyncWait.cpp:33
skgpu::graphite::DawnAsyncWait::mayBusyWait
bool mayBusyWait() const
Definition:
DawnAsyncWait.cpp:31
skgpu::graphite::DawnSharedContext
Definition:
DawnSharedContext.h:22
skgpu::graphite::DawnSharedContext::hasTick
bool hasTick() const
Definition:
DawnSharedContext.h:36
skgpu::graphite::DawnSharedContext::tick
void tick() const
Definition:
DawnSharedContext.h:38
skgpu::graphite::SharedContext::caps
const Caps * caps() const
Definition:
SharedContext.h:39
dart::false
false
Definition:
isolate_reload.cc:58
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
Generated on Sun Jun 23 2024 21:56:26 for Flutter Engine by
1.9.4