5#include "flutter/impeller/golden_tests/metal_screenshotter.h"
7#include <CoreImage/CoreImage.h>
10#define GLFW_INCLUDE_NONE
11#include "third_party/glfw/include/GLFW/glfw3.h"
29 scale_content ? playground_->GetContentScale() :
Vector2{1, 1};
34 id<MTLTexture> metal_texture =
35 std::static_pointer_cast<TextureMTL>(
texture)->GetMTLTexture();
37 CGColorSpaceRef color_space = CGColorSpaceCreateDeviceRGB();
38 CIImage* ciImage = [[CIImage alloc]
39 initWithMTLTexture:metal_texture
40 options:@{kCIImageColorSpace : (__bridge
id)color_space}];
41 CGColorSpaceRelease(color_space);
44 std::shared_ptr<Context> context = playground_->GetContext();
45 std::shared_ptr<ContextMTL> context_mtl =
46 std::static_pointer_cast<ContextMTL>(context);
47 CIContext* cicontext =
48 [CIContext contextWithMTLDevice:context_mtl->GetMTLDevice()];
51 CIImage* flipped = [ciImage
52 imageByApplyingOrientation:kCGImagePropertyOrientationDownMirrored];
54 CGImageRef cgImage = [cicontext createCGImage:flipped
55 fromRect:[ciImage extent]];
static std::unique_ptr< PlaygroundImpl > Create(PlaygroundBackend backend, PlaygroundSwitches switches)
#define FML_CHECK(condition)
sk_sp< const SkImage > image
sk_sp< const SkPicture > picture
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