5#import "flutter/shell/platform/darwin/ios/ios_surface_software.h"
7#include <QuartzCore/CALayer.h>
11#include "flutter/fml/logging.h"
12#include "flutter/fml/platform/darwin/cf_utils.h"
13#include "flutter/fml/trace_event.h"
23 std::shared_ptr<IOSContext> context)
44 auto surface = std::make_unique<GPUSurfaceSoftware>(
this,
true );
54 TRACE_EVENT0(
"flutter",
"IOSSurfaceSoftware::AcquireBackingStore");
59 if (sk_surface_ !=
nullptr &&
72 TRACE_EVENT0(
"flutter",
"IOSSurfaceSoftware::PresentBackingStore");
73 if (!
IsValid() || backing_store ==
nullptr) {
83 uint64_t expected_pixmap_data_size = pixmap.
width() * pixmap.
height() * 4;
87 if (expected_pixmap_data_size != pixmap_size) {
101 if (!pixmap_data_provider) {
112 kCGImageAlphaPremultipliedLast,
113 pixmap_data_provider,
116 kCGRenderingIntentDefault
123 layer_.
get().contents = (__bridge
id)(
static_cast<CGImageRef
>(pixmap_image));
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static sk_sp< SkColorSpace > MakeSRGB()
const uint32_t * addr32() const
size_t computeByteSize() const
bool peekPixels(SkPixmap *pixmap)
IOSSurfaceSoftware(const fml::scoped_nsobject< CALayer > &layer, std::shared_ptr< IOSContext > context)
~IOSSurfaceSoftware() override
bool PresentBackingStore(sk_sp< SkSurface > backing_store) override
Called by the platform when a frame has been rendered into the backing store and the platform must di...
void UpdateStorageSizeIfNecessary() override
sk_sp< SkSurface > AcquireBackingStore(const SkISize &size) override
Called when the GPU surface needs a new buffer to render a new frame into.
bool IsValid() const override
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context=nullptr) override
T get() const __attribute((ns_returns_not_retained))
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)
#define TRACE_EVENT0(category_group, name)