Flutter Engine
The Flutter Engine
flutter_windows_view_controller.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/platform/windows/flutter_windows_view_controller.h"
6
7namespace flutter {
8
10 Destroy();
11}
12
14 if (!view_) {
15 return;
16 }
17
18 // Prevent the engine from rendering into this view.
19 if (view_->GetEngine()->running()) {
20 auto view_id = view_->view_id();
21
22 view_->GetEngine()->RemoveView(view_id);
23 }
24
25 // Destroy the view, followed by the engine if it is owned by this controller.
26 view_.reset();
27 engine_.reset();
28}
29
30} // namespace flutter