#include <dl_playground.h>
Definition at line 15 of file dl_playground.h.
◆ DisplayListPlaygroundCallback
◆ DlPlayground()
impeller::DlPlayground::DlPlayground |
( |
| ) |
|
|
default |
◆ ~DlPlayground()
impeller::DlPlayground::~DlPlayground |
( |
| ) |
|
|
default |
◆ CreateTestFont()
SkFont impeller::DlPlayground::CreateTestFont |
( |
| ) |
|
◆ CreateTestFontOfSize()
SkFont impeller::DlPlayground::CreateTestFontOfSize |
( |
SkScalar |
scalar | ) |
|
Definition at line 58 of file dl_playground.cc.
59 static constexpr
const char* kTestFontFixture =
"Roboto-Regular.ttf";
60 auto mapping = flutter::testing::OpenFixtureAsSkData(kTestFontFixture);
62 sk_sp<SkFontMgr> font_mgr = txt::GetDefaultFontManager();
63 return SkFont{font_mgr->makeFromData(mapping), scalar};
Referenced by CreateTestFont().
◆ OpenPlaygroundHere() [1/3]
Definition at line 31 of file dl_playground.cc.
37 if (!context.IsValid()) {
41 [&context, &callback](RenderTarget& render_target) ->
bool {
42 static bool wireframe =
false;
43 if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
44 wireframe = !wireframe;
45 context.GetContentContext().SetWireframe(wireframe);
48 auto list = callback();
50 DlDispatcher dispatcher;
51 list->Dispatch(dispatcher);
52 auto picture = dispatcher.EndRecordingAsPicture();
54 return context.Render(picture, render_target,
true);
References impeller::PlaygroundSwitches::enable_playground, impeller::DlDispatcher::EndRecordingAsPicture(), impeller::AiksContext::GetContentContext(), impeller::Playground::GetContext(), impeller::AiksContext::IsValid(), impeller::TypographerContextSkia::Make(), impeller::Playground::OpenPlaygroundHere(), impeller::AiksContext::Render(), and impeller::Playground::switches_.
◆ OpenPlaygroundHere() [2/3]
bool impeller::DlPlayground::OpenPlaygroundHere |
( |
flutter::DisplayListBuilder & |
builder | ) |
|
◆ OpenPlaygroundHere() [3/3]
bool impeller::DlPlayground::OpenPlaygroundHere |
( |
sk_sp< flutter::DisplayList > |
list | ) |
|
The documentation for this class was generated from the following files: