Finish making shell/platform/android/... compatible with .clang-tidy. (flutter/engine#48296)

This commit is contained in:
Matan Lurey 2023-11-21 15:34:06 -08:00 committed by GitHub
parent b6f162e8b3
commit aa6fdad4cd
8 changed files with 7 additions and 10 deletions

View File

@ -71,7 +71,6 @@ AndroidContextGLSkia::AndroidContextGLSkia(
uint8_t msaa_samples)
: AndroidContext(AndroidRenderingAPI::kOpenGLES),
environment_(std::move(environment)),
config_(nullptr),
task_runners_(task_runners) {
if (!environment_->IsValid()) {
FML_LOG(ERROR) << "Could not create an Android GL environment.";

View File

@ -16,7 +16,7 @@ namespace flutter {
/// A |Display| that listens to refresh rate changes.
class AndroidDisplay : public Display {
public:
AndroidDisplay(std::shared_ptr<PlatformViewAndroidJNI> jni_facade);
explicit AndroidDisplay(std::shared_ptr<PlatformViewAndroidJNI> jni_facade);
~AndroidDisplay() = default;
// |Display|

View File

@ -87,8 +87,7 @@ AndroidEGLSurface::AndroidEGLSurface(EGLSurface surface,
: surface_(surface),
display_(display),
context_(context),
damage_(std::make_unique<AndroidEGLSurfaceDamage>()),
presentation_time_proc_(nullptr) {
damage_(std::make_unique<AndroidEGLSurfaceDamage>()) {
damage_->init(display_, context);
}

View File

@ -108,7 +108,7 @@ class AndroidEGLSurface {
const EGLDisplay display_;
const EGLContext context_;
std::unique_ptr<AndroidEGLSurfaceDamage> damage_;
PFNEGLPRESENTATIONTIMEANDROIDPROC presentation_time_proc_;
PFNEGLPRESENTATIONTIMEANDROIDPROC presentation_time_proc_ = nullptr;
};
} // namespace flutter

View File

@ -6,8 +6,7 @@
namespace flutter {
AndroidEnvironmentGL::AndroidEnvironmentGL()
: display_(EGL_NO_DISPLAY), valid_(false) {
AndroidEnvironmentGL::AndroidEnvironmentGL() : display_(EGL_NO_DISPLAY) {
// Get the display.
display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);

View File

@ -28,7 +28,7 @@ class AndroidEnvironmentGL
private:
EGLDisplay display_;
bool valid_;
bool valid_ = false;
FML_FRIEND_MAKE_REF_COUNTED(AndroidEnvironmentGL);
FML_FRIEND_REF_COUNTED_THREAD_SAFE(AndroidEnvironmentGL);

View File

@ -59,7 +59,7 @@ fml::jni::ScopedJavaGlobalRef<jclass>* g_flutter_jni_class = nullptr;
} // anonymous namespace
FlutterMain::FlutterMain(const flutter::Settings& settings)
: settings_(settings), vm_service_uri_callback_() {}
: settings_(settings) {}
FlutterMain::~FlutterMain() = default;

View File

@ -25,7 +25,7 @@ class FlutterMain {
private:
const flutter::Settings settings_;
DartServiceIsolate::CallbackHandle vm_service_uri_callback_;
DartServiceIsolate::CallbackHandle vm_service_uri_callback_ = 0;
explicit FlutterMain(const flutter::Settings& settings);