5#ifndef FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_H_
6#define FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_H_
11#include "flutter/fml/status.h"
12#include "flutter/fml/time/time_delta.h"
86 std::shared_ptr<fml::Mapping> mapping);
89 const std::shared_ptr<CompressedImage>& compressed);
92 const std::shared_ptr<Context>& context,
93 std::shared_ptr<fml::Mapping> mapping,
94 bool enable_mipmapping =
false);
97 const char* fixture_name,
98 bool enable_mipmapping =
false)
const;
101 std::array<const char*, 6> fixture_names)
const;
106 std::string asset_name)
const = 0;
111 const std::shared_ptr<Capabilities>& capabilities);
126 std::unique_ptr<PlaygroundImpl> impl_;
127 std::shared_ptr<Context> context_;
128 std::unique_ptr<Renderer> renderer_;
129 Point cursor_position_;
Playground(PlaygroundSwitches switches)
std::shared_ptr< Context > MakeContext() const
bool IsPlaygroundEnabled() const
virtual bool ShouldKeepRendering() const
static bool ShouldOpenNewPlaygrounds()
Point GetCursorPosition() const
void SetWindowSize(ISize size)
static std::shared_ptr< CompressedImage > LoadFixtureImageCompressed(std::shared_ptr< fml::Mapping > mapping)
ISize GetWindowSize() const
std::function< bool(RenderPass &pass)> SinglePassCallback
void SetupContext(PlaygroundBackend backend, const PlaygroundSwitches &switches)
bool WillRenderSomething() const
virtual std::string GetWindowTitle() const =0
const PlaygroundSwitches switches_
std::shared_ptr< Context > GetContext() const
bool OpenPlaygroundHere(const Renderer::RenderCallback &render_callback)
static bool SupportsBackend(PlaygroundBackend backend)
static std::shared_ptr< Texture > CreateTextureForMapping(const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
virtual std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const =0
Point GetContentScale() const
std::shared_ptr< Texture > CreateTextureForFixture(const char *fixture_name, bool enable_mipmapping=false) const
Scalar GetSecondsElapsed() const
Get the amount of time elapsed from the start of the playground's execution.
static std::optional< DecompressedImage > DecodeImageRGBA(const std::shared_ptr< CompressedImage > &compressed)
std::shared_ptr< Texture > CreateTextureCubeForFixture(std::array< const char *, 6 > fixture_names) const
fml::Status SetCapabilities(const std::shared_ptr< Capabilities > &capabilities)
Render passes encode render commands directed as one specific render target into an underlying comman...
std::function< bool(RenderTarget &render_target)> RenderCallback
#define FML_UNREACHABLE()
Dart_NativeFunction function
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
std::string PlaygroundBackendToString(PlaygroundBackend backend)
constexpr RuntimeStageBackend PlaygroundBackendToRuntimeStageBackend(PlaygroundBackend backend)