Files
yoga/yoga/YGConfig.h
David Aurelio 89394a2dd6 Data types for marker API
Summary:
@public

Adds types for a marker API in Yoga.

This will allow us to register callbacks that Yoga can use to log performance data without hard-coding the backend system for that.

Reviewed By: SidharthGuglani

Differential Revision: D13118830

fbshipit-source-id: b42a42c609f0cf66212186f7f20ee572522d59e3
2018-11-24 16:28:49 -08:00

27 lines
745 B
C++

/*
* 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.
*
*/
#pragma once
#include "YGMarker.h"
#include "Yoga-internal.h"
#include "Yoga.h"
struct YGConfig {
std::array<bool, YGExperimentalFeatureCount> experimentalFeatures = {};
bool useWebDefaults = false;
bool useLegacyStretchBehaviour = false;
bool shouldDiffLayoutWithoutLegacyStretchBehaviour = false;
bool printTree = false;
float pointScaleFactor = 1.0f;
YGLogger logger;
YGCloneNodeFunc cloneNodeCallback = nullptr;
void* context = nullptr;
YGMarkerCallbacks markerCallbacks = {nullptr, nullptr};
YGConfig(YGLogger logger);
};