mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Finish making shell/platform/android/... compatible with .clang-tidy. (flutter/engine#48296)
This commit is contained in:
parent
b6f162e8b3
commit
aa6fdad4cd
@ -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.";
|
||||
|
||||
@ -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|
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user