Publish events for layout pass

Summary:
Adds `LayoutPassStart` and `LayoutPassEnd` events.

The existing `NodeLayout` event in isolation is not as useful as it could be. Having events that mark start and end of a layout pass are a useful addition.

Differential Revision: D15305467

fbshipit-source-id: 14af6f65e698fb1e3112eb2ffd87a74d31df4840
This commit is contained in:
David Aurelio
2019-05-10 18:55:53 -07:00
committed by Facebook Github Bot
parent 74fc37efc8
commit a15bf6e701
3 changed files with 27 additions and 3 deletions

View File

@@ -15,7 +15,13 @@ namespace facebook {
namespace yoga {
struct Event {
enum Type { NodeAllocation, NodeDeallocation, NodeLayout };
enum Type {
NodeAllocation,
NodeDeallocation,
NodeLayout,
LayoutPassStart,
LayoutPassEnd
};
class Data;
using Subscriber = void(const YGNode&, Type, Data);