mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/common/task_runners.h"
|
|
|
|
#include <utility>
|
|
|
|
namespace flutter {
|
|
|
|
TaskRunners::TaskRunners(std::string label,
|
|
fml::RefPtr<fml::TaskRunner> platform,
|
|
fml::RefPtr<fml::TaskRunner> gpu,
|
|
fml::RefPtr<fml::TaskRunner> ui,
|
|
fml::RefPtr<fml::TaskRunner> io)
|
|
: label_(std::move(label)),
|
|
platform_(std::move(platform)),
|
|
gpu_(std::move(gpu)),
|
|
ui_(std::move(ui)),
|
|
io_(std::move(io)) {}
|
|
|
|
TaskRunners::TaskRunners(const TaskRunners& other) = default;
|
|
|
|
TaskRunners::~TaskRunners() = default;
|
|
|
|
const std::string& TaskRunners::GetLabel() const {
|
|
return label_;
|
|
}
|
|
|
|
fml::RefPtr<fml::TaskRunner> TaskRunners::GetPlatformTaskRunner() const {
|
|
return platform_;
|
|
}
|
|
|
|
fml::RefPtr<fml::TaskRunner> TaskRunners::GetUITaskRunner() const {
|
|
return ui_;
|
|
}
|
|
|
|
fml::RefPtr<fml::TaskRunner> TaskRunners::GetIOTaskRunner() const {
|
|
return io_;
|
|
}
|
|
|
|
fml::RefPtr<fml::TaskRunner> TaskRunners::GetGPUTaskRunner() const {
|
|
return gpu_;
|
|
}
|
|
|
|
bool TaskRunners::IsValid() const {
|
|
return platform_ && gpu_ && ui_ && io_;
|
|
}
|
|
|
|
} // namespace flutter
|