-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
ReanimatedHiddenHeaders
, LoggerInterface
and SpeedChecker
(
#6363) ## Summary This PR removes some rusty and unused parts of the code like `SpeedChecker` as well as removes `Logger` and `LoggerInterface` in favor of static `PlatformLogger` which also enables us to finally get rid of `ReanimatedHiddenHeaders` and `hidden_headers` along with its configuration in `CMakeLists.txt` and `RNReanimated.podspec`. ## Test plan --------- Co-authored-by: Tomasz Żelawski <[email protected]>
- Loading branch information
Showing
18 changed files
with
81 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/react-native-reanimated/Common/cpp/reanimated/Tools/PlatformLogger.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace reanimated { | ||
|
||
class PlatformLogger { | ||
public: | ||
static void log(const char *str); | ||
static void log(const std::string &str); | ||
static void log(const double d); | ||
static void log(const int i); | ||
static void log(const bool b); | ||
}; | ||
|
||
} // namespace reanimated |
11 changes: 0 additions & 11 deletions
11
packages/react-native-reanimated/Common/cpp/worklets/Tools/ReanimatedHiddenHeaders.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
packages/react-native-reanimated/Common/cpp/worklets/hidden_headers/Logger.h
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/react-native-reanimated/Common/cpp/worklets/hidden_headers/LoggerInterface.h
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
packages/react-native-reanimated/Common/cpp/worklets/hidden_headers/SpeedChecker.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
packages/react-native-reanimated/android/src/main/cpp/AndroidLogger.cpp
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/react-native-reanimated/android/src/main/cpp/AndroidLogger.h
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/react-native-reanimated/android/src/main/cpp/LayoutAnimations.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/react-native-reanimated/android/src/main/cpp/PlatformLogger.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <android/log.h> | ||
|
||
#include "PlatformLogger.h" | ||
|
||
constexpr const auto tag = "Reanimated"; | ||
|
||
namespace reanimated { | ||
|
||
void PlatformLogger::log(const char *str) { | ||
__android_log_print(ANDROID_LOG_VERBOSE, tag, "%s", str); | ||
} | ||
|
||
void PlatformLogger::log(const std::string &str) { | ||
log(str.c_str()); | ||
} | ||
|
||
void PlatformLogger::log(const double d) { | ||
__android_log_print(ANDROID_LOG_VERBOSE, tag, "%f", d); | ||
} | ||
|
||
void PlatformLogger::log(const int i) { | ||
__android_log_print(ANDROID_LOG_VERBOSE, tag, "%d", i); | ||
} | ||
|
||
void PlatformLogger::log(const bool b) { | ||
log(b ? "true" : "false"); | ||
} | ||
|
||
} // namespace reanimated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/react-native-reanimated/apple/native/PlatformLogger.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#import <Foundation/Foundation.h> | ||
#import <RNReanimated/PlatformLogger.h> | ||
|
||
namespace reanimated { | ||
|
||
void PlatformLogger::log(const char *str) | ||
{ | ||
NSLog(@"%@", [NSString stringWithCString:str encoding:[NSString defaultCStringEncoding]]); | ||
} | ||
|
||
void PlatformLogger::log(const std::string &str) | ||
{ | ||
log(str.c_str()); | ||
} | ||
|
||
void PlatformLogger::log(const double d) | ||
{ | ||
NSLog(@"%lf", d); | ||
} | ||
|
||
void PlatformLogger::log(const int i) | ||
{ | ||
NSLog(@"%i", i); | ||
} | ||
|
||
void PlatformLogger::log(const bool b) | ||
{ | ||
log(b ? "true" : "false"); | ||
} | ||
|
||
} // namespace reanimated |
15 changes: 0 additions & 15 deletions
15
packages/react-native-reanimated/apple/native/REAIOSLogger.h
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
packages/react-native-reanimated/apple/native/REAIOSLogger.mm
This file was deleted.
Oops, something went wrong.