diff --git a/fbandroid/libraries/components/lib/yoga/src/main/cpp/yoga/Yoga-internal.h b/fbandroid/libraries/components/lib/yoga/src/main/cpp/yoga/Yoga-internal.h deleted file mode 100644 index ccc9e197..00000000 --- a/fbandroid/libraries/components/lib/yoga/src/main/cpp/yoga/Yoga-internal.h +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#pragma once -#include -#include -#include -#include -#include "Yoga.h" - -using YGVector = std::vector; - -YG_EXTERN_C_BEGIN - -WIN_EXPORT float YGRoundValueToPixelGrid( - const float value, - const float pointScaleFactor, - const bool forceCeil, - const bool forceFloor); - -YG_EXTERN_C_END - -extern const std::array trailing; -extern const std::array leading; -extern bool YGValueEqual(const YGValue a, const YGValue b); -extern const YGValue YGValueUndefined; -extern const YGValue YGValueAuto; -extern const YGValue YGValueZero; - -template -bool YGValueArrayEqual( - const std::array val1, - const std::array val2) { - bool areEqual = true; - for (uint32_t i = 0; i < size && areEqual; ++i) { - areEqual = YGValueEqual(val1[i], val2[i]); - } - return areEqual; -} - -const YGValue kYGValueUndefined = {YGUndefined, YGUnitUndefined}; -const YGValue kYGValueAuto = {YGUndefined, YGUnitAuto}; -const std::array kYGDefaultEdgeValuesUnit = { - {kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined, - kYGValueUndefined}}; -const std::array kYGDefaultDimensionValuesAutoUnit = { - {kYGValueAuto, kYGValueAuto}}; -const std::array kYGDefaultDimensionValuesUnit = { - {kYGValueUndefined, kYGValueUndefined}}; - -struct YGCachedMeasurement { - float availableWidth; - float availableHeight; - YGMeasureMode widthMeasureMode; - YGMeasureMode heightMeasureMode; - - float computedWidth; - float computedHeight; - - bool operator==(YGCachedMeasurement measurement) const { - bool isEqual = widthMeasureMode == measurement.widthMeasureMode && - heightMeasureMode == measurement.heightMeasureMode; - - if (!std::isnan(availableWidth) || - !std::isnan(measurement.availableWidth)) { - isEqual = isEqual && availableWidth == measurement.availableWidth; - } - if (!std::isnan(availableHeight) || - !std::isnan(measurement.availableHeight)) { - isEqual = isEqual && availableHeight == measurement.availableHeight; - } - if (!std::isnan(computedWidth) || !std::isnan(measurement.computedWidth)) { - isEqual = isEqual && computedWidth == measurement.computedWidth; - } - if (!std::isnan(computedHeight) || - !std::isnan(measurement.computedHeight)) { - isEqual = isEqual && computedHeight == measurement.computedHeight; - } - - return isEqual; - } -}; - -// This value was chosen based on empiracle data. Even the most complicated -// layouts should not require more than 16 entries to fit within the cache. -#define YG_MAX_CACHED_RESULT_COUNT 16 - -struct YGConfig { - bool experimentalFeatures[YGExperimentalFeatureCount + 1]; - bool useWebDefaults; - bool useLegacyStretchBehaviour; - bool shouldDiffLayoutWithoutLegacyStretchBehaviour; - float pointScaleFactor; - YGLogger logger; - YGNodeClonedFunc cloneNodeCallback; - void* context; -}; - -static const float kDefaultFlexGrow = 0.0f; -static const float kDefaultFlexShrink = 0.0f; -static const float kWebDefaultFlexShrink = 1.0f; - -extern bool YGFloatsEqual(const float a, const float b); -extern bool YGValueEqual(const YGValue a, const YGValue b); -extern const YGValue* YGComputedEdgeValue( - const std::array& edges, - const YGEdge edge, - const YGValue* const defaultValue);