8#ifndef skgpu_graphite_MtlBlitCommandEncoder_DEFINED
9#define skgpu_graphite_MtlBlitCommandEncoder_DEFINED
16#import <Metal/Metal.h>
26 id<MTLCommandBuffer> commandBuffer) {
29 sk_cfp<id<MTLBlitCommandEncoder>>
encoder =
30 sk_ret_cfp<id<MTLBlitCommandEncoder>>([commandBuffer blitCommandEncoder]);
36 const char*
getResourceType()
const override {
return "Metal Blit Command Encoder"; }
44#ifdef SK_BUILD_FOR_MAC
45 void synchronizeResource(id<MTLBuffer>
buffer) {
46 [(*fCommandEncoder) synchronizeResource:
buffer];
52 range:NSMakeRange(bufferOffset, bytes)
60 size_t bufferRowBytes) {
64 sourceOrigin: MTLOriginMake(srcRect.
left(), srcRect.
top(), 0)
65 sourceSize: MTLSizeMake(srcRect.
width(), srcRect.
height(), 1)
67 destinationOffset: bufferOffset
68 destinationBytesPerRow: bufferRowBytes
69 destinationBytesPerImage: bufferRowBytes * srcRect.
height()];
74 size_t bufferRowBytes,
77 unsigned int dstLevel) {
79 sourceOffset: bufferOffset
80 sourceBytesPerRow: bufferRowBytes
81 sourceBytesPerImage: bufferRowBytes * dstRect.
height()
82 sourceSize: MTLSizeMake(dstRect.
width(), dstRect.
height(), 1)
85 destinationLevel: dstLevel
86 destinationOrigin: MTLOriginMake(dstRect.
left(), dstRect.
top(), 0)];
91 id<MTLTexture> dstTexture,
97 sourceOrigin: MTLOriginMake(srcRect.
x(), srcRect.
y(), 0)
98 sourceSize: MTLSizeMake(srcRect.
width(), srcRect.
height(), 1)
101 destinationLevel: mipLevel
102 destinationOrigin: MTLOriginMake(dstPoint.
fX, dstPoint.
fY, 0)];
107 id<MTLBuffer> dstBuffer,
111 sourceOffset: srcOffset
113 destinationOffset: dstOffset
123 sk_cfp<id<MTLBlitCommandEncoder>>
encoder)
130 void freeGpuData()
override {
131 fCommandEncoder.reset();
134 sk_cfp<id<MTLBlitCommandEncoder>> fCommandEncoder;
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
void fillBuffer(id< MTLBuffer > buffer, size_t bufferOffset, size_t bytes, uint8_t value)
void pushDebugGroup(NSString *string)
static sk_sp< MtlBlitCommandEncoder > Make(const SharedContext *sharedContext, id< MTLCommandBuffer > commandBuffer)
void copyFromTexture(id< MTLTexture > texture, SkIRect srcRect, id< MTLBuffer > buffer, size_t bufferOffset, size_t bufferRowBytes)
void copyTextureToTexture(id< MTLTexture > srcTexture, SkIRect srcRect, id< MTLTexture > dstTexture, SkIPoint dstPoint, int mipLevel)
const char * getResourceType() const override
void copyBufferToBuffer(id< MTLBuffer > srcBuffer, size_t srcOffset, id< MTLBuffer > dstBuffer, size_t dstOffset, size_t size)
void copyFromBuffer(id< MTLBuffer > buffer, size_t bufferOffset, size_t bufferRowBytes, id< MTLTexture > texture, SkIRect dstRect, unsigned int dstLevel)
const SharedContext * sharedContext() const
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
constexpr int32_t x() const
constexpr int32_t y() const
constexpr int32_t top() const
constexpr int32_t height() const
constexpr int32_t width() const
constexpr int32_t left() const