Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
snapshot_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/common/snapshot_controller.h"
6
7#include "flutter/shell/common/snapshot_controller_skia.h"
8
9#if IMPELLER_SUPPORTS_RENDERING
10#include "flutter/shell/common/snapshot_controller_impeller.h"
11#endif // IMPELLER_SUPPORTS_RENDERING
12
13namespace flutter {
14
15std::unique_ptr<SnapshotController> SnapshotController::Make(
16 const Delegate& delegate,
17 const Settings& settings) {
18#if IMPELLER_SUPPORTS_RENDERING
19 if (settings.enable_impeller) {
20 return std::make_unique<SnapshotControllerImpeller>(delegate);
21 }
22#endif // IMPELLER_SUPPORTS_RENDERING
23 return std::make_unique<SnapshotControllerSkia>(delegate);
24}
25
28
29} // namespace flutter
static std::unique_ptr< SnapshotController > Make(const Delegate &delegate, const Settings &settings)
SnapshotController(const Delegate &delegate)
MockDelegate delegate_