From b58578e9354e22f7867618fddbc2777877a1e727 Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Tue, 23 Jun 2015 15:30:54 -0700 Subject: [PATCH] [rn] Add PerformanceOverlay to the inspector --- Libraries/Inspector/Inspector.js | 12 ++++ Libraries/Inspector/InspectorPanel.js | 14 ++++- Libraries/Inspector/PerformanceOverlay.js | 67 +++++++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 Libraries/Inspector/PerformanceOverlay.js diff --git a/Libraries/Inspector/Inspector.js b/Libraries/Inspector/Inspector.js index fa6e20e08..6b1ac5789 100644 --- a/Libraries/Inspector/Inspector.js +++ b/Libraries/Inspector/Inspector.js @@ -26,6 +26,7 @@ class Inspector extends React.Component { this.state = { panelPos: 'bottom', inspecting: true, + perfing: false, inspected: null, }; } @@ -59,9 +60,18 @@ class Inspector extends React.Component { }); } + setPerfing(val: bool) { + this.setState({ + perfing: val, + inspecting: false, + inspected: null, + }); + } + setInspecting(val: bool) { this.setState({ inspecting: val, + inspected: null }); } @@ -79,6 +89,8 @@ class Inspector extends React.Component { ); + } else if (this.props.perfing) { + contents = ( + + ); } else { contents = ( @@ -58,7 +63,12 @@ class InspectorPanel extends React.Component {