7#include "flutter/testing/testing.h"
12#include "third_party/imgui/imgui.h"
18#define ENABLE_EXPERIMENTAL_CANVAS false
45 static bool wireframe =
false;
46 if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
47 wireframe = !wireframe;
53#if ENABLE_EXPERIMENTAL_CANVAS
55 list->Dispatch(collector);
59 display_list->root_has_backdrop_filter(),
61 list->Dispatch(impeller_dispatcher);
68 list->Dispatch(dispatcher);
77 static constexpr const char* kTestFontFixture =
"Roboto-Regular.ttf";
89 const char* fixture_name,
90 bool enable_mipmapping)
const {
91 std::shared_ptr<fml::Mapping> mapping =
96 texture->SetLabel(fixture_name);
sk_sp< SkTypeface > makeFromData(sk_sp< SkData >, int ttcIndex=0) const
ContentContext & GetContentContext() const
bool Render(const Picture &picture, RenderTarget &render_target, bool reset_host_buffer)
const std::shared_ptr< LazyGlyphAtlas > & GetLazyGlyphAtlas() const
HostBuffer & GetTransientsBuffer() const
Retrieve the currnent host buffer for transient storage.
Picture EndRecordingAsPicture()
static sk_sp< DlImageImpeller > Make(std::shared_ptr< Texture > texture, OwningContext owning_context=OwningContext::kIO)
bool OpenPlaygroundHere(flutter::DisplayListBuilder &builder)
SkFont CreateTestFontOfSize(SkScalar scalar)
sk_sp< flutter::DlImage > CreateDlImageForFixture(const char *fixture_name, bool enable_mipmapping=false) const
std::function< sk_sp< flutter::DisplayList >()> DisplayListPlaygroundCallback
void Reset()
Resets the contents of the HostBuffer to nothing so it can be reused.
const PlaygroundSwitches switches_
std::shared_ptr< Context > GetContext() const
bool OpenPlaygroundHere(const Renderer::RenderCallback &render_callback)
static std::shared_ptr< Texture > CreateTextureForMapping(const std::shared_ptr< Context > &context, std::shared_ptr< fml::Mapping > mapping, bool enable_mipmapping=false)
Performs a first pass over the display list to collect all text frames.
static std::shared_ptr< TypographerContext > Make()
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_CHECK(condition)
sk_sp< const SkPicture > picture
sk_sp< SkData > OpenFixtureAsSkData(const std::string &fixture_name)
Opens a fixture of the given file name and returns a Skia SkData holding its contents.
std::unique_ptr< fml::Mapping > OpenFixtureAsMapping(const std::string &fixture_name)
Opens a fixture of the given file name and returns a mapping to its contents.
sk_sp< SkFontMgr > GetDefaultFontManager(uint32_t font_initialization_data)
A 4x4 matrix using column-major storage.
static constexpr TRect MakeMaximum()