diff --git a/engine/src/flutter/flow/testing/mock_layer.h b/engine/src/flutter/flow/testing/mock_layer.h index 42cff22e0d..54319ab2ff 100644 --- a/engine/src/flutter/flow/testing/mock_layer.h +++ b/engine/src/flutter/flow/testing/mock_layer.h @@ -27,13 +27,13 @@ class MockLayer : public Layer { public: explicit MockLayer(const SkPath& path, DlPaint paint = DlPaint()); - static std::shared_ptr Make(SkPath path, + static std::shared_ptr Make(const SkPath& path, DlPaint paint = DlPaint()) { - return std::make_shared(std::move(path), std::move(paint)); + return std::make_shared(path, std::move(paint)); } - static std::shared_ptr MakeOpacityCompatible(SkPath path) { - auto mock_layer = std::make_shared(std::move(path), DlPaint()); + static std::shared_ptr MakeOpacityCompatible(const SkPath& path) { + auto mock_layer = std::make_shared(path, DlPaint()); mock_layer->set_fake_opacity_compatible(true); return mock_layer; } diff --git a/engine/src/flutter/fml/platform/linux/message_loop_linux.cc b/engine/src/flutter/fml/platform/linux/message_loop_linux.cc index 6e6febc220..61a261dba1 100644 --- a/engine/src/flutter/fml/platform/linux/message_loop_linux.cc +++ b/engine/src/flutter/fml/platform/linux/message_loop_linux.cc @@ -16,8 +16,7 @@ static constexpr int kClockType = CLOCK_MONOTONIC; MessageLoopLinux::MessageLoopLinux() : epoll_fd_(FML_HANDLE_EINTR(::epoll_create(1 /* unused */))), - timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)), - running_(false) { + timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)) { FML_CHECK(epoll_fd_.is_valid()); FML_CHECK(timer_fd_.is_valid()); bool added_source = AddOrRemoveTimerSource(true); diff --git a/engine/src/flutter/fml/platform/linux/message_loop_linux.h b/engine/src/flutter/fml/platform/linux/message_loop_linux.h index 5563328b2f..f909948682 100644 --- a/engine/src/flutter/fml/platform/linux/message_loop_linux.h +++ b/engine/src/flutter/fml/platform/linux/message_loop_linux.h @@ -17,7 +17,7 @@ class MessageLoopLinux : public MessageLoopImpl { private: fml::UniqueFD epoll_fd_; fml::UniqueFD timer_fd_; - bool running_; + bool running_ = false; MessageLoopLinux(); diff --git a/engine/src/flutter/impeller/renderer/backend/gles/handle_gles.h b/engine/src/flutter/impeller/renderer/backend/gles/handle_gles.h index 3cfddf621f..3340310f41 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/handle_gles.h +++ b/engine/src/flutter/impeller/renderer/backend/gles/handle_gles.h @@ -78,7 +78,11 @@ inline std::ostream& operator<<(std::ostream& out, if (handle.IsDead()) { out << "DEAD"; } else { - out << handle.name.value().id; + if (handle.name.has_value()) { + out << handle.name.value().id; + } else { + out << "UNNAMED"; + } } out << ")"; return out; diff --git a/engine/src/flutter/impeller/renderer/backend/gles/sampler_gles.h b/engine/src/flutter/impeller/renderer/backend/gles/sampler_gles.h index ba75c55308..62583054ac 100644 --- a/engine/src/flutter/impeller/renderer/backend/gles/sampler_gles.h +++ b/engine/src/flutter/impeller/renderer/backend/gles/sampler_gles.h @@ -25,7 +25,7 @@ class SamplerGLES final : public Sampler, private: friend class SamplerLibraryGLES; - SamplerGLES(SamplerDescriptor desc); + explicit SamplerGLES(SamplerDescriptor desc); // |Sampler| bool IsValid() const override;