9#include "third_party/imgui/imgui.h"
19 std::shared_ptr<TypographerContext> typographer_context) {
20 typographer_context_ = std::move(typographer_context);
29 if (!content_context.
IsValid()) {
40 return entity_pass.
Render(content_context, render_target);
46 return std::make_shared<ContentContext>(
GetContext(), typographer_context_);
55 if (!content_context->IsValid()) {
59 content_context->GetRenderTargetCache()->Start();
61 content_context->GetRenderTargetCache()->End();
62 content_context->GetTransientsBuffer().Reset();
74 if (!content_context.
IsValid()) {
78 static bool wireframe =
false;
79 if (ImGui::IsKeyPressed(ImGuiKey_Z)) {
80 wireframe = !wireframe;
const std::shared_ptr< RenderTargetAllocator > & GetRenderTargetCache() const
HostBuffer & GetTransientsBuffer() const
Retrieve the currnent host buffer for transient storage.
void SetWireframe(bool wireframe)
void PopAllClips(uint64_t depth)
bool Render(ContentContext &renderer, const RenderTarget &render_target) const
bool OpenPlaygroundHere(Entity entity)
std::shared_ptr< ContentContext > GetContentContext() const
std::function< bool(ContentContext &context, RenderPass &pass)> EntityPlaygroundCallback
void SetTypographerContext(std::shared_ptr< TypographerContext > typographer_context)
bool Render(const ContentContext &renderer, RenderPass &parent_pass) const
void Reset()
Resets the contents of the HostBuffer to nothing so it can be reused.
std::function< bool(RenderPass &pass)> SinglePassCallback
const PlaygroundSwitches switches_
std::shared_ptr< Context > GetContext() const
bool OpenPlaygroundHere(const Renderer::RenderCallback &render_callback)
Render passes encode render commands directed as one specific render target into an underlying comman...
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)