Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
common
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
13
namespace
flutter
{
14
15
std::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
26
SnapshotController::SnapshotController
(
const
Delegate
& delegate)
27
:
delegate_
(delegate) {}
28
29
}
// namespace flutter
flutter::SnapshotController::Delegate
Definition
snapshot_controller.h:23
flutter::SnapshotController::Make
static std::unique_ptr< SnapshotController > Make(const Delegate &delegate, const Settings &settings)
Definition
snapshot_controller.cc:15
flutter::SnapshotController::SnapshotController
SnapshotController(const Delegate &delegate)
Definition
snapshot_controller.cc:26
delegate_
MockDelegate delegate_
Definition
engine_animator_unittests.cc:163
flutter
Definition
asset_manager.cc:10
flutter::Settings
Definition
settings.h:104
Generated on Fri Apr 26 2024 06:14:18 for Flutter Engine by
1.9.8