7#include "flutter/flow/layers/offscreen_surface.h"
24 if (surface_context) {
43 if (!potentially_gpu_snapshot) {
44 FML_LOG(
ERROR) <<
"Screenshot: unable to make image screenshot";
50 auto cpu_snapshot = potentially_gpu_snapshot->makeRasterImage();
52 FML_LOG(
ERROR) <<
"Screenshot: unable to make raster image";
64 if (!cpu_snapshot->peekPixels(&pixmap)) {
65 FML_LOG(
ERROR) <<
"Screenshot: unable to obtain bitmap pixels";
74 if (offscreen_surface_) {
88 return offscreen_surface_ !=
nullptr;
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
const uint32_t * addr32() const
size_t computeByteSize() const
sk_sp< SkImage > makeImageSnapshot()
Developer-facing API for rendering anything within the engine.
void set_canvas(SkCanvas *canvas)
sk_sp< SkData > GetRasterData(bool compressed) const
OffscreenSurface(GrDirectContext *surface_context, const SkISize &size)
#define FML_LOG(severity)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
static sk_sp< SkSurface > CreateSnapshotSurface(GrDirectContext *surface_context, const SkISize &size)
static sk_sp< SkData > GetRasterData(const sk_sp< SkSurface > &offscreen_surface, bool compressed)
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 SkImageInfo MakeN32Premul(int width, int height)