Remove API to constrain measure cache size
Summary: We conducted an experiment with different measure cache sizes. This has now been deallocatedi (D15183473). Remove the necessary APIs. Reviewed By: SidharthGuglani Differential Revision: D15183486 fbshipit-source-id: a38fa5a3ab0321c2521265f7d1cd6b495efd76cf
This commit is contained in:
committed by
Facebook Github Bot
parent
1adbafe950
commit
1e0ebdae2f
@@ -29,8 +29,6 @@ void YGNodeCalculateLayoutWithContext(
|
||||
YGDirection ownerDirection,
|
||||
void* layoutContext);
|
||||
|
||||
void YGSetUsedCachedEntries(size_t);
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
||||
namespace facebook {
|
||||
|
@@ -28,15 +28,6 @@ __forceinline const float fmaxf(const float a, const float b) {
|
||||
using namespace facebook::yoga;
|
||||
using detail::Log;
|
||||
|
||||
namespace {
|
||||
size_t usedMeasureCacheEntries = YG_MAX_CACHED_RESULT_COUNT;
|
||||
}
|
||||
|
||||
void YGSetUsedCachedEntries(size_t n) {
|
||||
usedMeasureCacheEntries =
|
||||
n == 0 || n > YG_MAX_CACHED_RESULT_COUNT ? YG_MAX_CACHED_RESULT_COUNT : n;
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
static int YGAndroidLog(
|
||||
const YGConfigRef config,
|
||||
@@ -3864,7 +3855,7 @@ bool YGLayoutNodeInternal(
|
||||
layoutMarkerData.maxMeasureCache =
|
||||
layout->nextCachedMeasurementsIndex + 1;
|
||||
}
|
||||
if (layout->nextCachedMeasurementsIndex == usedMeasureCacheEntries) {
|
||||
if (layout->nextCachedMeasurementsIndex == YG_MAX_CACHED_RESULT_COUNT) {
|
||||
if (gPrintChanges) {
|
||||
Log::log(node, YGLogLevelVerbose, nullptr, "Out of cache entries!\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user