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:
committed by
Facebook Github Bot
parent
204e849218
commit
19fd066507
@@ -4013,7 +4013,7 @@ void YGNodeCalculateLayoutWithContext(
|
|||||||
void* layoutContext) {
|
void* layoutContext) {
|
||||||
|
|
||||||
#ifdef YG_ENABLE_EVENTS
|
#ifdef YG_ENABLE_EVENTS
|
||||||
Event::publish<Event::LayoutPassStart>(node);
|
Event::publish<Event::LayoutPassStart>(node, {layoutContext});
|
||||||
#endif
|
#endif
|
||||||
// unique pointer to allow ending the marker early
|
// unique pointer to allow ending the marker early
|
||||||
std::unique_ptr<marker::MarkerSection<YGMarkerLayout>> marker{
|
std::unique_ptr<marker::MarkerSection<YGMarkerLayout>> marker{
|
||||||
|
@@ -72,6 +72,11 @@ struct Event::TypedData<Event::NodeDeallocation> {
|
|||||||
YGConfig* config;
|
YGConfig* config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
struct Event::TypedData<Event::LayoutPassStart> {
|
||||||
|
void* layoutContext;
|
||||||
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct Event::TypedData<Event::LayoutPassEnd> {
|
struct Event::TypedData<Event::LayoutPassEnd> {
|
||||||
void* layoutContext;
|
void* layoutContext;
|
||||||
|
Reference in New Issue
Block a user