Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Start and end a frame in the RenderTargetCache for each rendering of an entity in the playgrounds #49576

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions impeller/entity/entity_playground.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ bool EntityPlayground::OpenPlaygroundHere(Entity entity) {
return false;
}
SinglePassCallback callback = [&](RenderPass& pass) -> bool {
return entity.Render(*content_context, pass);
content_context->GetRenderTargetCache()->Start();
bool result = entity.Render(*content_context, pass);
content_context->GetRenderTargetCache()->End();
return result;
};
return Playground::OpenPlaygroundHere(callback);
}
Expand All @@ -70,7 +73,10 @@ bool EntityPlayground::OpenPlaygroundHere(EntityPlaygroundCallback callback) {
wireframe = !wireframe;
content_context.SetWireframe(wireframe);
}
return callback(content_context, pass);
content_context.GetRenderTargetCache()->Start();
bool result = callback(content_context, pass);
content_context.GetRenderTargetCache()->End();
return result;
};
return Playground::OpenPlaygroundHere(pass_callback);
}
Expand Down