8#ifndef skgpu_graphite_CommandBuffer_DEFINED
9#define skgpu_graphite_CommandBuffer_DEFINED
22class RefCntedCallback;
23class MutableTextureState;
32class GraphicsPipeline;
46 bool hasWork() {
return fHasWork; }
97 size_t bufferRowBytes);
123 void releaseResources();
130 const Texture* depthStencilTexture,
145 size_t bufferRowBytes) = 0;
159 bool fHasWork =
false;
161 inline static constexpr int kInitialTrackedResourcesCount = 32;
162 template <
typename T>
static SkString resource(SkPDFResourceType type, int index)
virtual bool onClearBuffer(const Buffer *, size_t offset, size_t size)=0
virtual bool onAddComputePass(DispatchGroupSpan dispatchGroups)=0
skia_private::TArray< std::unique_ptr< DrawPass > > DrawPassList
virtual bool onSynchronizeBufferToCpu(const Buffer *, bool *outDidResultInWork)=0
bool clearBuffer(const Buffer *buffer, size_t offset, size_t size)
bool addRenderPass(const RenderPassDesc &, sk_sp< Texture > colorTexture, sk_sp< Texture > resolveTexture, sk_sp< Texture > depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses)
SkIVector fReplayTranslation
virtual bool setNewCommandBufferResources()=0
bool copyBufferToTexture(const Buffer *, sk_sp< Texture >, const BufferTextureCopyData *, int count)
void addBuffersToAsyncMapOnSubmit(SkSpan< const sk_sp< Buffer > >)
void clearReplayTranslation()
bool addComputePass(DispatchGroupSpan dispatchGroups)
virtual bool onCopyTextureToBuffer(const Texture *, SkIRect srcRect, const Buffer *, size_t bufferOffset, size_t bufferRowBytes)=0
SkSpan< const sk_sp< Buffer > > buffersToAsyncMapOnSubmit() const
virtual void addSignalSemaphores(size_t numWaitSemaphores, const BackendSemaphore *signalSemaphores)
virtual bool onAddRenderPass(const RenderPassDesc &, const Texture *colorTexture, const Texture *resolveTexture, const Texture *depthStencilTexture, SkRect viewport, const DrawPassList &drawPasses)=0
virtual bool onCopyBufferToBuffer(const Buffer *srcBuffer, size_t srcOffset, const Buffer *dstBuffer, size_t dstOffset, size_t size)=0
void resetCommandBuffer()
bool copyTextureToTexture(sk_sp< Texture > src, SkIRect srcRect, sk_sp< Texture > dst, SkIPoint dstPoint, int mipLevel)
virtual void onResetCommandBuffer()=0
bool copyTextureToBuffer(sk_sp< Texture >, SkIRect srcRect, sk_sp< Buffer >, size_t bufferOffset, size_t bufferRowBytes)
void trackResource(sk_sp< Resource > resource)
virtual void prepareSurfaceForStateUpdate(SkSurface *targetSurface, const MutableTextureState *newState)
virtual bool onCopyTextureToTexture(const Texture *src, SkIRect srcRect, const Texture *dst, SkIPoint dstPoint, int mipLevel)=0
virtual void addWaitSemaphores(size_t numWaitSemaphores, const BackendSemaphore *waitSemaphores)
void setReplayTranslation(SkIVector translation)
void addFinishedProc(sk_sp< RefCntedCallback > finishedProc)
bool synchronizeBufferToCpu(sk_sp< Buffer >)
virtual bool onCopyBufferToTexture(const Buffer *, const Texture *, const BufferTextureCopyData *, int count)=0
void callFinishedProcs(bool success)
SkSpan< const std::unique_ptr< DispatchGroup > > DispatchGroupSpan
bool copyBufferToBuffer(const Buffer *srcBuffer, size_t srcOffset, sk_sp< Buffer > dstBuffer, size_t dstOffset, size_t size)
void trackCommandBufferResource(sk_sp< Resource > resource)
std::function< ProfileSample(void)> Sampler
Sampler is run during SamplingProfiler::SampleRepeatedly. Each platform should implement its version ...
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