Pass reason for measure pass along with measurecallbackend event (#566)
Summary: Pull Request resolved: https://github.com/facebook/litho/pull/566 Pull Request resolved: https://github.com/facebook/react-native/pull/25702 Pass reason for each measure callback to the flipper plugin Reviewed By: davidaurelio Differential Revision: D16221771 fbshipit-source-id: 2e72e1ebb3c7e633d189e7a7a81d655ac9531e51
This commit is contained in:
committed by
Facebook Github Bot
parent
5e40e4b682
commit
e6dfe04388
40
java/com/facebook/yoga/LayoutPassReason.java
Normal file
40
java/com/facebook/yoga/LayoutPassReason.java
Normal file
@@ -0,0 +1,40 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
package com.facebook.yoga;
|
||||
|
||||
public enum LayoutPassReason {
|
||||
INITIAL(0),
|
||||
MEASURE(1),
|
||||
ABS_MEASURE(2),
|
||||
FLEX(3),
|
||||
ABS_LAYOUT(4),
|
||||
STRETCH(5),
|
||||
MULTILINE_STRETCH(6);
|
||||
|
||||
private final int mIntValue;
|
||||
|
||||
LayoutPassReason(int intValue) {
|
||||
mIntValue = intValue;
|
||||
}
|
||||
|
||||
public int intValue() {
|
||||
return mIntValue;
|
||||
}
|
||||
|
||||
public static LayoutPassReason fromInt(int value) {
|
||||
switch (value) {
|
||||
case 0: return INITIAL;
|
||||
case 1: return MEASURE;
|
||||
case 2: return ABS_MEASURE;
|
||||
case 3: return FLEX;
|
||||
case 4: return ABS_LAYOUT;
|
||||
case 5: return STRETCH;
|
||||
case 6: return MULTILINE_STRETCH;
|
||||
default: throw new IllegalArgumentException("Unknown enum value: " + value);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user