Pass layout context for Event::LayoutPassStart

Summary: Adds the layout context pointer when publishing `Event::LayoutPassStart`.

Reviewed By: SidharthGuglani

Differential Revision: D15754425

fbshipit-source-id: 6295ae1ebec9eab72a79c43bc1cb0e05a6d7ae68
This commit is contained in:
David Aurelio
2019-06-11 01:37:19 -07:00
committed by Facebook Github Bot
parent 204e849218
commit 19fd066507
2 changed files with 6 additions and 1 deletions

View File

@@ -4013,7 +4013,7 @@ void YGNodeCalculateLayoutWithContext(
void* layoutContext) {
#ifdef YG_ENABLE_EVENTS
Event::publish<Event::LayoutPassStart>(node);
Event::publish<Event::LayoutPassStart>(node, {layoutContext});
#endif
// unique pointer to allow ending the marker early
std::unique_ptr<marker::MarkerSection<YGMarkerLayout>> marker{

View File

@@ -72,6 +72,11 @@ struct Event::TypedData<Event::NodeDeallocation> {
YGConfig* config;
};
template <>
struct Event::TypedData<Event::LayoutPassStart> {
void* layoutContext;
};
template <>
struct Event::TypedData<Event::LayoutPassEnd> {
void* layoutContext;