Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Prev Previous commit
Next Next commit
made glfw messenger unable to be copied
  • Loading branch information
gaaclarke committed Nov 9, 2022
commit 06d1b05c7e2a04a04ce267eb2d7745ef9efb082a
3 changes: 3 additions & 0 deletions shell/platform/glfw/flutter_glfw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ struct FlutterDesktopPluginRegistrar {

// State associated with the messenger used to communicate with the engine.
struct FlutterDesktopMessenger {
FlutterDesktopMessenger() = default;

void AddRef() { ref_count_.fetch_add(1); }

void Release() {
Expand All @@ -167,6 +169,7 @@ struct FlutterDesktopMessenger {
std::mutex& GetMutex() { return mutex_; }

private:
FML_DISALLOW_COPY_AND_ASSIGN(FlutterDesktopMessenger);
// The engine that backs this messenger.
FlutterDesktopEngineState* engine_;
std::atomic<int32_t> ref_count_ = 0;
Expand Down