Flutter Engine
The Flutter Engine
third_party
skia
src
gpu
ganesh
GrWaitRenderTask.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2019 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/ganesh/GrWaitRenderTask.h
"
9
10
#include "
src/gpu/ganesh/GrGpu.h
"
11
#include "
src/gpu/ganesh/GrOpFlushState.h
"
12
#include "
src/gpu/ganesh/GrResourceAllocator.h
"
13
14
void
GrWaitRenderTask::gatherProxyIntervals(
GrResourceAllocator
* alloc)
const
{
15
// This renderTask doesn't have "normal" ops. In this case we still need to add an interval (so
16
// fEndOfOpsTaskOpIndices will remain in sync), so we create a fake op# to capture the fact that
17
// we manipulate our target's proxy.
18
SkASSERT
(0 == this->
numTargets
());
19
auto
fakeOp = alloc->
curOp
();
20
alloc->
addInterval
(fWaitedOn.
proxy
(), fakeOp, fakeOp,
21
GrResourceAllocator::ActualUse::kYes
,
22
GrResourceAllocator::AllowRecycling::kYes
);
23
alloc->
incOps
();
24
}
25
26
bool
GrWaitRenderTask::onExecute(
GrOpFlushState
* flushState) {
27
for
(
int
i
= 0;
i
< fNumSemaphores; ++
i
) {
28
// If we don't have a semaphore here it means we failed to wrap it. That happens if the
29
// client didn't give us a valid semaphore to begin with. Therefore, it is fine to not wait
30
// on it.
31
if
(fSemaphores[
i
]) {
32
flushState->
gpu
()->
waitSemaphore
(fSemaphores[
i
].
get
());
33
}
34
}
35
return
true
;
36
}
GrGpu.h
GrOpFlushState.h
GrResourceAllocator.h
GrWaitRenderTask.h
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
GrGpu::waitSemaphore
virtual void waitSemaphore(GrSemaphore *semaphore)=0
GrOpFlushState
Definition:
GrOpFlushState.h:58
GrOpFlushState::gpu
GrGpu * gpu()
Definition:
GrOpFlushState.h:85
GrRenderTask::numTargets
int numTargets() const
Definition:
GrRenderTask.h:103
GrResourceAllocator
Definition:
GrResourceAllocator.h:78
GrResourceAllocator::incOps
void incOps()
Definition:
GrResourceAllocator.h:86
GrResourceAllocator::addInterval
void addInterval(GrSurfaceProxy *, unsigned int start, unsigned int end, ActualUse actualUse, AllowRecycling SkDEBUGCODE(, bool isDirectDstRead=false))
Definition:
GrResourceAllocator.cpp:47
GrResourceAllocator::ActualUse::kYes
@ kYes
GrResourceAllocator::AllowRecycling::kYes
@ kYes
GrResourceAllocator::curOp
unsigned int curOp() const
Definition:
GrResourceAllocator.h:85
GrSurfaceProxyView::proxy
GrSurfaceProxy * proxy() const
Definition:
GrSurfaceProxyView.h:62
i
int i
Definition:
fl_socket_accessible.cc:18
myers::get
const myers::Point & get(const myers::Segment &)
Generated on Sun Jun 23 2024 21:56:21 for Flutter Engine by
1.9.4