Skip to content

Commit

Permalink
Move NodeToString.cpp to benchmark and remove interal usages
Browse files Browse the repository at this point in the history
Summary:
X-link: facebook/react-native#42710

X-link: facebook/yoga#1568

This is no longer going to be built with normal yoga so we are going to switch to a public API

Reviewed By: NickGerleman

Differential Revision: D53141235

fbshipit-source-id: 259270a4cd91ef0dab91cefba9c41953b6340d78
  • Loading branch information
joevilches authored and facebook-github-bot committed Feb 2, 2024
1 parent 950cab9 commit 071b639
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 260 deletions.
9 changes: 0 additions & 9 deletions lib/yoga/src/main/cpp/yoga/algorithm/CalculateLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <yoga/algorithm/TrailingPosition.h>
#include <yoga/debug/AssertFatal.h>
#include <yoga/debug/Log.h>
#include <yoga/debug/NodeToString.h>
#include <yoga/event/event.h>
#include <yoga/node/Node.h>
#include <yoga/numeric/Comparison.h>
Expand Down Expand Up @@ -2366,14 +2365,6 @@ void calculateLayout(
node->setPosition(
node->getLayout().direction(), ownerWidth, ownerHeight, ownerWidth);
roundLayoutResultsToPixelGrid(node, 0.0f, 0.0f);

#ifdef DEBUG
if (node->getConfig()->shouldPrintTree()) {
yoga::print(
node,
PrintOptions::Layout | PrintOptions::Children | PrintOptions::Style);
}
#endif
}

Event::publish<Event::LayoutPassEnd>(node, {&markerData});
Expand Down
8 changes: 0 additions & 8 deletions lib/yoga/src/main/cpp/yoga/config/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ bool Config::useWebDefaults() const {
return useWebDefaults_;
}

void Config::setShouldPrintTree(bool printTree) {
printTree_ = printTree;
}

bool Config::shouldPrintTree() const {
return printTree_;
}

void Config::setExperimentalFeatureEnabled(
ExperimentalFeature feature,
bool enabled) {
Expand Down
4 changes: 0 additions & 4 deletions lib/yoga/src/main/cpp/yoga/config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ class YG_EXPORT Config : public ::YGConfig {
void setUseWebDefaults(bool useWebDefaults);
bool useWebDefaults() const;

void setShouldPrintTree(bool printTree);
bool shouldPrintTree() const;

void setExperimentalFeatureEnabled(ExperimentalFeature feature, bool enabled);
bool isExperimentalFeatureEnabled(ExperimentalFeature feature) const;
ExperimentalFeatureSet getEnabledExperiments() const;
Expand Down Expand Up @@ -74,7 +71,6 @@ class YG_EXPORT Config : public ::YGConfig {
YGLogger logger_;

bool useWebDefaults_ : 1 = false;
bool printTree_ : 1 = false;

ExperimentalFeatureSet experimentalFeatures_{};
Errata errata_ = Errata::None;
Expand Down
210 changes: 0 additions & 210 deletions lib/yoga/src/main/cpp/yoga/debug/NodeToString.cpp

This file was deleted.

29 changes: 0 additions & 29 deletions lib/yoga/src/main/cpp/yoga/debug/NodeToString.h

This file was deleted.

0 comments on commit 071b639

Please sign in to comment.