 |
Flutter Impeller
|
|
Go to the documentation of this file.
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"
87 std::shared_ptr<fml::Mapping> mapping);
90 const std::shared_ptr<CompressedImage>& compressed);
93 const std::shared_ptr<Context>& context,
94 std::shared_ptr<fml::Mapping> mapping,
95 bool enable_mipmapping =
false);
98 const char* fixture_name,
99 bool enable_mipmapping =
false)
const;
102 std::array<const char*, 6> fixture_names)
const;
107 std::string asset_name)
const = 0;
112 const std::shared_ptr<Capabilities>& capabilities);
128 fml::TimeDelta start_time_;
129 std::unique_ptr<PlaygroundImpl> impl_;
130 std::shared_ptr<Context> context_;
131 Point cursor_position_;
134 void SetCursorPosition(
Point pos);
143 #endif // FLUTTER_IMPELLER_PLAYGROUND_PLAYGROUND_H_
static bool ShouldOpenNewPlaygrounds()
std::shared_ptr< Texture > CreateTextureCubeForFixture(std::array< const char *, 6 > fixture_names) const
bool WillRenderSomething() const
Returns true if OpenPlaygroundHere will actually render anything.
virtual bool ShouldKeepRendering() const
static std::optional< DecompressedImage > DecodeImageRGBA(const std::shared_ptr< CompressedImage > &compressed)
Scalar GetSecondsElapsed() const
Get the amount of time elapsed from the start of the playground's execution.
ISize GetWindowSize() const
std::string PlaygroundBackendToString(PlaygroundBackend backend)
std::shared_ptr< Context > MakeContext() const
constexpr RuntimeStageBackend PlaygroundBackendToRuntimeStageBackend(PlaygroundBackend backend)
std::function< bool(RenderTarget &render_target)> RenderCallback
bool OpenPlaygroundHere(const RenderCallback &render_callback)
GLProcAddressResolver CreateGLProcAddressResolver() const
const PlaygroundSwitches switches_
bool IsPlaygroundEnabled() const
std::function< bool(RenderPass &pass)> SinglePassCallback
void SetupContext(PlaygroundBackend backend, const PlaygroundSwitches &switches)
Render passes encode render commands directed as one specific render target into an underlying comman...
static std::shared_ptr< Texture > CreateTextureForMapping(const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
Point GetContentScale() const
static std::shared_ptr< CompressedImage > LoadFixtureImageCompressed(std::shared_ptr< fml::Mapping > mapping)
virtual std::string GetWindowTitle() const =0
virtual std::unique_ptr< fml::Mapping > OpenAssetAsMapping(std::string asset_name) const =0
fml::Status SetCapabilities(const std::shared_ptr< Capabilities > &capabilities)
Point GetCursorPosition() const
static bool SupportsBackend(PlaygroundBackend backend)
Playground(PlaygroundSwitches switches)
std::shared_ptr< Context > GetContext() const
std::function< void *(const char *proc_name)> GLProcAddressResolver
void SetWindowSize(ISize size)
std::shared_ptr< Texture > CreateTextureForFixture(const char *fixture_name, bool enable_mipmapping=false) const