2 * Copyright (c) 2014-present, Facebook, Inc.
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
9 #include "YGFloatOptional.h"
10 #include "Yoga-internal.h"
13 std::array<float, 4> position;
14 std::array<float, 2> dimensions;
15 std::array<float, 6> margin;
16 std::array<float, 6> border;
17 std::array<float, 6> padding;
18 YGDirection direction;
20 uint32_t computedFlexBasisGeneration;
21 YGFloatOptional computedFlexBasis;
24 // Instead of recomputing the entire layout every single time, we
25 // cache some information to break early when nothing changed
26 uint32_t generationCount;
27 YGDirection lastOwnerDirection;
29 uint32_t nextCachedMeasurementsIndex;
30 std::array<YGCachedMeasurement, YG_MAX_CACHED_RESULT_COUNT>
32 std::array<float, 2> measuredDimensions;
34 YGCachedMeasurement cachedLayout;
35 bool didUseLegacyFlag;
36 bool doesLegacyStretchFlagAffectsLayout;
40 bool operator==(const YGLayout& layout) const;
41 bool operator!=(const YGLayout& layout) const;