#include <CommandBuffer.h>
|
virtual | ~CommandBuffer () |
|
void | trackResource (sk_sp< Resource > resource) |
|
void | trackCommandBufferResource (sk_sp< Resource > resource) |
|
void | resetCommandBuffer () |
|
virtual bool | setNewCommandBufferResources ()=0 |
|
void | addFinishedProc (sk_sp< RefCntedCallback > finishedProc) |
|
void | callFinishedProcs (bool success) |
|
virtual void | addWaitSemaphores (size_t numWaitSemaphores, const BackendSemaphore *waitSemaphores) |
|
virtual void | addSignalSemaphores (size_t numWaitSemaphores, const BackendSemaphore *signalSemaphores) |
|
virtual void | prepareSurfaceForStateUpdate (SkSurface *targetSurface, const MutableTextureState *newState) |
|
void | addBuffersToAsyncMapOnSubmit (SkSpan< const sk_sp< Buffer > >) |
|
SkSpan< const sk_sp< Buffer > > | buffersToAsyncMapOnSubmit () const |
|
bool | addRenderPass (const RenderPassDesc &, sk_sp< Texture > colorTexture, sk_sp< Texture > resolveTexture, sk_sp< Texture > depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses) |
|
bool | addComputePass (DispatchGroupSpan dispatchGroups) |
|
bool | copyBufferToBuffer (const Buffer *srcBuffer, size_t srcOffset, sk_sp< Buffer > dstBuffer, size_t dstOffset, size_t size) |
|
bool | copyTextureToBuffer (sk_sp< Texture >, SkIRect srcRect, sk_sp< Buffer >, size_t bufferOffset, size_t bufferRowBytes) |
|
bool | copyBufferToTexture (const Buffer *, sk_sp< Texture >, const BufferTextureCopyData *, int count) |
|
bool | copyTextureToTexture (sk_sp< Texture > src, SkIRect srcRect, sk_sp< Texture > dst, SkIPoint dstPoint, int mipLevel) |
|
bool | synchronizeBufferToCpu (sk_sp< Buffer >) |
|
bool | clearBuffer (const Buffer *buffer, size_t offset, size_t size) |
|
void | setReplayTranslation (SkIVector translation) |
|
void | clearReplayTranslation () |
|
|
virtual void | onResetCommandBuffer ()=0 |
|
virtual bool | onAddRenderPass (const RenderPassDesc &, const Texture *colorTexture, const Texture *resolveTexture, const Texture *depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses)=0 |
|
virtual bool | onAddComputePass (DispatchGroupSpan dispatchGroups)=0 |
|
virtual bool | onCopyBufferToBuffer (const Buffer *srcBuffer, size_t srcOffset, const Buffer *dstBuffer, size_t dstOffset, size_t size)=0 |
|
virtual bool | onCopyTextureToBuffer (const Texture *, SkIRect srcRect, const Buffer *, size_t bufferOffset, size_t bufferRowBytes)=0 |
|
virtual bool | onCopyBufferToTexture (const Buffer *, const Texture *, const BufferTextureCopyData *, int count)=0 |
|
virtual bool | onCopyTextureToTexture (const Texture *src, SkIRect srcRect, const Texture *dst, SkIPoint dstPoint, int mipLevel)=0 |
|
virtual bool | onSynchronizeBufferToCpu (const Buffer *, bool *outDidResultInWork)=0 |
|
virtual bool | onClearBuffer (const Buffer *, size_t offset, size_t size)=0 |
|
Definition at line 38 of file CommandBuffer.h.
◆ DispatchGroupSpan
◆ DrawPassList
◆ ~CommandBuffer()
skgpu::graphite::CommandBuffer::~CommandBuffer |
( |
| ) |
|
|
virtual |
◆ CommandBuffer()
skgpu::graphite::CommandBuffer::CommandBuffer |
( |
| ) |
|
|
protected |
◆ addBuffersToAsyncMapOnSubmit()
void skgpu::graphite::CommandBuffer::addBuffersToAsyncMapOnSubmit |
( |
SkSpan< const sk_sp< Buffer > > |
buffers | ) |
|
Definition at line 64 of file CommandBuffer.cpp.
64 {
65 for (
size_t i = 0;
i < buffers.
size(); ++
i) {
67 fBuffersToAsyncMap.push_back(buffers[
i]);
68 }
69}
constexpr size_t size() const
◆ addComputePass()
bool skgpu::graphite::CommandBuffer::addComputePass |
( |
DispatchGroupSpan |
dispatchGroups | ) |
|
Definition at line 110 of file CommandBuffer.cpp.
110 {
112
114 return false;
115 }
116
118
119 return true;
120}
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
virtual bool onAddComputePass(DispatchGroupSpan dispatchGroups)=0
#define TRACE_EVENT0(category_group, name)
◆ addFinishedProc()
Definition at line 51 of file CommandBuffer.cpp.
51 {
52 fFinishedProcs.push_back(std::move(finishedProc));
53}
◆ addRenderPass()
Definition at line 75 of file CommandBuffer.cpp.
80 {
82
87 depthStencilTexture.
get(),
88 viewport,
89 drawPasses)) {
90 return false;
91 }
92
93 if (colorTexture) {
95 }
96 if (resolveTexture) {
98 }
99 if (depthStencilTexture) {
101 }
102
103
104
106
107 return true;
108}
virtual bool onAddRenderPass(const RenderPassDesc &, const Texture *colorTexture, const Texture *resolveTexture, const Texture *depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses)=0
void trackCommandBufferResource(sk_sp< Resource > resource)
◆ addSignalSemaphores()
virtual void skgpu::graphite::CommandBuffer::addSignalSemaphores |
( |
size_t |
numWaitSemaphores, |
|
|
const BackendSemaphore * |
signalSemaphores |
|
) |
| |
|
inlinevirtual |
◆ addWaitSemaphores()
virtual void skgpu::graphite::CommandBuffer::addWaitSemaphores |
( |
size_t |
numWaitSemaphores, |
|
|
const BackendSemaphore * |
waitSemaphores |
|
) |
| |
|
inlinevirtual |
◆ buffersToAsyncMapOnSubmit()
SkSpan< const sk_sp< Buffer > > skgpu::graphite::CommandBuffer::buffersToAsyncMapOnSubmit |
( |
| ) |
const |
◆ callFinishedProcs()
void skgpu::graphite::CommandBuffer::callFinishedProcs |
( |
bool |
success | ) |
|
Definition at line 55 of file CommandBuffer.cpp.
55 {
56 if (!success) {
57 for (
int i = 0;
i < fFinishedProcs.size(); ++
i) {
58 fFinishedProcs[
i]->setFailureResult();
59 }
60 }
61 fFinishedProcs.clear();
62}
◆ clearBuffer()
bool skgpu::graphite::CommandBuffer::clearBuffer |
( |
const Buffer * |
buffer, |
|
|
size_t |
offset, |
|
|
size_t |
size |
|
) |
| |
Definition at line 222 of file CommandBuffer.cpp.
222 {
224
226 return false;
227 }
228
230
231 return true;
232}
virtual bool onClearBuffer(const Buffer *, size_t offset, size_t size)=0
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
◆ clearReplayTranslation()
void skgpu::graphite::CommandBuffer::clearReplayTranslation |
( |
| ) |
|
|
inline |
◆ copyBufferToBuffer()
bool skgpu::graphite::CommandBuffer::copyBufferToBuffer |
( |
const Buffer * |
srcBuffer, |
|
|
size_t |
srcOffset, |
|
|
sk_sp< Buffer > |
dstBuffer, |
|
|
size_t |
dstOffset, |
|
|
size_t |
size |
|
) |
| |
Definition at line 122 of file CommandBuffer.cpp.
126 {
129
131 return false;
132 }
133
135
137
138 return true;
139}
virtual bool onCopyBufferToBuffer(const Buffer *srcBuffer, size_t srcOffset, const Buffer *dstBuffer, size_t dstOffset, size_t size)=0
void trackResource(sk_sp< Resource > resource)
◆ copyBufferToTexture()
Definition at line 162 of file CommandBuffer.cpp.
165 {
169
171 return false;
172 }
173
175
177
178 return true;
179}
virtual bool onCopyBufferToTexture(const Buffer *, const Texture *, const BufferTextureCopyData *, int count)=0
◆ copyTextureToBuffer()
bool skgpu::graphite::CommandBuffer::copyTextureToBuffer |
( |
sk_sp< Texture > |
texture, |
|
|
SkIRect |
srcRect, |
|
|
sk_sp< Buffer > |
buffer, |
|
|
size_t |
bufferOffset, |
|
|
size_t |
bufferRowBytes |
|
) |
| |
Definition at line 141 of file CommandBuffer.cpp.
145 {
148
150 bufferRowBytes)) {
151 return false;
152 }
153
156
158
159 return true;
160}
virtual bool onCopyTextureToBuffer(const Texture *, SkIRect srcRect, const Buffer *, size_t bufferOffset, size_t bufferRowBytes)=0
◆ copyTextureToTexture()
Definition at line 181 of file CommandBuffer.cpp.
185 {
190 SKGPU_LOG_E(
"Can't copy from protected memory to non-protected");
191 return false;
192 }
193
195 return false;
196 }
197
200
202
203 return true;
204}
#define SKGPU_LOG_E(fmt,...)
virtual bool onCopyTextureToTexture(const Texture *src, SkIRect srcRect, const Texture *dst, SkIPoint dstPoint, int mipLevel)=0
◆ onAddComputePass()
virtual bool skgpu::graphite::CommandBuffer::onAddComputePass |
( |
DispatchGroupSpan |
dispatchGroups | ) |
|
|
privatepure virtual |
◆ onAddRenderPass()
◆ onClearBuffer()
virtual bool skgpu::graphite::CommandBuffer::onClearBuffer |
( |
const Buffer * |
, |
|
|
size_t |
offset, |
|
|
size_t |
size |
|
) |
| |
|
privatepure virtual |
◆ onCopyBufferToBuffer()
virtual bool skgpu::graphite::CommandBuffer::onCopyBufferToBuffer |
( |
const Buffer * |
srcBuffer, |
|
|
size_t |
srcOffset, |
|
|
const Buffer * |
dstBuffer, |
|
|
size_t |
dstOffset, |
|
|
size_t |
size |
|
) |
| |
|
privatepure virtual |
◆ onCopyBufferToTexture()
◆ onCopyTextureToBuffer()
virtual bool skgpu::graphite::CommandBuffer::onCopyTextureToBuffer |
( |
const Texture * |
, |
|
|
SkIRect |
srcRect, |
|
|
const Buffer * |
, |
|
|
size_t |
bufferOffset, |
|
|
size_t |
bufferRowBytes |
|
) |
| |
|
privatepure virtual |
◆ onCopyTextureToTexture()
virtual bool skgpu::graphite::CommandBuffer::onCopyTextureToTexture |
( |
const Texture * |
src, |
|
|
SkIRect |
srcRect, |
|
|
const Texture * |
dst, |
|
|
SkIPoint |
dstPoint, |
|
|
int |
mipLevel |
|
) |
| |
|
privatepure virtual |
◆ onResetCommandBuffer()
virtual void skgpu::graphite::CommandBuffer::onResetCommandBuffer |
( |
| ) |
|
|
privatepure virtual |
◆ onSynchronizeBufferToCpu()
virtual bool skgpu::graphite::CommandBuffer::onSynchronizeBufferToCpu |
( |
const Buffer * |
, |
|
|
bool * |
outDidResultInWork |
|
) |
| |
|
privatepure virtual |
◆ prepareSurfaceForStateUpdate()
virtual void skgpu::graphite::CommandBuffer::prepareSurfaceForStateUpdate |
( |
SkSurface * |
targetSurface, |
|
|
const MutableTextureState * |
newState |
|
) |
| |
|
inlinevirtual |
◆ resetCommandBuffer()
void skgpu::graphite::CommandBuffer::resetCommandBuffer |
( |
| ) |
|
Definition at line 35 of file CommandBuffer.cpp.
35 {
37
38 this->releaseResources();
40 fBuffersToAsyncMap.clear();
41}
virtual void onResetCommandBuffer()=0
◆ setNewCommandBufferResources()
virtual bool skgpu::graphite::CommandBuffer::setNewCommandBufferResources |
( |
| ) |
|
|
pure virtual |
◆ setReplayTranslation()
void skgpu::graphite::CommandBuffer::setReplayTranslation |
( |
SkIVector |
translation | ) |
|
|
inline |
◆ synchronizeBufferToCpu()
bool skgpu::graphite::CommandBuffer::synchronizeBufferToCpu |
( |
sk_sp< Buffer > |
buffer | ) |
|
Definition at line 206 of file CommandBuffer.cpp.
206 {
208
209 bool didResultInWork = false;
211 return false;
212 }
213
214 if (didResultInWork) {
217 }
218
219 return true;
220}
virtual bool onSynchronizeBufferToCpu(const Buffer *, bool *outDidResultInWork)=0
◆ trackCommandBufferResource()
void skgpu::graphite::CommandBuffer::trackCommandBufferResource |
( |
sk_sp< Resource > |
resource | ) |
|
Definition at line 47 of file CommandBuffer.cpp.
47 {
48 fCommandBufferResources.push_back(std::move(
resource));
49}
static SkString resource(SkPDFResourceType type, int index)
◆ trackResource()
void skgpu::graphite::CommandBuffer::trackResource |
( |
sk_sp< Resource > |
resource | ) |
|
◆ fRenderPassSize
SkISize skgpu::graphite::CommandBuffer::fRenderPassSize |
|
protected |
◆ fReplayTranslation
SkIVector skgpu::graphite::CommandBuffer::fReplayTranslation |
|
protected |
The documentation for this class was generated from the following files: