Rename the shell namespace to flutter. (flutter/engine#8520)
This commit is contained in:
@@ -413,8 +413,6 @@ FILE: ../../../flutter/shell/common/animator.h
|
||||
FILE: ../../../flutter/shell/common/engine.cc
|
||||
FILE: ../../../flutter/shell/common/engine.h
|
||||
FILE: ../../../flutter/shell/common/fixtures/main.dart
|
||||
FILE: ../../../flutter/shell/common/io_manager.cc
|
||||
FILE: ../../../flutter/shell/common/io_manager.h
|
||||
FILE: ../../../flutter/shell/common/isolate_configuration.cc
|
||||
FILE: ../../../flutter/shell/common/isolate_configuration.h
|
||||
FILE: ../../../flutter/shell/common/persistent_cache.cc
|
||||
@@ -428,6 +426,8 @@ FILE: ../../../flutter/shell/common/run_configuration.h
|
||||
FILE: ../../../flutter/shell/common/shell.cc
|
||||
FILE: ../../../flutter/shell/common/shell.h
|
||||
FILE: ../../../flutter/shell/common/shell_benchmarks.cc
|
||||
FILE: ../../../flutter/shell/common/shell_io_manager.cc
|
||||
FILE: ../../../flutter/shell/common/shell_io_manager.h
|
||||
FILE: ../../../flutter/shell/common/shell_test.cc
|
||||
FILE: ../../../flutter/shell/common/shell_test.h
|
||||
FILE: ../../../flutter/shell/common/shell_unittests.cc
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace flutter {
|
||||
// i.e. the shell's IOManager.
|
||||
class IOManager {
|
||||
public:
|
||||
virtual ~IOManager() = default;
|
||||
|
||||
virtual fml::WeakPtr<GrContext> GetResourceContext() const = 0;
|
||||
|
||||
virtual fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const = 0;
|
||||
|
||||
@@ -64,8 +64,6 @@ source_set("common") {
|
||||
"animator.h",
|
||||
"engine.cc",
|
||||
"engine.h",
|
||||
"io_manager.cc",
|
||||
"io_manager.h",
|
||||
"isolate_configuration.cc",
|
||||
"isolate_configuration.h",
|
||||
"persistent_cache.cc",
|
||||
@@ -78,6 +76,8 @@ source_set("common") {
|
||||
"run_configuration.h",
|
||||
"shell.cc",
|
||||
"shell.h",
|
||||
"shell_io_manager.cc",
|
||||
"shell_io_manager.h",
|
||||
"skia_event_tracer_impl.cc",
|
||||
"skia_event_tracer_impl.h",
|
||||
"surface.cc",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/fml/trace_event.h"
|
||||
#include "third_party/dart/runtime/include/dart_tools_api.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -233,4 +233,4 @@ void Animator::AwaitVSync() {
|
||||
delegate_.OnAnimatorNotifyIdle(dart_frame_deadline_);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "flutter/synchronization/pipeline.h"
|
||||
#include "flutter/synchronization/semaphore.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class Animator final {
|
||||
public:
|
||||
@@ -90,6 +90,6 @@ class Animator final {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Animator);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_ANIMATOR_H_
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
#include "third_party/skia/include/core/SkPictureRecorder.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
static constexpr char kAssetChannel[] = "flutter/assets";
|
||||
static constexpr char kLifecycleChannel[] = "flutter/lifecycle";
|
||||
@@ -150,7 +150,7 @@ Engine::RunStatus Engine::Run(RunConfiguration configuration) {
|
||||
: Engine::RunStatus::Failure;
|
||||
}
|
||||
|
||||
shell::Engine::RunStatus Engine::PrepareAndLaunchIsolate(
|
||||
Engine::RunStatus Engine::PrepareAndLaunchIsolate(
|
||||
RunConfiguration configuration) {
|
||||
TRACE_EVENT0("flutter", "Engine::PrepareAndLaunchIsolate");
|
||||
|
||||
@@ -458,4 +458,4 @@ void Engine::HandleAssetPlatformMessage(
|
||||
response->CompleteEmpty();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
#include "flutter/runtime/runtime_controller.h"
|
||||
#include "flutter/runtime/runtime_delegate.h"
|
||||
#include "flutter/shell/common/animator.h"
|
||||
#include "flutter/shell/common/io_manager.h"
|
||||
#include "flutter/shell/common/rasterizer.h"
|
||||
#include "flutter/shell/common/run_configuration.h"
|
||||
#include "flutter/shell/common/shell_io_manager.h"
|
||||
#include "third_party/skia/include/core/SkPicture.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class Engine final : public flutter::RuntimeDelegate {
|
||||
public:
|
||||
@@ -175,6 +175,6 @@ class Engine final : public flutter::RuntimeDelegate {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Engine);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_COMMON_ENGINE_H_
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/fml/make_copyable.h"
|
||||
#include "flutter/runtime/dart_vm.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
IsolateConfiguration::IsolateConfiguration() = default;
|
||||
|
||||
@@ -27,7 +27,7 @@ class AppSnapshotIsolateConfiguration final : public IsolateConfiguration {
|
||||
public:
|
||||
AppSnapshotIsolateConfiguration() = default;
|
||||
|
||||
// |shell::IsolateConfiguration|
|
||||
// |IsolateConfiguration|
|
||||
bool DoPrepareIsolate(flutter::DartIsolate& isolate) override {
|
||||
return isolate.PrepareForRunningFromPrecompiledCode();
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class KernelIsolateConfiguration : public IsolateConfiguration {
|
||||
KernelIsolateConfiguration(std::unique_ptr<const fml::Mapping> kernel)
|
||||
: kernel_(std::move(kernel)) {}
|
||||
|
||||
// |shell::IsolateConfiguration|
|
||||
// |IsolateConfiguration|
|
||||
bool DoPrepareIsolate(flutter::DartIsolate& isolate) override {
|
||||
if (flutter::DartVM::IsRunningPrecompiledCode()) {
|
||||
return false;
|
||||
@@ -62,7 +62,7 @@ class KernelListIsolateConfiguration final : public IsolateConfiguration {
|
||||
kernel_pieces)
|
||||
: kernel_pieces_(std::move(kernel_pieces)) {}
|
||||
|
||||
// |shell::IsolateConfiguration|
|
||||
// |IsolateConfiguration|
|
||||
bool DoPrepareIsolate(flutter::DartIsolate& isolate) override {
|
||||
if (flutter::DartVM::IsRunningPrecompiledCode()) {
|
||||
return false;
|
||||
@@ -219,4 +219,4 @@ std::unique_ptr<IsolateConfiguration> IsolateConfiguration::CreateForKernelList(
|
||||
std::move(kernel_pieces));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "flutter/fml/memory/weak_ptr.h"
|
||||
#include "flutter/runtime/dart_isolate.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class IsolateConfiguration {
|
||||
public:
|
||||
@@ -51,6 +51,6 @@ class IsolateConfiguration {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(IsolateConfiguration);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_ISOLATE_CONFIGURATION_H_
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "flutter/fml/paths.h"
|
||||
#include "flutter/fml/trace_event.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
std::string PersistentCache::cache_base_path_;
|
||||
|
||||
@@ -205,4 +205,4 @@ fml::RefPtr<fml::TaskRunner> PersistentCache::GetWorkerTaskRunner() const {
|
||||
return worker;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "flutter/fml/unique_fd.h"
|
||||
#include "third_party/skia/include/gpu/GrContextOptions.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class PersistentCache : public GrContextOptions::PersistentCache {
|
||||
public:
|
||||
@@ -72,6 +72,6 @@ class PersistentCache : public GrContextOptions::PersistentCache {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PersistentCache);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_PERSISTENT_CACHE_H_
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "third_party/skia/include/gpu/GrContextOptions.h"
|
||||
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
PlatformView::PlatformView(Delegate& delegate,
|
||||
flutter::TaskRunners task_runners)
|
||||
@@ -133,4 +133,4 @@ void PlatformView::SetNextFrameCallback(fml::closure closure) {
|
||||
delegate_.OnPlatformViewSetNextFrameCallback(std::move(closure));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
#include "third_party/skia/include/gpu/GrContext.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class Shell;
|
||||
|
||||
@@ -132,6 +132,6 @@ class PlatformView {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PlatformView);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // COMMON_PLATFORM_VIEW_H_
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "third_party/skia/include/core/SkSurfaceCharacterization.h"
|
||||
#include "third_party/skia/include/utils/SkBase64.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
// The rasterizer will tell Skia to purge cached resources that have not been
|
||||
// used within this interval.
|
||||
@@ -389,4 +389,4 @@ Rasterizer::Screenshot::Screenshot(const Screenshot& other) = default;
|
||||
|
||||
Rasterizer::Screenshot::~Screenshot() = default;
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "flutter/shell/common/surface.h"
|
||||
#include "flutter/synchronization/pipeline.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class Rasterizer final : public flutter::SnapshotDelegate {
|
||||
public:
|
||||
@@ -96,6 +96,6 @@ class Rasterizer final : public flutter::SnapshotDelegate {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Rasterizer);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_COMMON_RASTERIZER_H_
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/fml/file.h"
|
||||
#include "flutter/runtime/dart_vm.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
RunConfiguration RunConfiguration::InferFromSettings(
|
||||
const flutter::Settings& settings,
|
||||
@@ -86,4 +86,4 @@ RunConfiguration::TakeIsolateConfiguration() {
|
||||
return std::move(isolate_configuration_);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "flutter/fml/unique_fd.h"
|
||||
#include "flutter/shell/common/isolate_configuration.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class RunConfiguration {
|
||||
public:
|
||||
@@ -58,6 +58,6 @@ class RunConfiguration {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(RunConfiguration);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_RUN_CONFIGURATION_H_
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "third_party/skia/include/core/SkGraphics.h"
|
||||
#include "third_party/tonic/common/log.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
constexpr char kSkiaChannel[] = "flutter/skia";
|
||||
|
||||
@@ -69,7 +69,7 @@ std::unique_ptr<Shell> Shell::CreateShellOnPlatformThread(
|
||||
// first be booted and the necessary references obtained to initialize the
|
||||
// other subsystems.
|
||||
fml::AutoResetWaitableEvent io_latch;
|
||||
std::unique_ptr<IOManager> io_manager;
|
||||
std::unique_ptr<ShellIOManager> io_manager;
|
||||
auto io_task_runner = shell->GetTaskRunners().GetIOTaskRunner();
|
||||
fml::TaskRunner::RunNowOrPostTask(
|
||||
io_task_runner,
|
||||
@@ -79,7 +79,7 @@ std::unique_ptr<Shell> Shell::CreateShellOnPlatformThread(
|
||||
io_task_runner //
|
||||
]() {
|
||||
TRACE_EVENT0("flutter", "ShellSetupIOSubsystem");
|
||||
io_manager = std::make_unique<IOManager>(
|
||||
io_manager = std::make_unique<ShellIOManager>(
|
||||
platform_view->CreateResourceContext(), io_task_runner);
|
||||
io_latch.Signal();
|
||||
});
|
||||
@@ -378,7 +378,7 @@ bool Shell::IsSetup() const {
|
||||
bool Shell::Setup(std::unique_ptr<PlatformView> platform_view,
|
||||
std::unique_ptr<Engine> engine,
|
||||
std::unique_ptr<Rasterizer> rasterizer,
|
||||
std::unique_ptr<IOManager> io_manager) {
|
||||
std::unique_ptr<ShellIOManager> io_manager) {
|
||||
if (is_setup_) {
|
||||
return false;
|
||||
}
|
||||
@@ -432,7 +432,7 @@ flutter::DartVM* Shell::GetDartVM() {
|
||||
return &vm_;
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewCreated(std::unique_ptr<Surface> surface) {
|
||||
TRACE_EVENT0("flutter", "Shell::OnPlatformViewCreated");
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -516,7 +516,7 @@ void Shell::OnPlatformViewCreated(std::unique_ptr<Surface> surface) {
|
||||
}
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewDestroyed() {
|
||||
TRACE_EVENT0("flutter", "Shell::OnPlatformViewDestroyed");
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -590,7 +590,7 @@ void Shell::OnPlatformViewDestroyed() {
|
||||
}
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewSetViewportMetrics(
|
||||
const flutter::ViewportMetrics& metrics) {
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -604,7 +604,7 @@ void Shell::OnPlatformViewSetViewportMetrics(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewDispatchPlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) {
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -618,7 +618,7 @@ void Shell::OnPlatformViewDispatchPlatformMessage(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewDispatchPointerDataPacket(
|
||||
std::unique_ptr<flutter::PointerDataPacket> packet) {
|
||||
TRACE_EVENT0("flutter", "Shell::OnPlatformViewDispatchPointerDataPacket");
|
||||
@@ -635,7 +635,7 @@ void Shell::OnPlatformViewDispatchPointerDataPacket(
|
||||
next_pointer_flow_id_++;
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewDispatchSemanticsAction(
|
||||
int32_t id,
|
||||
flutter::SemanticsAction action,
|
||||
@@ -651,7 +651,7 @@ void Shell::OnPlatformViewDispatchSemanticsAction(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewSetSemanticsEnabled(bool enabled) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -664,7 +664,7 @@ void Shell::OnPlatformViewSetSemanticsEnabled(bool enabled) {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -677,7 +677,7 @@ void Shell::OnPlatformViewSetAccessibilityFeatures(int32_t flags) {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewRegisterTexture(
|
||||
std::shared_ptr<flow::Texture> texture) {
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -693,7 +693,7 @@ void Shell::OnPlatformViewRegisterTexture(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewUnregisterTexture(int64_t texture_id) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -708,7 +708,7 @@ void Shell::OnPlatformViewUnregisterTexture(int64_t texture_id) {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -739,7 +739,7 @@ void Shell::OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void Shell::OnPlatformViewSetNextFrameCallback(fml::closure closure) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -752,7 +752,7 @@ void Shell::OnPlatformViewSetNextFrameCallback(fml::closure closure) {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void Shell::OnAnimatorBeginFrame(fml::TimePoint frame_time) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -762,7 +762,7 @@ void Shell::OnAnimatorBeginFrame(fml::TimePoint frame_time) {
|
||||
}
|
||||
}
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void Shell::OnAnimatorNotifyIdle(int64_t deadline) {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -772,7 +772,7 @@ void Shell::OnAnimatorNotifyIdle(int64_t deadline) {
|
||||
}
|
||||
}
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void Shell::OnAnimatorDraw(
|
||||
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) {
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -786,7 +786,7 @@ void Shell::OnAnimatorDraw(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void Shell::OnAnimatorDrawLastLayerTree() {
|
||||
FML_DCHECK(is_setup_);
|
||||
|
||||
@@ -798,7 +798,7 @@ void Shell::OnAnimatorDrawLastLayerTree() {
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void Shell::OnEngineUpdateSemantics(
|
||||
flutter::SemanticsNodeUpdates update,
|
||||
flutter::CustomAccessibilityActionUpdates actions) {
|
||||
@@ -814,7 +814,7 @@ void Shell::OnEngineUpdateSemantics(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void Shell::OnEngineHandlePlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) {
|
||||
FML_DCHECK(is_setup_);
|
||||
@@ -858,7 +858,7 @@ void Shell::HandleEngineSkiaMessage(
|
||||
});
|
||||
}
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void Shell::OnPreEngineRestart() {
|
||||
FML_DCHECK(is_setup_);
|
||||
FML_DCHECK(task_runners_.GetUITaskRunner()->RunsTasksOnCurrentThread());
|
||||
@@ -877,7 +877,7 @@ void Shell::OnPreEngineRestart() {
|
||||
latch.Wait();
|
||||
}
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void Shell::UpdateIsolateDescription(const std::string isolate_name,
|
||||
int64_t isolate_port) {
|
||||
Handler::Description description(isolate_port, isolate_name);
|
||||
@@ -1136,4 +1136,4 @@ Rasterizer::Screenshot Shell::Screenshot(
|
||||
return screenshot;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
#include "flutter/runtime/service_protocol.h"
|
||||
#include "flutter/shell/common/animator.h"
|
||||
#include "flutter/shell/common/engine.h"
|
||||
#include "flutter/shell/common/io_manager.h"
|
||||
#include "flutter/shell/common/platform_view.h"
|
||||
#include "flutter/shell/common/rasterizer.h"
|
||||
#include "flutter/shell/common/shell_io_manager.h"
|
||||
#include "flutter/shell/common/surface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class Shell final : public PlatformView::Delegate,
|
||||
public Animator::Delegate,
|
||||
@@ -91,7 +91,7 @@ class Shell final : public PlatformView::Delegate,
|
||||
std::unique_ptr<PlatformView> platform_view_; // on platform task runner
|
||||
std::unique_ptr<Engine> engine_; // on UI task runner
|
||||
std::unique_ptr<Rasterizer> rasterizer_; // on GPU task runner
|
||||
std::unique_ptr<IOManager> io_manager_; // on IO task runner
|
||||
std::unique_ptr<ShellIOManager> io_manager_; // on IO task runner
|
||||
|
||||
std::unordered_map<std::string, // method
|
||||
std::pair<fml::RefPtr<fml::TaskRunner>,
|
||||
@@ -119,79 +119,79 @@ class Shell final : public PlatformView::Delegate,
|
||||
bool Setup(std::unique_ptr<PlatformView> platform_view,
|
||||
std::unique_ptr<Engine> engine,
|
||||
std::unique_ptr<Rasterizer> rasterizer,
|
||||
std::unique_ptr<IOManager> io_manager);
|
||||
std::unique_ptr<ShellIOManager> io_manager);
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewCreated(std::unique_ptr<Surface> surface) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewDestroyed() override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewSetViewportMetrics(
|
||||
const flutter::ViewportMetrics& metrics) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewDispatchPlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewDispatchPointerDataPacket(
|
||||
std::unique_ptr<flutter::PointerDataPacket> packet) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewDispatchSemanticsAction(
|
||||
int32_t id,
|
||||
flutter::SemanticsAction action,
|
||||
std::vector<uint8_t> args) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewSetSemanticsEnabled(bool enabled) override;
|
||||
|
||||
// |shell:PlatformView::Delegate|
|
||||
void OnPlatformViewSetAccessibilityFeatures(int32_t flags) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewRegisterTexture(
|
||||
std::shared_ptr<flow::Texture> texture) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewUnregisterTexture(int64_t texture_id) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) override;
|
||||
|
||||
// |shell::PlatformView::Delegate|
|
||||
// |PlatformView::Delegate|
|
||||
void OnPlatformViewSetNextFrameCallback(fml::closure closure) override;
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorBeginFrame(fml::TimePoint frame_time) override;
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorNotifyIdle(int64_t deadline) override;
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorDraw(
|
||||
fml::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) override;
|
||||
|
||||
// |shell::Animator::Delegate|
|
||||
// |Animator::Delegate|
|
||||
void OnAnimatorDrawLastLayerTree() override;
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void OnEngineUpdateSemantics(
|
||||
flutter::SemanticsNodeUpdates update,
|
||||
flutter::CustomAccessibilityActionUpdates actions) override;
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void OnEngineHandlePlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) override;
|
||||
|
||||
void HandleEngineSkiaMessage(fml::RefPtr<flutter::PlatformMessage> message);
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void OnPreEngineRestart() override;
|
||||
|
||||
// |shell::Engine::Delegate|
|
||||
// |Engine::Delegate|
|
||||
void UpdateIsolateDescription(const std::string isolate_name,
|
||||
int64_t isolate_port) override;
|
||||
|
||||
@@ -242,6 +242,6 @@ class Shell final : public PlatformView::Delegate,
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Shell);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_COMMON_SHELL_H_
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/shell/common/shell.h"
|
||||
#include "flutter/shell/common/thread_host.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
static void StartupAndShutdownShell(benchmark::State& state,
|
||||
bool measure_startup,
|
||||
@@ -77,4 +77,4 @@ static void BM_ShellInitializationAndShutdown(benchmark::State& state) {
|
||||
|
||||
BENCHMARK(BM_ShellInitializationAndShutdown);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "flutter/shell/common/io_manager.h"
|
||||
#include "flutter/shell/common/shell_io_manager.h"
|
||||
|
||||
#include "flutter/fml/message_loop.h"
|
||||
#include "flutter/shell/common/persistent_cache.h"
|
||||
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
sk_sp<GrContext> IOManager::CreateCompatibleResourceLoadingContext(
|
||||
sk_sp<GrContext> ShellIOManager::CreateCompatibleResourceLoadingContext(
|
||||
GrBackend backend,
|
||||
sk_sp<const GrGLInterface> gl_interface) {
|
||||
if (backend != GrBackend::kOpenGL_GrBackend) {
|
||||
@@ -42,8 +42,9 @@ sk_sp<GrContext> IOManager::CreateCompatibleResourceLoadingContext(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
IOManager::IOManager(sk_sp<GrContext> resource_context,
|
||||
fml::RefPtr<fml::TaskRunner> unref_queue_task_runner)
|
||||
ShellIOManager::ShellIOManager(
|
||||
sk_sp<GrContext> resource_context,
|
||||
fml::RefPtr<fml::TaskRunner> unref_queue_task_runner)
|
||||
: resource_context_(std::move(resource_context)),
|
||||
resource_context_weak_factory_(
|
||||
resource_context_ ? std::make_unique<fml::WeakPtrFactory<GrContext>>(
|
||||
@@ -62,19 +63,19 @@ IOManager::IOManager(sk_sp<GrContext> resource_context,
|
||||
}
|
||||
}
|
||||
|
||||
IOManager::~IOManager() {
|
||||
ShellIOManager::~ShellIOManager() {
|
||||
// Last chance to drain the IO queue as the platform side reference to the
|
||||
// underlying OpenGL context may be going away.
|
||||
unref_queue_->Drain();
|
||||
}
|
||||
|
||||
fml::WeakPtr<GrContext> IOManager::GetResourceContext() const {
|
||||
fml::WeakPtr<GrContext> ShellIOManager::GetResourceContext() const {
|
||||
return resource_context_weak_factory_
|
||||
? resource_context_weak_factory_->GetWeakPtr()
|
||||
: fml::WeakPtr<GrContext>();
|
||||
}
|
||||
|
||||
void IOManager::NotifyResourceContextAvailable(
|
||||
void ShellIOManager::NotifyResourceContextAvailable(
|
||||
sk_sp<GrContext> resource_context) {
|
||||
// The resource context needs to survive as long as we have Dart objects
|
||||
// referencing. We shouldn't ever need to replace it if we have one - unless
|
||||
@@ -84,7 +85,7 @@ void IOManager::NotifyResourceContextAvailable(
|
||||
}
|
||||
}
|
||||
|
||||
void IOManager::UpdateResourceContext(sk_sp<GrContext> resource_context) {
|
||||
void ShellIOManager::UpdateResourceContext(sk_sp<GrContext> resource_context) {
|
||||
resource_context_ = std::move(resource_context);
|
||||
resource_context_weak_factory_ =
|
||||
resource_context_ ? std::make_unique<fml::WeakPtrFactory<GrContext>>(
|
||||
@@ -92,11 +93,11 @@ void IOManager::UpdateResourceContext(sk_sp<GrContext> resource_context) {
|
||||
: nullptr;
|
||||
}
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> IOManager::GetSkiaUnrefQueue() const {
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> ShellIOManager::GetSkiaUnrefQueue() const {
|
||||
return unref_queue_;
|
||||
}
|
||||
|
||||
fml::WeakPtr<IOManager> IOManager::GetWeakPtr() {
|
||||
fml::WeakPtr<ShellIOManager> ShellIOManager::GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef FLUTTER_SHELL_COMMON_IO_MANAGER_H_
|
||||
#define FLUTTER_SHELL_COMMON_IO_MANAGER_H_
|
||||
#ifndef FLUTTER_SHELL_COMMON_SHELL_IO_MANAGER_H_
|
||||
#define FLUTTER_SHELL_COMMON_SHELL_IO_MANAGER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
#include "flutter/lib/ui/io_manager.h"
|
||||
#include "third_party/skia/include/gpu/GrContext.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class IOManager : public flutter::IOManager {
|
||||
class ShellIOManager final : public IOManager {
|
||||
public:
|
||||
// Convenience methods for platforms to create a GrContext used to supply to
|
||||
// the IOManager. The platforms may create the context themselves if they so
|
||||
@@ -24,10 +24,10 @@ class IOManager : public flutter::IOManager {
|
||||
GrBackend backend,
|
||||
sk_sp<const GrGLInterface> gl_interface);
|
||||
|
||||
IOManager(sk_sp<GrContext> resource_context,
|
||||
fml::RefPtr<fml::TaskRunner> unref_queue_task_runner);
|
||||
ShellIOManager(sk_sp<GrContext> resource_context,
|
||||
fml::RefPtr<fml::TaskRunner> unref_queue_task_runner);
|
||||
|
||||
virtual ~IOManager();
|
||||
~ShellIOManager() override;
|
||||
|
||||
fml::WeakPtr<GrContext> GetResourceContext() const override;
|
||||
|
||||
@@ -44,7 +44,7 @@ class IOManager : public flutter::IOManager {
|
||||
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> GetSkiaUnrefQueue() const override;
|
||||
|
||||
fml::WeakPtr<IOManager> GetWeakPtr();
|
||||
fml::WeakPtr<ShellIOManager> GetWeakPtr();
|
||||
|
||||
private:
|
||||
// Resource context management.
|
||||
@@ -55,11 +55,11 @@ class IOManager : public flutter::IOManager {
|
||||
// Unref queue management.
|
||||
fml::RefPtr<flow::SkiaUnrefQueue> unref_queue_;
|
||||
|
||||
fml::WeakPtrFactory<IOManager> weak_factory_;
|
||||
fml::WeakPtrFactory<ShellIOManager> weak_factory_;
|
||||
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(IOManager);
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ShellIOManager);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_IO_MANAGER_H_
|
||||
#endif // FLUTTER_SHELL_COMMON_SHELL_IO_MANAGER_H_
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/runtime/dart_vm.h"
|
||||
#include "flutter/testing/testing.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
namespace testing {
|
||||
|
||||
ShellTest::ShellTest()
|
||||
@@ -130,4 +130,4 @@ void ShellTest::AddNativeCallback(std::string name,
|
||||
}
|
||||
|
||||
} // namespace testing
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "flutter/testing/test_dart_native_resolver.h"
|
||||
#include "flutter/testing/thread_test.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
namespace testing {
|
||||
|
||||
class ShellTest : public ::testing::ThreadTest {
|
||||
@@ -45,6 +45,6 @@ class ShellTest : public ::testing::ThreadTest {
|
||||
};
|
||||
|
||||
} // namespace testing
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_SHELL_TEST_H_
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "flutter/testing/testing.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
namespace testing {
|
||||
|
||||
class TestPlatformView : public PlatformView,
|
||||
@@ -244,4 +244,4 @@ TEST_F(ShellTest, FixturesAreFunctional) {
|
||||
}
|
||||
|
||||
} // namespace testing
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "third_party/skia/include/utils/SkEventTracer.h"
|
||||
#include "third_party/skia/include/utils/SkTraceEventPhase.h"
|
||||
|
||||
namespace skia {
|
||||
namespace flutter {
|
||||
|
||||
class FlutterEventTracer : public SkEventTracer {
|
||||
public:
|
||||
@@ -120,14 +120,15 @@ bool enableSkiaTracingCallback(const char* method,
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace skia
|
||||
|
||||
void InitSkiaEventTracer(bool enabled) {
|
||||
skia::FlutterEventTracer* tracer = new skia::FlutterEventTracer(enabled);
|
||||
// TODO(chinmaygarde): Leaked https://github.com/flutter/flutter/issues/30808.
|
||||
auto tracer = new FlutterEventTracer(enabled);
|
||||
Dart_RegisterRootServiceRequestCallback("_flutter.enableSkiaTracing",
|
||||
skia::enableSkiaTracingCallback,
|
||||
enableSkiaTracingCallback,
|
||||
static_cast<void*>(tracer));
|
||||
// Initialize the binding to Skia's tracing events. Skia will
|
||||
// take ownership of and clean up the memory allocated here.
|
||||
SkEventTracer::SetInstance(tracer);
|
||||
}
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
#ifndef FLUTTER_SHELL_COMMON_SKIA_EVENT_TRACER_IMPL_H_
|
||||
#define FLUTTER_SHELL_COMMON_SKIA_EVENT_TRACER_IMPL_H_
|
||||
|
||||
namespace flutter {
|
||||
|
||||
void InitSkiaEventTracer(bool enabled);
|
||||
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_SKIA_EVENT_TRACER_IMPL_H_
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/fml/logging.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
SurfaceFrame::SurfaceFrame(sk_sp<SkSurface> surface,
|
||||
SubmitCallback submit_callback)
|
||||
@@ -64,4 +64,4 @@ bool Surface::MakeRenderContextCurrent() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "third_party/skia/include/core/SkCanvas.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
/// Represents a Frame that has been fully configured for the underlying client
|
||||
/// rendering API. A frame may only be submitted once.
|
||||
@@ -63,6 +63,6 @@ class Surface {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(Surface);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_SURFACE_H_
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#undef SHELL_COMMON_SWITCHES_H_
|
||||
|
||||
struct SwitchDesc {
|
||||
shell::Switch sw;
|
||||
flutter::Switch sw;
|
||||
const fml::StringView flag;
|
||||
const char* help;
|
||||
};
|
||||
@@ -32,14 +32,14 @@ struct SwitchDesc {
|
||||
// clang-format off
|
||||
#define DEF_SWITCHES_START static const struct SwitchDesc gSwitchDescs[] = {
|
||||
#define DEF_SWITCH(p_swtch, p_flag, p_help) \
|
||||
{ shell::Switch:: p_swtch, p_flag, p_help },
|
||||
{ flutter::Switch:: p_swtch, p_flag, p_help },
|
||||
#define DEF_SWITCHES_END };
|
||||
// clang-format on
|
||||
|
||||
// Include again for struct definition.
|
||||
#include "flutter/shell/common/switches.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
void PrintUsage(const std::string& executable_name) {
|
||||
std::cerr << std::endl << " " << executable_name << std::endl << std::endl;
|
||||
@@ -105,11 +105,11 @@ const fml::StringView FlagForSwitch(Switch swtch) {
|
||||
|
||||
template <typename T>
|
||||
static bool GetSwitchValue(const fml::CommandLine& command_line,
|
||||
shell::Switch sw,
|
||||
Switch sw,
|
||||
T* result) {
|
||||
std::string switch_string;
|
||||
|
||||
if (!command_line.GetOptionValue(shell::FlagForSwitch(sw), &switch_string)) {
|
||||
if (!command_line.GetOptionValue(FlagForSwitch(sw), &switch_string)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -283,4 +283,4 @@ flutter::Settings SettingsFromCommandLine(
|
||||
return settings;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#ifndef SHELL_COMMON_SWITCHES_H_
|
||||
#define SHELL_COMMON_SWITCHES_H_
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
// clang-format off
|
||||
#ifndef DEF_SWITCHES_START
|
||||
@@ -150,6 +150,6 @@ const fml::StringView FlagForSwitch(Switch swtch);
|
||||
|
||||
flutter::Settings SettingsFromCommandLine(const fml::CommandLine& command_line);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_COMMON_SWITCHES_H_
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/shell/common/thread_host.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
ThreadHost::ThreadHost() = default;
|
||||
|
||||
@@ -37,4 +37,4 @@ void ThreadHost::Reset() {
|
||||
io_thread.reset();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "flutter/fml/thread.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
struct ThreadHost {
|
||||
enum Type {
|
||||
@@ -38,6 +38,6 @@ struct ThreadHost {
|
||||
void Reset();
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_THREAD_HOST_H_
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/fml/task_runner.h"
|
||||
#include "flutter/fml/trace_event.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
#if defined(OS_FUCHSIA)
|
||||
// In general, traces on Fuchsia are recorded across the whole system.
|
||||
@@ -94,4 +94,4 @@ float VsyncWaiter::GetDisplayRefreshRate() const {
|
||||
return kUnknownRefreshRateFPS;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "flutter/fml/synchronization/thread_annotations.h"
|
||||
#include "flutter/fml/time/time_point.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class VsyncWaiter : public std::enable_shared_from_this<VsyncWaiter> {
|
||||
public:
|
||||
@@ -56,6 +56,6 @@ class VsyncWaiter : public std::enable_shared_from_this<VsyncWaiter> {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiter);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_VSYNC_WAITER_H_
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "flutter/fml/logging.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
namespace {
|
||||
|
||||
static fml::TimePoint SnapToNextTick(fml::TimePoint value,
|
||||
@@ -25,7 +25,7 @@ VsyncWaiterFallback::VsyncWaiterFallback(flutter::TaskRunners task_runners)
|
||||
|
||||
VsyncWaiterFallback::~VsyncWaiterFallback() = default;
|
||||
|
||||
// |shell::VsyncWaiter|
|
||||
// |VsyncWaiter|
|
||||
void VsyncWaiterFallback::AwaitVSync() {
|
||||
constexpr fml::TimeDelta kSingleFrameInterval =
|
||||
fml::TimeDelta::FromSecondsF(1.0 / 60.0);
|
||||
@@ -36,4 +36,4 @@ void VsyncWaiterFallback::AwaitVSync() {
|
||||
FireCallback(next, next + kSingleFrameInterval);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/fml/time/time_point.h"
|
||||
#include "flutter/shell/common/vsync_waiter.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class VsyncWaiterFallback final : public VsyncWaiter {
|
||||
public:
|
||||
@@ -21,12 +21,12 @@ class VsyncWaiterFallback final : public VsyncWaiter {
|
||||
private:
|
||||
fml::TimePoint phase_;
|
||||
|
||||
// |shell::VsyncWaiter|
|
||||
// |VsyncWaiter|
|
||||
void AwaitVSync() override;
|
||||
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterFallback);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_COMMON_VSYNC_WAITER_FALLBACK_H_
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define GPU_GL_RGBA4 0x8056
|
||||
#define GPU_GL_RGB565 0x8D62
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
// Default maximum number of budgeted resources in the cache.
|
||||
static const int kGrCacheMaxCount = 8192;
|
||||
@@ -104,7 +104,7 @@ GPUSurfaceGL::~GPUSurfaceGL() {
|
||||
delegate_->GLContextClearCurrent();
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool GPUSurfaceGL::IsValid() {
|
||||
return valid_;
|
||||
}
|
||||
@@ -216,12 +216,12 @@ bool GPUSurfaceGL::CreateOrUpdateSurfaces(const SkISize& size) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GPUSurfaceGL::GetRootTransformation() const {
|
||||
return delegate_->GLContextSurfaceTransformation();
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> GPUSurfaceGL::AcquireFrame(const SkISize& size) {
|
||||
if (delegate_ == nullptr) {
|
||||
return nullptr;
|
||||
@@ -314,19 +314,19 @@ sk_sp<SkSurface> GPUSurfaceGL::AcquireRenderSurface(
|
||||
return offscreen_surface_ != nullptr ? offscreen_surface_ : onscreen_surface_;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GPUSurfaceGL::GetContext() {
|
||||
return context_.get();
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
flow::ExternalViewEmbedder* GPUSurfaceGL::GetExternalViewEmbedder() {
|
||||
return delegate_->GetExternalViewEmbedder();
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool GPUSurfaceGL::MakeRenderContextCurrent() {
|
||||
return delegate_->GLContextMakeCurrent();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "flutter/shell/gpu/gpu_surface_gl_delegate.h"
|
||||
#include "third_party/skia/include/gpu/GrContext.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class GPUSurfaceGL : public Surface {
|
||||
public:
|
||||
@@ -26,22 +26,22 @@ class GPUSurfaceGL : public Surface {
|
||||
|
||||
~GPUSurfaceGL() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool IsValid() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> AcquireFrame(const SkISize& size) override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GetRootTransformation() const override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GetContext() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
flow::ExternalViewEmbedder* GetExternalViewEmbedder() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool MakeRenderContextCurrent() override;
|
||||
|
||||
private:
|
||||
@@ -64,6 +64,6 @@ class GPUSurfaceGL : public Surface {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(GPUSurfaceGL);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_GPU_GPU_SURFACE_GL_H_
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "third_party/skia/include/gpu/gl/GrGLAssembleInterface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
bool GPUSurfaceGLDelegate::GLContextFBOResetAfterPresent() const {
|
||||
return false;
|
||||
@@ -66,9 +66,7 @@ static sk_sp<const GrGLInterface> CreateGLInterface(
|
||||
GPUSurfaceGLDelegate::GLProcResolver resolver;
|
||||
};
|
||||
|
||||
ProcResolverContext context = {
|
||||
proc_resolver
|
||||
};
|
||||
ProcResolverContext context = {proc_resolver};
|
||||
|
||||
GrGLGetProc gl_get_proc = [](void* context,
|
||||
const char gl_proc_name[]) -> GrGLFuncPtr {
|
||||
@@ -101,4 +99,4 @@ GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface() {
|
||||
return CreateGLInterface(nullptr);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "third_party/skia/include/core/SkMatrix.h"
|
||||
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class GPUSurfaceGLDelegate {
|
||||
public:
|
||||
@@ -64,6 +64,6 @@ class GPUSurfaceGLDelegate {
|
||||
virtual GLProcResolver GetGLProcResolver() const;
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_GPU_GPU_SURFACE_GL_DELEGATE_H_
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <memory>
|
||||
#include "flutter/fml/logging.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
flow::ExternalViewEmbedder*
|
||||
GPUSurfaceSoftwareDelegate::GetExternalViewEmbedder() {
|
||||
@@ -19,12 +19,12 @@ GPUSurfaceSoftware::GPUSurfaceSoftware(GPUSurfaceSoftwareDelegate* delegate)
|
||||
|
||||
GPUSurfaceSoftware::~GPUSurfaceSoftware() = default;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool GPUSurfaceSoftware::IsValid() {
|
||||
return delegate_ != nullptr;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> GPUSurfaceSoftware::AcquireFrame(
|
||||
const SkISize& logical_size) {
|
||||
if (!IsValid()) {
|
||||
@@ -65,7 +65,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceSoftware::AcquireFrame(
|
||||
return std::make_unique<SurfaceFrame>(backing_store, on_submit);
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GPUSurfaceSoftware::GetRootTransformation() const {
|
||||
// This backend does not currently support root surface transformations. Just
|
||||
// return identity.
|
||||
@@ -74,15 +74,15 @@ SkMatrix GPUSurfaceSoftware::GetRootTransformation() const {
|
||||
return matrix;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GPUSurfaceSoftware::GetContext() {
|
||||
// There is no GrContext associated with a software surface.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
flow::ExternalViewEmbedder* GPUSurfaceSoftware::GetExternalViewEmbedder() {
|
||||
return delegate_->GetExternalViewEmbedder();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "flutter/shell/common/surface.h"
|
||||
#include "third_party/skia/include/core/SkSurface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class GPUSurfaceSoftwareDelegate {
|
||||
public:
|
||||
@@ -28,19 +28,19 @@ class GPUSurfaceSoftware : public Surface {
|
||||
|
||||
~GPUSurfaceSoftware() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool IsValid() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> AcquireFrame(const SkISize& size) override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GetRootTransformation() const override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GetContext() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
flow::ExternalViewEmbedder* GetExternalViewEmbedder() override;
|
||||
|
||||
private:
|
||||
@@ -50,6 +50,6 @@ class GPUSurfaceSoftware : public Surface {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(GPUSurfaceSoftware);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_GPU_GPU_SURFACE_SOFTWARE_H_
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "flutter/shell/gpu/gpu_surface_vulkan.h"
|
||||
#include "flutter/fml/logging.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
GPUSurfaceVulkan::GPUSurfaceVulkan(
|
||||
fml::RefPtr<vulkan::VulkanProcTable> proc_table,
|
||||
@@ -15,12 +15,12 @@ GPUSurfaceVulkan::GPUSurfaceVulkan(
|
||||
|
||||
GPUSurfaceVulkan::~GPUSurfaceVulkan() = default;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool GPUSurfaceVulkan::IsValid() {
|
||||
return window_.IsValid();
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> GPUSurfaceVulkan::AcquireFrame(
|
||||
const SkISize& size) {
|
||||
auto surface = window_.AcquireSurface();
|
||||
@@ -44,7 +44,7 @@ std::unique_ptr<SurfaceFrame> GPUSurfaceVulkan::AcquireFrame(
|
||||
std::move(callback));
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GPUSurfaceVulkan::GetRootTransformation() const {
|
||||
// This backend does not support delegating to the underlying platform to
|
||||
// query for root surface transformations. Just return identity.
|
||||
@@ -53,9 +53,9 @@ SkMatrix GPUSurfaceVulkan::GetRootTransformation() const {
|
||||
return matrix;
|
||||
}
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GPUSurfaceVulkan::GetContext() {
|
||||
return window_.GetSkiaGrContext();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "flutter/vulkan/vulkan_native_surface.h"
|
||||
#include "flutter/vulkan/vulkan_window.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class GPUSurfaceVulkan : public Surface {
|
||||
public:
|
||||
@@ -22,16 +22,16 @@ class GPUSurfaceVulkan : public Surface {
|
||||
|
||||
~GPUSurfaceVulkan() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
bool IsValid() override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
std::unique_ptr<SurfaceFrame> AcquireFrame(const SkISize& size) override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
SkMatrix GetRootTransformation() const override;
|
||||
|
||||
// |shell::Surface|
|
||||
// |Surface|
|
||||
GrContext* GetContext() override;
|
||||
|
||||
private:
|
||||
@@ -41,6 +41,6 @@ class GPUSurfaceVulkan : public Surface {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(GPUSurfaceVulkan);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_GPU_GPU_SURFACE_VULKAN_H_
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "flutter/fml/trace_event.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
template <class T>
|
||||
using EGLResult = std::pair<bool, T>;
|
||||
@@ -272,4 +272,4 @@ bool AndroidContextGL::Resize(const SkISize& size) {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "flutter/shell/platform/android/android_native_window.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidContextGL : public fml::RefCountedThreadSafe<AndroidContextGL> {
|
||||
public:
|
||||
@@ -53,6 +53,6 @@ class AndroidContextGL : public fml::RefCountedThreadSafe<AndroidContextGL> {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidContextGL);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_GL_H_
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/shell/platform/android/android_environment_gl.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
AndroidEnvironmentGL::AndroidEnvironmentGL()
|
||||
: display_(EGL_NO_DISPLAY), valid_(false) {
|
||||
@@ -38,4 +38,4 @@ EGLDisplay AndroidEnvironmentGL::Display() const {
|
||||
return display_;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidEnvironmentGL
|
||||
: public fml::RefCountedThreadSafe<AndroidEnvironmentGL> {
|
||||
@@ -35,6 +35,6 @@ class AndroidEnvironmentGL
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidEnvironmentGL);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_ENVIRONMENT_GL_H_
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "flutter/shell/platform/android/platform_view_android_jni.h"
|
||||
#include "third_party/skia/include/gpu/GrBackendSurface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
AndroidExternalTextureGL::AndroidExternalTextureGL(
|
||||
int64_t id,
|
||||
@@ -120,4 +120,4 @@ void AndroidExternalTextureGL::Detach() {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "flutter/flow/texture.h"
|
||||
#include "flutter/fml/platform/android/jni_weak_ref.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidExternalTextureGL : public flow::Texture {
|
||||
public:
|
||||
@@ -51,6 +51,6 @@ class AndroidExternalTextureGL : public flow::Texture {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidExternalTextureGL);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_EXTERNAL_TEXTURE_GL_H_
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/shell/platform/android/android_native_window.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
AndroidNativeWindow::AndroidNativeWindow(Handle window) : window_(window) {}
|
||||
|
||||
@@ -29,4 +29,4 @@ SkISize AndroidNativeWindow::GetSize() const {
|
||||
ANativeWindow_getHeight(window_));
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "flutter/fml/memory/ref_ptr.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidNativeWindow
|
||||
: public fml::RefCountedThreadSafe<AndroidNativeWindow> {
|
||||
@@ -38,6 +38,6 @@ class AndroidNativeWindow
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidNativeWindow);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_NATIVE_WINDOW_H_
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "flutter/shell/common/rasterizer.h"
|
||||
#include "flutter/shell/platform/android/platform_view_android.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
AndroidShellHolder::AndroidShellHolder(
|
||||
flutter::Settings settings,
|
||||
@@ -162,8 +162,8 @@ void AndroidShellHolder::Launch(RunConfiguration config) {
|
||||
config = std::move(config) //
|
||||
]() mutable {
|
||||
FML_LOG(INFO) << "Attempting to launch engine configuration...";
|
||||
if (!engine || engine->Run(std::move(config)) ==
|
||||
shell::Engine::RunStatus::Failure) {
|
||||
if (!engine ||
|
||||
engine->Run(std::move(config)) == Engine::RunStatus::Failure) {
|
||||
FML_LOG(ERROR) << "Could not launch engine in configuration.";
|
||||
} else {
|
||||
FML_LOG(INFO) << "Isolate for engine configuration successfully "
|
||||
@@ -220,4 +220,4 @@ fml::WeakPtr<PlatformViewAndroid> AndroidShellHolder::GetPlatformView() {
|
||||
return platform_view_;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "flutter/shell/common/thread_host.h"
|
||||
#include "flutter/shell/platform/android/platform_view_android.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidShellHolder {
|
||||
public:
|
||||
@@ -59,6 +59,6 @@ class AndroidShellHolder {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidShellHolder);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SHELL_HOLDER_H_
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "flutter/shell/platform/android/android_surface_vulkan.h"
|
||||
#endif // SHELL_ENABLE_VULKAN
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
std::unique_ptr<AndroidSurface> AndroidSurface::Create(
|
||||
bool use_software_rendering) {
|
||||
@@ -32,4 +32,4 @@ std::unique_ptr<AndroidSurface> AndroidSurface::Create(
|
||||
|
||||
AndroidSurface::~AndroidSurface() = default;
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "flutter/shell/platform/android/android_native_window.h"
|
||||
#include "third_party/skia/include/core/SkSize.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidSurface {
|
||||
public:
|
||||
@@ -38,6 +38,6 @@ class AndroidSurface {
|
||||
virtual bool SetNativeWindow(fml::RefPtr<AndroidNativeWindow> window) = 0;
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_H_
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "flutter/fml/logging.h"
|
||||
#include "flutter/fml/memory/ref_ptr.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
static fml::RefPtr<AndroidContextGL> CreateResourceLoadingContext() {
|
||||
auto environment = fml::MakeRefCounted<AndroidEnvironmentGL>();
|
||||
@@ -125,4 +125,4 @@ intptr_t AndroidSurfaceGL::GLContextFBO() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "flutter/shell/platform/android/android_environment_gl.h"
|
||||
#include "flutter/shell/platform/android/android_surface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidSurfaceGL final : public GPUSurfaceGLDelegate,
|
||||
public AndroidSurface {
|
||||
@@ -25,37 +25,37 @@ class AndroidSurfaceGL final : public GPUSurfaceGLDelegate,
|
||||
|
||||
bool IsOffscreenContextValid() const;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool IsValid() const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
std::unique_ptr<Surface> CreateGPUSurface() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
void TeardownOnScreenContext() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool OnScreenSurfaceResize(const SkISize& size) const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextMakeCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextClearCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool SetNativeWindow(fml::RefPtr<AndroidNativeWindow> window) override;
|
||||
|
||||
// |shell::GPUSurfaceGLDelegate|
|
||||
// |GPUSurfaceGLDelegate|
|
||||
bool GLContextMakeCurrent() override;
|
||||
|
||||
// |shell::GPUSurfaceGLDelegate|
|
||||
// |GPUSurfaceGLDelegate|
|
||||
bool GLContextClearCurrent() override;
|
||||
|
||||
// |shell::GPUSurfaceGLDelegate|
|
||||
// |GPUSurfaceGLDelegate|
|
||||
bool GLContextPresent() override;
|
||||
|
||||
// |shell::GPUSurfaceGLDelegate|
|
||||
// |GPUSurfaceGLDelegate|
|
||||
intptr_t GLContextFBO() const override;
|
||||
|
||||
private:
|
||||
@@ -65,6 +65,6 @@ class AndroidSurfaceGL final : public GPUSurfaceGLDelegate,
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidSurfaceGL);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_GL_H_
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "flutter/fml/trace_event.h"
|
||||
#include "flutter/shell/platform/android/platform_view_android_jni.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -153,4 +153,4 @@ bool AndroidSurfaceSoftware::SetNativeWindow(
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "flutter/shell/gpu/gpu_surface_software.h"
|
||||
#include "flutter/shell/platform/android/android_surface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidSurfaceSoftware final : public AndroidSurface,
|
||||
public GPUSurfaceSoftwareDelegate {
|
||||
@@ -20,31 +20,31 @@ class AndroidSurfaceSoftware final : public AndroidSurface,
|
||||
|
||||
~AndroidSurfaceSoftware() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool IsValid() const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextMakeCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextClearCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
std::unique_ptr<Surface> CreateGPUSurface() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
void TeardownOnScreenContext() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool OnScreenSurfaceResize(const SkISize& size) const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool SetNativeWindow(fml::RefPtr<AndroidNativeWindow> window) override;
|
||||
|
||||
// |shell::GPUSurfaceSoftwareDelegate|
|
||||
// |GPUSurfaceSoftwareDelegate|
|
||||
sk_sp<SkSurface> AcquireBackingStore(const SkISize& size) override;
|
||||
|
||||
// |shell::GPUSurfaceSoftwareDelegate|
|
||||
// |GPUSurfaceSoftwareDelegate|
|
||||
bool PresentBackingStore(sk_sp<SkSurface> backing_store) override;
|
||||
|
||||
private:
|
||||
@@ -56,6 +56,6 @@ class AndroidSurfaceSoftware final : public AndroidSurface,
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidSurfaceSoftware);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_SOFTWARE_H_
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/shell/gpu/gpu_surface_vulkan.h"
|
||||
#include "flutter/vulkan/vulkan_native_surface_android.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
AndroidSurfaceVulkan::AndroidSurfaceVulkan()
|
||||
: proc_table_(fml::MakeRefCounted<vulkan::VulkanProcTable>()) {}
|
||||
@@ -21,12 +21,12 @@ bool AndroidSurfaceVulkan::IsValid() const {
|
||||
return proc_table_->HasAcquiredMandatoryProcAddresses();
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
void AndroidSurfaceVulkan::TeardownOnScreenContext() {
|
||||
// Nothing to do.
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
std::unique_ptr<Surface> AndroidSurfaceVulkan::CreateGPUSurface() {
|
||||
if (!IsValid()) {
|
||||
return nullptr;
|
||||
@@ -54,28 +54,28 @@ std::unique_ptr<Surface> AndroidSurfaceVulkan::CreateGPUSurface() {
|
||||
return gpu_surface;
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool AndroidSurfaceVulkan::OnScreenSurfaceResize(const SkISize& size) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool AndroidSurfaceVulkan::ResourceContextMakeCurrent() {
|
||||
FML_DLOG(ERROR) << "The vulkan backend does not support resource contexts.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool AndroidSurfaceVulkan::ResourceContextClearCurrent() {
|
||||
FML_DLOG(ERROR) << "The vulkan backend does not support resource contexts.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool AndroidSurfaceVulkan::SetNativeWindow(
|
||||
fml::RefPtr<AndroidNativeWindow> window) {
|
||||
native_window_ = std::move(window);
|
||||
return native_window_ && native_window_->IsValid();
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "flutter/shell/platform/android/android_surface.h"
|
||||
#include "flutter/vulkan/vulkan_window.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class AndroidSurfaceVulkan : public AndroidSurface {
|
||||
public:
|
||||
@@ -20,25 +20,25 @@ class AndroidSurfaceVulkan : public AndroidSurface {
|
||||
|
||||
~AndroidSurfaceVulkan() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool IsValid() const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
std::unique_ptr<Surface> CreateGPUSurface() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
void TeardownOnScreenContext() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool OnScreenSurfaceResize(const SkISize& size) const override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextMakeCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool ResourceContextClearCurrent() override;
|
||||
|
||||
// |shell::AndroidSurface|
|
||||
// |AndroidSurface|
|
||||
bool SetNativeWindow(fml::RefPtr<AndroidNativeWindow> window) override;
|
||||
|
||||
private:
|
||||
@@ -48,6 +48,6 @@ class AndroidSurfaceVulkan : public AndroidSurface {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AndroidSurfaceVulkan);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_SURFACE_VULKAN_H_
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "flutter/shell/common/switches.h"
|
||||
#include "third_party/dart/runtime/include/dart_tools_api.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
extern "C" {
|
||||
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
|
||||
@@ -148,4 +148,4 @@ bool FlutterMain::Register(JNIEnv* env) {
|
||||
return env->RegisterNatives(clazz, methods, arraysize(methods)) == 0;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/common/settings.h"
|
||||
#include "flutter/fml/macros.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class FlutterMain {
|
||||
public:
|
||||
@@ -38,6 +38,6 @@ class FlutterMain {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(FlutterMain);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_PLATFORM_ANDROID_FLUTTER_MAIN_H_
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.*;
|
||||
public class FlutterMain {
|
||||
private static final String TAG = "FlutterMain";
|
||||
|
||||
// Must match values in sky::shell::switches
|
||||
// Must match values in sky::switches
|
||||
private static final String AOT_SHARED_LIBRARY_PATH = "aot-shared-library-path";
|
||||
private static final String AOT_SNAPSHOT_PATH_KEY = "aot-snapshot-path";
|
||||
private static final String AOT_VM_SNAPSHOT_DATA_KEY = "vm-snapshot-data";
|
||||
|
||||
@@ -16,15 +16,15 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
bool result = false;
|
||||
|
||||
// Register FlutterMain.
|
||||
result = shell::FlutterMain::Register(env);
|
||||
result = flutter::FlutterMain::Register(env);
|
||||
FML_CHECK(result);
|
||||
|
||||
// Register PlatformView
|
||||
result = shell::PlatformViewAndroid::Register(env);
|
||||
result = flutter::PlatformViewAndroid::Register(env);
|
||||
FML_CHECK(result);
|
||||
|
||||
// Register VSyncWaiter.
|
||||
result = shell::VsyncWaiterAndroid::Register(env);
|
||||
result = flutter::VsyncWaiterAndroid::Register(env);
|
||||
FML_CHECK(result);
|
||||
|
||||
return JNI_VERSION_1_4;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "flutter/fml/make_copyable.h"
|
||||
#include "flutter/shell/platform/android/platform_view_android_jni.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
PlatformMessageResponseAndroid::PlatformMessageResponseAndroid(
|
||||
int response_id,
|
||||
@@ -72,4 +72,4 @@ void PlatformMessageResponseAndroid::CompleteEmpty() {
|
||||
response, nullptr);
|
||||
}));
|
||||
}
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "flutter/fml/task_runner.h"
|
||||
#include "flutter/lib/ui/window/platform_message_response.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class PlatformMessageResponseAndroid : public flutter::PlatformMessageResponse {
|
||||
public:
|
||||
@@ -36,6 +36,6 @@ class PlatformMessageResponseAndroid : public flutter::PlatformMessageResponse {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PlatformMessageResponseAndroid);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_PLATFORM_MESSAGE_RESPONSE_ANDROID_H_
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "flutter/fml/synchronization/waitable_event.h"
|
||||
#include "flutter/shell/common/io_manager.h"
|
||||
#include "flutter/shell/common/shell_io_manager.h"
|
||||
#include "flutter/shell/gpu/gpu_surface_gl_delegate.h"
|
||||
#include "flutter/shell/platform/android/android_external_texture_gl.h"
|
||||
#include "flutter/shell/platform/android/android_surface_gl.h"
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "flutter/shell/platform/android/platform_view_android_jni.h"
|
||||
#include "flutter/shell/platform/android/vsync_waiter_android.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
PlatformViewAndroid::PlatformViewAndroid(
|
||||
PlatformView::Delegate& delegate,
|
||||
@@ -157,7 +157,7 @@ void PlatformViewAndroid::InvokePlatformMessageEmptyResponseCallback(
|
||||
message_response->CompleteEmpty();
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void PlatformViewAndroid::HandlePlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) {
|
||||
JNIEnv* env = fml::jni::AttachCurrentThread();
|
||||
@@ -191,7 +191,7 @@ void PlatformViewAndroid::HandlePlatformMessage(
|
||||
}
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void PlatformViewAndroid::OnPreEngineRestart() const {
|
||||
JNIEnv* env = fml::jni::AttachCurrentThread();
|
||||
fml::jni::ScopedJavaLocalRef<jobject> view = java_object_.get(env);
|
||||
@@ -223,7 +223,7 @@ void PlatformViewAndroid::DispatchSemanticsAction(JNIEnv* env,
|
||||
std::move(args_vector));
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void PlatformViewAndroid::UpdateSemantics(
|
||||
flutter::SemanticsNodeUpdates update,
|
||||
flutter::CustomAccessibilityActionUpdates actions) {
|
||||
@@ -376,12 +376,12 @@ void PlatformViewAndroid::RegisterExternalTexture(
|
||||
std::make_shared<AndroidExternalTextureGL>(texture_id, surface_texture));
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
std::unique_ptr<VsyncWaiter> PlatformViewAndroid::CreateVSyncWaiter() {
|
||||
return std::make_unique<VsyncWaiterAndroid>(task_runners_);
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
std::unique_ptr<Surface> PlatformViewAndroid::CreateRenderingSurface() {
|
||||
if (!android_surface_) {
|
||||
return nullptr;
|
||||
@@ -389,7 +389,7 @@ std::unique_ptr<Surface> PlatformViewAndroid::CreateRenderingSurface() {
|
||||
return android_surface_->CreateGPUSurface();
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
sk_sp<GrContext> PlatformViewAndroid::CreateResourceContext() const {
|
||||
if (!android_surface_) {
|
||||
return nullptr;
|
||||
@@ -399,7 +399,7 @@ sk_sp<GrContext> PlatformViewAndroid::CreateResourceContext() const {
|
||||
// TODO(chinmaygarde): Currently, this code depends on the fact that only
|
||||
// the OpenGL surface will be able to make a resource context current. If
|
||||
// this changes, this assumption breaks. Handle the same.
|
||||
resource_context = IOManager::CreateCompatibleResourceLoadingContext(
|
||||
resource_context = ShellIOManager::CreateCompatibleResourceLoadingContext(
|
||||
GrBackend::kOpenGL_GrBackend,
|
||||
GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface());
|
||||
} else {
|
||||
@@ -409,7 +409,7 @@ sk_sp<GrContext> PlatformViewAndroid::CreateResourceContext() const {
|
||||
return resource_context;
|
||||
}
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void PlatformViewAndroid::ReleaseResourceContext() const {
|
||||
if (android_surface_) {
|
||||
android_surface_->ResourceContextClearCurrent();
|
||||
@@ -442,4 +442,4 @@ void PlatformViewAndroid::FireFirstFrameCallback() {
|
||||
FlutterViewOnFirstFrame(fml::jni::AttachCurrentThread(), view.obj());
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "flutter/shell/platform/android/android_native_window.h"
|
||||
#include "flutter/shell/platform/android/android_surface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class PlatformViewAndroid final : public PlatformView {
|
||||
public:
|
||||
@@ -42,7 +42,7 @@ class PlatformViewAndroid final : public PlatformView {
|
||||
|
||||
void NotifyChanged(const SkISize& size);
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void NotifyDestroyed() override;
|
||||
|
||||
void DispatchPlatformMessage(JNIEnv* env,
|
||||
@@ -81,28 +81,28 @@ class PlatformViewAndroid final : public PlatformView {
|
||||
std::unordered_map<int, fml::RefPtr<flutter::PlatformMessageResponse>>
|
||||
pending_responses_;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void UpdateSemantics(
|
||||
flutter::SemanticsNodeUpdates update,
|
||||
flutter::CustomAccessibilityActionUpdates actions) override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void HandlePlatformMessage(
|
||||
fml::RefPtr<flutter::PlatformMessage> message) override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void OnPreEngineRestart() const override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
std::unique_ptr<VsyncWaiter> CreateVSyncWaiter() override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
std::unique_ptr<Surface> CreateRenderingSurface() override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
sk_sp<GrContext> CreateResourceContext() const override;
|
||||
|
||||
// |shell::PlatformView|
|
||||
// |PlatformView|
|
||||
void ReleaseResourceContext() const override;
|
||||
|
||||
void InstallFirstFrameCallback();
|
||||
@@ -112,6 +112,6 @@ class PlatformViewAndroid final : public PlatformView {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_PLATFORM_ANDROID_PLATFORM_VIEW_ANDROID_H_
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#include "flutter/shell/platform/android/flutter_main.h"
|
||||
|
||||
#define ANDROID_SHELL_HOLDER \
|
||||
(reinterpret_cast<shell::AndroidShellHolder*>(shell_holder))
|
||||
(reinterpret_cast<AndroidShellHolder*>(shell_holder))
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -540,114 +540,112 @@ bool RegisterApi(JNIEnv* env) {
|
||||
{
|
||||
.name = "nativeAttach",
|
||||
.signature = "(Lio/flutter/embedding/engine/FlutterJNI;Z)J",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::AttachJNI),
|
||||
.fnPtr = reinterpret_cast<void*>(&AttachJNI),
|
||||
},
|
||||
{
|
||||
.name = "nativeDestroy",
|
||||
.signature = "(J)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::DestroyJNI),
|
||||
.fnPtr = reinterpret_cast<void*>(&DestroyJNI),
|
||||
},
|
||||
{
|
||||
.name = "nativeRunBundleAndSnapshotFromLibrary",
|
||||
.signature = "(J[Ljava/lang/String;Ljava/lang/String;"
|
||||
"Ljava/lang/String;Landroid/content/res/AssetManager;)V",
|
||||
.fnPtr =
|
||||
reinterpret_cast<void*>(&shell::RunBundleAndSnapshotFromLibrary),
|
||||
.fnPtr = reinterpret_cast<void*>(&RunBundleAndSnapshotFromLibrary),
|
||||
},
|
||||
{
|
||||
.name = "nativeGetObservatoryUri",
|
||||
.signature = "()Ljava/lang/String;",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::GetObservatoryUri),
|
||||
.fnPtr = reinterpret_cast<void*>(&GetObservatoryUri),
|
||||
},
|
||||
{
|
||||
.name = "nativeDispatchEmptyPlatformMessage",
|
||||
.signature = "(JLjava/lang/String;I)V",
|
||||
.fnPtr =
|
||||
reinterpret_cast<void*>(&shell::DispatchEmptyPlatformMessage),
|
||||
.fnPtr = reinterpret_cast<void*>(&DispatchEmptyPlatformMessage),
|
||||
},
|
||||
{
|
||||
.name = "nativeDispatchPlatformMessage",
|
||||
.signature = "(JLjava/lang/String;Ljava/nio/ByteBuffer;II)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::DispatchPlatformMessage),
|
||||
.fnPtr = reinterpret_cast<void*>(&DispatchPlatformMessage),
|
||||
},
|
||||
{
|
||||
.name = "nativeInvokePlatformMessageResponseCallback",
|
||||
.signature = "(JILjava/nio/ByteBuffer;I)V",
|
||||
.fnPtr = reinterpret_cast<void*>(
|
||||
&shell::InvokePlatformMessageResponseCallback),
|
||||
.fnPtr =
|
||||
reinterpret_cast<void*>(&InvokePlatformMessageResponseCallback),
|
||||
},
|
||||
{
|
||||
.name = "nativeInvokePlatformMessageEmptyResponseCallback",
|
||||
.signature = "(JI)V",
|
||||
.fnPtr = reinterpret_cast<void*>(
|
||||
&shell::InvokePlatformMessageEmptyResponseCallback),
|
||||
&InvokePlatformMessageEmptyResponseCallback),
|
||||
},
|
||||
|
||||
// Start of methods from FlutterView
|
||||
{
|
||||
.name = "nativeGetBitmap",
|
||||
.signature = "(J)Landroid/graphics/Bitmap;",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::GetBitmap),
|
||||
.fnPtr = reinterpret_cast<void*>(&GetBitmap),
|
||||
},
|
||||
{
|
||||
.name = "nativeSurfaceCreated",
|
||||
.signature = "(JLandroid/view/Surface;)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SurfaceCreated),
|
||||
.fnPtr = reinterpret_cast<void*>(&SurfaceCreated),
|
||||
},
|
||||
{
|
||||
.name = "nativeSurfaceChanged",
|
||||
.signature = "(JII)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SurfaceChanged),
|
||||
.fnPtr = reinterpret_cast<void*>(&SurfaceChanged),
|
||||
},
|
||||
{
|
||||
.name = "nativeSurfaceDestroyed",
|
||||
.signature = "(J)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SurfaceDestroyed),
|
||||
.fnPtr = reinterpret_cast<void*>(&SurfaceDestroyed),
|
||||
},
|
||||
{
|
||||
.name = "nativeSetViewportMetrics",
|
||||
.signature = "(JFIIIIIIIIII)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SetViewportMetrics),
|
||||
.fnPtr = reinterpret_cast<void*>(&SetViewportMetrics),
|
||||
},
|
||||
{
|
||||
.name = "nativeDispatchPointerDataPacket",
|
||||
.signature = "(JLjava/nio/ByteBuffer;I)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::DispatchPointerDataPacket),
|
||||
.fnPtr = reinterpret_cast<void*>(&DispatchPointerDataPacket),
|
||||
},
|
||||
{
|
||||
.name = "nativeDispatchSemanticsAction",
|
||||
.signature = "(JIILjava/nio/ByteBuffer;I)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::DispatchSemanticsAction),
|
||||
.fnPtr = reinterpret_cast<void*>(&DispatchSemanticsAction),
|
||||
},
|
||||
{
|
||||
.name = "nativeSetSemanticsEnabled",
|
||||
.signature = "(JZ)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SetSemanticsEnabled),
|
||||
.fnPtr = reinterpret_cast<void*>(&SetSemanticsEnabled),
|
||||
},
|
||||
{
|
||||
.name = "nativeSetAccessibilityFeatures",
|
||||
.signature = "(JI)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::SetAccessibilityFeatures),
|
||||
.fnPtr = reinterpret_cast<void*>(&SetAccessibilityFeatures),
|
||||
},
|
||||
{
|
||||
.name = "nativeGetIsSoftwareRenderingEnabled",
|
||||
.signature = "()Z",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::GetIsSoftwareRendering),
|
||||
.fnPtr = reinterpret_cast<void*>(&GetIsSoftwareRendering),
|
||||
},
|
||||
{
|
||||
.name = "nativeRegisterTexture",
|
||||
.signature = "(JJLandroid/graphics/SurfaceTexture;)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::RegisterTexture),
|
||||
.fnPtr = reinterpret_cast<void*>(&RegisterTexture),
|
||||
},
|
||||
{
|
||||
.name = "nativeMarkTextureFrameAvailable",
|
||||
.signature = "(JJ)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::MarkTextureFrameAvailable),
|
||||
.fnPtr = reinterpret_cast<void*>(&MarkTextureFrameAvailable),
|
||||
},
|
||||
{
|
||||
.name = "nativeUnregisterTexture",
|
||||
.signature = "(JJ)V",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::UnregisterTexture),
|
||||
.fnPtr = reinterpret_cast<void*>(&UnregisterTexture),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -751,7 +749,7 @@ bool PlatformViewAndroid::Register(JNIEnv* env) {
|
||||
{
|
||||
.name = "nativeLookupCallbackInformation",
|
||||
.signature = "(J)Lio/flutter/view/FlutterCallbackInformation;",
|
||||
.fnPtr = reinterpret_cast<void*>(&shell::LookupCallbackInformation),
|
||||
.fnPtr = reinterpret_cast<void*>(&LookupCallbackInformation),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -797,4 +795,4 @@ bool PlatformViewAndroid::Register(JNIEnv* env) {
|
||||
return RegisterApi(env);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "flutter/shell/platform/android/platform_view_android.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
void FlutterViewHandlePlatformMessage(JNIEnv* env,
|
||||
jobject obj,
|
||||
@@ -46,6 +46,6 @@ void SurfaceTextureGetTransformMatrix(JNIEnv* env,
|
||||
|
||||
void SurfaceTextureDetachFromGLContext(JNIEnv* env, jobject obj);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_ANDROID_PLATFORM_VIEW_ANDROID_JNI_H_
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "flutter/fml/platform/android/scoped_java_ref.h"
|
||||
#include "flutter/fml/trace_event.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
static fml::jni::ScopedJavaGlobalRef<jclass>* g_vsync_waiter_class = nullptr;
|
||||
static jmethodID g_async_wait_for_vsync_method_ = nullptr;
|
||||
@@ -24,7 +24,7 @@ VsyncWaiterAndroid::VsyncWaiterAndroid(flutter::TaskRunners task_runners)
|
||||
|
||||
VsyncWaiterAndroid::~VsyncWaiterAndroid() = default;
|
||||
|
||||
// |shell::VsyncWaiter|
|
||||
// |VsyncWaiter|
|
||||
void VsyncWaiterAndroid::AwaitVSync() {
|
||||
auto* weak_this = new std::weak_ptr<VsyncWaiter>(shared_from_this());
|
||||
jlong java_baton = reinterpret_cast<jlong>(weak_this);
|
||||
@@ -105,4 +105,4 @@ bool VsyncWaiterAndroid::Register(JNIEnv* env) {
|
||||
return env->RegisterNatives(clazz, methods, arraysize(methods)) == 0;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "flutter/fml/macros.h"
|
||||
#include "flutter/shell/common/vsync_waiter.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class VsyncWaiterAndroid final : public VsyncWaiter {
|
||||
public:
|
||||
@@ -25,7 +25,7 @@ class VsyncWaiterAndroid final : public VsyncWaiter {
|
||||
float GetDisplayRefreshRate() const override;
|
||||
|
||||
private:
|
||||
// |shell::VsyncWaiter|
|
||||
// |VsyncWaiter|
|
||||
void AwaitVSync() override;
|
||||
|
||||
static void OnNativeVsync(JNIEnv* env,
|
||||
@@ -41,6 +41,6 @@ class VsyncWaiterAndroid final : public VsyncWaiter {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(VsyncWaiterAndroid);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_PLATFORM_ANDROID_ASYNC_WAITER_ANDROID_H_
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/shell/platform/common/cpp/incoming_message_dispatcher.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
IncomingMessageDispatcher::IncomingMessageDispatcher(
|
||||
FlutterDesktopMessengerRef messenger)
|
||||
@@ -54,4 +54,4 @@ void IncomingMessageDispatcher::EnableInputBlockingForChannel(
|
||||
input_blocking_channels_.insert(channel);
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "flutter/shell/platform/common/cpp/public/flutter_messenger.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
// Manages per-channel registration of callbacks for handling messages from the
|
||||
// Flutter engine, and dispatching incoming messages to those handlers.
|
||||
@@ -73,6 +73,6 @@ class IncomingMessageDispatcher {
|
||||
std::set<std::string> input_blocking_channels_;
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_CPP_INCOMING_MESSAGE_DISPATCHER_H_
|
||||
|
||||
@@ -26,7 +26,7 @@ static constexpr char kTextInputAction[] = "inputAction";
|
||||
static constexpr char kTextInputType[] = "inputType";
|
||||
static constexpr char kTextInputTypeName[] = "name";
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
TextInputModel::TextInputModel(int client_id, const rapidjson::Value& config)
|
||||
: text_(""),
|
||||
@@ -178,4 +178,4 @@ std::unique_ptr<rapidjson::Document> TextInputModel::GetState() const {
|
||||
return args;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "rapidjson/document.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
// Handles underlying text input state, using a simple ASCII model.
|
||||
//
|
||||
// Ignores special states like "insert mode" for now.
|
||||
@@ -96,6 +96,6 @@ class TextInputModel {
|
||||
std::string::iterator selection_extent_;
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_CPP_TEXT_INPUT_MODEL_H_
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "flutter/fml/mapping.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
std::vector<uint8_t> GetVectorFromNSData(NSData* data);
|
||||
|
||||
@@ -21,6 +21,6 @@ std::unique_ptr<fml::Mapping> GetMappingFromNSData(NSData* data);
|
||||
|
||||
NSData* GetNSDataFromMapping(std::unique_ptr<fml::Mapping> mapping);
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_BUFFER_CONVERSIONS_H_
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "flutter/shell/platform/darwin/common/buffer_conversions.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
std::vector<uint8_t> GetVectorFromNSData(NSData* data) {
|
||||
const uint8_t* bytes = reinterpret_cast<const uint8_t*>(data.bytes);
|
||||
@@ -23,4 +23,4 @@ NSData* GetNSDataFromMapping(std::unique_ptr<fml::Mapping> mapping) {
|
||||
return [NSData dataWithBytes:mapping->GetMapping() length:mapping->GetSize()];
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
#include "flutter/fml/command_line.h"
|
||||
#include "flutter/fml/macros.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
fml::CommandLine CommandLineFromNSProcessInfo();
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_COMMON_COMMAND_LINE_H_
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
fml::CommandLine CommandLineFromNSProcessInfo() {
|
||||
std::vector<std::string> args_vector;
|
||||
@@ -18,4 +18,4 @@ fml::CommandLine CommandLineFromNSProcessInfo() {
|
||||
return fml::CommandLineFromIterators(args_vector.begin(), args_vector.end());
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -26,7 +26,7 @@ extern const intptr_t kPlatformStrongDillSize;
|
||||
static const char* kApplicationKernelSnapshotFileName = "kernel_blob.bin";
|
||||
|
||||
static flutter::Settings DefaultSettingsForProcess(NSBundle* bundle = nil) {
|
||||
auto command_line = shell::CommandLineFromNSProcessInfo();
|
||||
auto command_line = flutter::CommandLineFromNSProcessInfo();
|
||||
|
||||
// Precedence:
|
||||
// 1. Settings from the specified NSBundle.
|
||||
@@ -45,7 +45,7 @@ static flutter::Settings DefaultSettingsForProcess(NSBundle* bundle = nil) {
|
||||
bundle = mainBundle;
|
||||
}
|
||||
|
||||
auto settings = shell::SettingsFromCommandLine(command_line);
|
||||
auto settings = flutter::SettingsFromCommandLine(command_line);
|
||||
|
||||
settings.task_observer_add = [](intptr_t key, fml::closure callback) {
|
||||
fml::MessageLoop::GetCurrent().AddTaskObserver(key, std::move(callback));
|
||||
@@ -175,17 +175,17 @@ static flutter::Settings DefaultSettingsForProcess(NSBundle* bundle = nil) {
|
||||
return _settings;
|
||||
}
|
||||
|
||||
- (shell::RunConfiguration)runConfiguration {
|
||||
- (flutter::RunConfiguration)runConfiguration {
|
||||
return [self runConfigurationForEntrypoint:nil];
|
||||
}
|
||||
|
||||
- (shell::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil {
|
||||
- (flutter::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil {
|
||||
return [self runConfigurationForEntrypoint:entrypointOrNil libraryOrNil:nil];
|
||||
}
|
||||
|
||||
- (shell::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil
|
||||
libraryOrNil:(NSString*)dartLibraryOrNil {
|
||||
shell::RunConfiguration config = shell::RunConfiguration::InferFromSettings(_settings);
|
||||
- (flutter::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil
|
||||
libraryOrNil:(NSString*)dartLibraryOrNil {
|
||||
auto config = flutter::RunConfiguration::InferFromSettings(_settings);
|
||||
if (dartLibraryOrNil && entrypointOrNil) {
|
||||
config.SetEntrypointAndLibrary(std::string([entrypointOrNil UTF8String]),
|
||||
std::string([dartLibraryOrNil UTF8String]));
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
- (const flutter::Settings&)settings;
|
||||
|
||||
- (shell::RunConfiguration)runConfiguration;
|
||||
- (shell::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil;
|
||||
- (shell::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil
|
||||
libraryOrNil:(NSString*)dartLibraryOrNil;
|
||||
- (flutter::RunConfiguration)runConfiguration;
|
||||
- (flutter::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil;
|
||||
- (flutter::RunConfiguration)runConfigurationForEntrypoint:(NSString*)entrypointOrNil
|
||||
libraryOrNil:(NSString*)dartLibraryOrNil;
|
||||
|
||||
+ (NSString*)flutterAssetsName:(NSBundle*)bundle;
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@
|
||||
|
||||
@implementation FlutterEngine {
|
||||
fml::scoped_nsobject<FlutterDartProject> _dartProject;
|
||||
shell::ThreadHost _threadHost;
|
||||
std::unique_ptr<shell::Shell> _shell;
|
||||
flutter::ThreadHost _threadHost;
|
||||
std::unique_ptr<flutter::Shell> _shell;
|
||||
NSString* _labelPrefix;
|
||||
std::unique_ptr<fml::WeakPtrFactory<FlutterEngine>> _weakFactory;
|
||||
|
||||
fml::WeakPtr<FlutterViewController> _viewController;
|
||||
fml::scoped_nsobject<FlutterObservatoryPublisher> _publisher;
|
||||
|
||||
std::unique_ptr<shell::FlutterPlatformViewsController> _platformViewsController;
|
||||
std::unique_ptr<flutter::FlutterPlatformViewsController> _platformViewsController;
|
||||
|
||||
// Channels
|
||||
fml::scoped_nsobject<FlutterPlatformPlugin> _platformPlugin;
|
||||
@@ -89,7 +89,7 @@
|
||||
_dartProject.reset([projectOrNil retain]);
|
||||
|
||||
_pluginPublications = [NSMutableDictionary new];
|
||||
_platformViewsController.reset(new shell::FlutterPlatformViewsController());
|
||||
_platformViewsController.reset(new flutter::FlutterPlatformViewsController());
|
||||
|
||||
[self setupChannels];
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (shell::Shell&)shell {
|
||||
- (flutter::Shell&)shell {
|
||||
FML_DCHECK(_shell);
|
||||
return *_shell;
|
||||
}
|
||||
@@ -131,14 +131,14 @@
|
||||
_nextPointerFlowId++;
|
||||
}
|
||||
|
||||
- (fml::WeakPtr<shell::PlatformView>)platformView {
|
||||
- (fml::WeakPtr<flutter::PlatformView>)platformView {
|
||||
FML_DCHECK(_shell);
|
||||
return _shell->GetPlatformView();
|
||||
}
|
||||
|
||||
- (shell::PlatformViewIOS*)iosPlatformView {
|
||||
- (flutter::PlatformViewIOS*)iosPlatformView {
|
||||
FML_DCHECK(_shell);
|
||||
return static_cast<shell::PlatformViewIOS*>(_shell->GetPlatformView().get());
|
||||
return static_cast<flutter::PlatformViewIOS*>(_shell->GetPlatformView().get());
|
||||
}
|
||||
|
||||
- (fml::RefPtr<fml::TaskRunner>)platformTaskRunner {
|
||||
@@ -179,7 +179,7 @@
|
||||
- (FlutterPlatformPlugin*)platformPlugin {
|
||||
return _platformPlugin.get();
|
||||
}
|
||||
- (shell::FlutterPlatformViewsController*)platformViewsController {
|
||||
- (flutter::FlutterPlatformViewsController*)platformViewsController {
|
||||
return _platformViewsController.get();
|
||||
}
|
||||
- (FlutterTextInputPlugin*)textInputPlugin {
|
||||
@@ -286,8 +286,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (shell::Rasterizer::Screenshot)screenshot:(shell::Rasterizer::ScreenshotType)type
|
||||
base64Encode:(bool)base64Encode {
|
||||
- (flutter::Rasterizer::Screenshot)screenshot:(flutter::Rasterizer::ScreenshotType)type
|
||||
base64Encode:(bool)base64Encode {
|
||||
return self.shell.Screenshot(type, base64Encode);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
]() mutable {
|
||||
if (engine) {
|
||||
auto result = engine->Run(std::move(config));
|
||||
if (result == shell::Engine::RunStatus::Failure) {
|
||||
if (result == flutter::Engine::RunStatus::Failure) {
|
||||
FML_LOG(ERROR) << "Could not launch engine with configuration.";
|
||||
}
|
||||
}
|
||||
@@ -335,23 +335,24 @@
|
||||
// initialized.
|
||||
fml::MessageLoop::EnsureInitializedForCurrentThread();
|
||||
|
||||
_threadHost = {
|
||||
threadLabel.UTF8String, // label
|
||||
shell::ThreadHost::Type::UI | shell::ThreadHost::Type::GPU | shell::ThreadHost::Type::IO};
|
||||
_threadHost = {threadLabel.UTF8String, // label
|
||||
flutter::ThreadHost::Type::UI | flutter::ThreadHost::Type::GPU |
|
||||
flutter::ThreadHost::Type::IO};
|
||||
|
||||
// Lambda captures by pointers to ObjC objects are fine here because the
|
||||
// create call is
|
||||
// synchronous.
|
||||
shell::Shell::CreateCallback<shell::PlatformView> on_create_platform_view =
|
||||
[](shell::Shell& shell) {
|
||||
return std::make_unique<shell::PlatformViewIOS>(shell, shell.GetTaskRunners());
|
||||
flutter::Shell::CreateCallback<flutter::PlatformView> on_create_platform_view =
|
||||
[](flutter::Shell& shell) {
|
||||
return std::make_unique<flutter::PlatformViewIOS>(shell, shell.GetTaskRunners());
|
||||
};
|
||||
|
||||
shell::Shell::CreateCallback<shell::Rasterizer> on_create_rasterizer = [](shell::Shell& shell) {
|
||||
return std::make_unique<shell::Rasterizer>(shell.GetTaskRunners());
|
||||
};
|
||||
flutter::Shell::CreateCallback<flutter::Rasterizer> on_create_rasterizer =
|
||||
[](flutter::Shell& shell) {
|
||||
return std::make_unique<flutter::Rasterizer>(shell.GetTaskRunners());
|
||||
};
|
||||
|
||||
if (shell::IsIosEmbeddedViewsPreviewEnabled()) {
|
||||
if (flutter::IsIosEmbeddedViewsPreviewEnabled()) {
|
||||
// Embedded views requires the gpu and the platform views to be the same.
|
||||
// The plan is to eventually dynamically merge the threads when there's a
|
||||
// platform view in the layer tree.
|
||||
@@ -367,10 +368,10 @@
|
||||
_threadHost.io_thread->GetTaskRunner() // io
|
||||
);
|
||||
// Create the shell. This is a blocking operation.
|
||||
_shell = shell::Shell::Create(std::move(task_runners), // task runners
|
||||
std::move(settings), // settings
|
||||
on_create_platform_view, // platform view creation
|
||||
on_create_rasterizer // rasterzier creation
|
||||
_shell = flutter::Shell::Create(std::move(task_runners), // task runners
|
||||
std::move(settings), // settings
|
||||
on_create_platform_view, // platform view creation
|
||||
on_create_rasterizer // rasterzier creation
|
||||
);
|
||||
} else {
|
||||
flutter::TaskRunners task_runners(threadLabel.UTF8String, // label
|
||||
@@ -380,10 +381,10 @@
|
||||
_threadHost.io_thread->GetTaskRunner() // io
|
||||
);
|
||||
// Create the shell. This is a blocking operation.
|
||||
_shell = shell::Shell::Create(std::move(task_runners), // task runners
|
||||
std::move(settings), // settings
|
||||
on_create_platform_view, // platform view creation
|
||||
on_create_rasterizer // rasterzier creation
|
||||
_shell = flutter::Shell::Create(std::move(task_runners), // task runners
|
||||
std::move(settings), // settings
|
||||
on_create_platform_view, // platform view creation
|
||||
on_create_rasterizer // rasterzier creation
|
||||
);
|
||||
}
|
||||
|
||||
@@ -393,7 +394,7 @@
|
||||
} else {
|
||||
[self setupChannels];
|
||||
if (!_platformViewsController) {
|
||||
_platformViewsController.reset(new shell::FlutterPlatformViewsController());
|
||||
_platformViewsController.reset(new flutter::FlutterPlatformViewsController());
|
||||
}
|
||||
_publisher.reset([[FlutterObservatoryPublisher alloc] init]);
|
||||
[self maybeSetupPlatformViewChannels];
|
||||
@@ -487,8 +488,8 @@
|
||||
|
||||
#pragma mark - Screenshot Delegate
|
||||
|
||||
- (shell::Rasterizer::Screenshot)takeScreenshot:(shell::Rasterizer::ScreenshotType)type
|
||||
asBase64Encoded:(BOOL)base64Encode {
|
||||
- (flutter::Rasterizer::Screenshot)takeScreenshot:(flutter::Rasterizer::ScreenshotType)type
|
||||
asBase64Encoded:(BOOL)base64Encode {
|
||||
FML_DCHECK(_shell) << "Cannot takeScreenshot without a shell";
|
||||
return _shell->Screenshot(type, base64Encode);
|
||||
}
|
||||
@@ -503,9 +504,9 @@
|
||||
message:(NSData*)message
|
||||
binaryReply:(FlutterBinaryReply)callback {
|
||||
NSAssert(channel, @"The channel must not be null");
|
||||
fml::RefPtr<shell::PlatformMessageResponseDarwin> response =
|
||||
fml::RefPtr<flutter::PlatformMessageResponseDarwin> response =
|
||||
(callback == nil) ? nullptr
|
||||
: fml::MakeRefCounted<shell::PlatformMessageResponseDarwin>(
|
||||
: fml::MakeRefCounted<flutter::PlatformMessageResponseDarwin>(
|
||||
^(NSData* reply) {
|
||||
callback(reply);
|
||||
},
|
||||
@@ -513,7 +514,7 @@
|
||||
fml::RefPtr<flutter::PlatformMessage> platformMessage =
|
||||
(message == nil) ? fml::MakeRefCounted<flutter::PlatformMessage>(channel.UTF8String, response)
|
||||
: fml::MakeRefCounted<flutter::PlatformMessage>(
|
||||
channel.UTF8String, shell::GetVectorFromNSData(message), response);
|
||||
channel.UTF8String, flutter::GetVectorFromNSData(message), response);
|
||||
|
||||
_shell->GetPlatformView()->DispatchPlatformMessage(platformMessage);
|
||||
}
|
||||
|
||||
@@ -26,20 +26,20 @@
|
||||
|
||||
@interface FlutterEngine () <FlutterViewEngineDelegate>
|
||||
|
||||
- (shell::Shell&)shell;
|
||||
- (flutter::Shell&)shell;
|
||||
|
||||
- (void)updateViewportMetrics:(flutter::ViewportMetrics)viewportMetrics;
|
||||
- (void)dispatchPointerDataPacket:(std::unique_ptr<flutter::PointerDataPacket>)packet;
|
||||
|
||||
- (fml::RefPtr<fml::TaskRunner>)platformTaskRunner;
|
||||
|
||||
- (fml::WeakPtr<shell::PlatformView>)platformView;
|
||||
- (fml::WeakPtr<flutter::PlatformView>)platformView;
|
||||
|
||||
- (shell::Rasterizer::Screenshot)screenshot:(shell::Rasterizer::ScreenshotType)type
|
||||
base64Encode:(bool)base64Encode;
|
||||
- (flutter::Rasterizer::Screenshot)screenshot:(flutter::Rasterizer::ScreenshotType)type
|
||||
base64Encode:(bool)base64Encode;
|
||||
|
||||
- (FlutterPlatformPlugin*)platformPlugin;
|
||||
- (shell::FlutterPlatformViewsController*)platformViewsController;
|
||||
- (flutter::FlutterPlatformViewsController*)platformViewsController;
|
||||
- (FlutterTextInputPlugin*)textInputPlugin;
|
||||
- (void)launchEngine:(NSString*)entrypoint libraryURI:(NSString*)libraryOrNil;
|
||||
- (BOOL)createShell:(NSString*)entrypoint libraryURI:(NSString*)libraryOrNil;
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
||||
- (instancetype)initWithContentsScale:(CGFloat)contentsScale;
|
||||
- (std::unique_ptr<shell::IOSSurface>)createSoftwareSurface;
|
||||
- (std::unique_ptr<shell::IOSSurfaceGL>)createGLSurfaceWithContext:
|
||||
(std::shared_ptr<shell::IOSGLContext>)gl_context;
|
||||
- (std::unique_ptr<flutter::IOSSurface>)createSoftwareSurface;
|
||||
- (std::unique_ptr<flutter::IOSSurfaceGL>)createGLSurfaceWithContext:
|
||||
(std::shared_ptr<flutter::IOSGLContext>)gl_context;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -64,20 +64,20 @@
|
||||
#endif // TARGET_IPHONE_SIMULATOR
|
||||
}
|
||||
|
||||
- (std::unique_ptr<shell::IOSSurface>)createSoftwareSurface {
|
||||
- (std::unique_ptr<flutter::IOSSurface>)createSoftwareSurface {
|
||||
fml::scoped_nsobject<CALayer> layer(reinterpret_cast<CALayer*>([self.layer retain]));
|
||||
return std::make_unique<shell::IOSSurfaceSoftware>(std::move(layer), nullptr);
|
||||
return std::make_unique<flutter::IOSSurfaceSoftware>(std::move(layer), nullptr);
|
||||
}
|
||||
|
||||
- (std::unique_ptr<shell::IOSSurfaceGL>)createGLSurfaceWithContext:
|
||||
(std::shared_ptr<shell::IOSGLContext>)gl_context {
|
||||
- (std::unique_ptr<flutter::IOSSurfaceGL>)createGLSurfaceWithContext:
|
||||
(std::shared_ptr<flutter::IOSGLContext>)gl_context {
|
||||
fml::scoped_nsobject<CAEAGLLayer> eagl_layer(reinterpret_cast<CAEAGLLayer*>([self.layer retain]));
|
||||
// TODO(amirh): We can lower this to iOS 8.0 once we have a Metal rendering backend.
|
||||
// https://github.com/flutter/flutter/issues/24132
|
||||
if (@available(iOS 9.0, *)) {
|
||||
eagl_layer.get().presentsWithTransaction = YES;
|
||||
}
|
||||
return std::make_unique<shell::IOSSurfaceGL>(eagl_layer, std::move(gl_context));
|
||||
return std::make_unique<flutter::IOSSurfaceGL>(eagl_layer, std::move(gl_context));
|
||||
}
|
||||
|
||||
// TODO(amirh): implement drawLayer to suppoer snapshotting.
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
@end
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
extern const char* const kOrientationUpdateNotificationName;
|
||||
extern const char* const kOrientationUpdateNotificationKey;
|
||||
extern const char* const kOverlayStyleUpdateNotificationName;
|
||||
extern const char* const kOverlayStyleUpdateNotificationKey;
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMPLUGIN_H_
|
||||
|
||||
@@ -17,7 +17,7 @@ const UInt32 kKeyPressClickSoundId = 1306;
|
||||
|
||||
} // namespaces
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
// TODO(abarth): Move these definitions from system_chrome_impl.cc to here.
|
||||
const char* const kOrientationUpdateNotificationName =
|
||||
@@ -29,9 +29,9 @@ const char* const kOverlayStyleUpdateNotificationName =
|
||||
const char* const kOverlayStyleUpdateNotificationKey =
|
||||
"io.flutter.plugin.platform.SystemChromeOverlayNotificationKey";
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
using namespace shell;
|
||||
using namespace flutter;
|
||||
|
||||
@implementation FlutterPlatformPlugin {
|
||||
fml::WeakPtr<FlutterEngine> _engine;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "flutter/fml/platform/darwin/scoped_nsobject.h"
|
||||
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterChannels.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
void FlutterPlatformViewsController::SetFlutterView(UIView* flutter_view) {
|
||||
flutter_view_.reset([flutter_view retain]);
|
||||
@@ -330,7 +330,7 @@ void FlutterPlatformViewsController::EnsureGLOverlayInitialized(
|
||||
overlays_gr_context_ = gr_context;
|
||||
}
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
// This recognizers delays touch events from being dispatched to the responder chain until it failed
|
||||
// recognizing a gesture.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
- (void)blockGesture;
|
||||
@end
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
class IOSGLContext;
|
||||
class IOSSurface;
|
||||
@@ -120,6 +120,6 @@ class FlutterPlatformViewsController {
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(FlutterPlatformViewsController);
|
||||
};
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLATFORMVIEWS_INTERNAL_H_
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
#include "flutter/shell/platform/darwin/ios/ios_surface.h"
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
|
||||
FlutterPlatformViewLayer::FlutterPlatformViewLayer(fml::scoped_nsobject<UIView> overlay_view,
|
||||
std::unique_ptr<IOSSurface> ios_surface,
|
||||
std::unique_ptr<Surface> surface)
|
||||
@@ -20,4 +21,4 @@ FlutterPlatformViewsController::FlutterPlatformViewsController() = default;
|
||||
|
||||
FlutterPlatformViewsController::~FlutterPlatformViewsController() = default;
|
||||
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
}
|
||||
@end
|
||||
|
||||
using namespace shell;
|
||||
using namespace flutter;
|
||||
|
||||
#pragma mark - Standard serializable types
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef NS_ENUM(NSInteger, FlutterStandardField) {
|
||||
FlutterStandardFieldMap,
|
||||
};
|
||||
|
||||
namespace shell {
|
||||
namespace flutter {
|
||||
FlutterStandardField FlutterStandardFieldForDataType(FlutterStandardDataType type) {
|
||||
return (FlutterStandardField)(type + FlutterStandardFieldUInt8Data);
|
||||
}
|
||||
@@ -44,6 +44,6 @@ UInt8 elementSizeForFlutterStandardDataType(FlutterStandardDataType type) {
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
} // namespace shell
|
||||
} // namespace flutter
|
||||
|
||||
#endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTERSTANDARDCODECINTERNAL_H_
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
@protocol FlutterViewEngineDelegate <NSObject>
|
||||
|
||||
- (shell::Rasterizer::Screenshot)takeScreenshot:(shell::Rasterizer::ScreenshotType)type
|
||||
asBase64Encoded:(BOOL)base64Encode;
|
||||
- (flutter::Rasterizer::Screenshot)takeScreenshot:(flutter::Rasterizer::ScreenshotType)type
|
||||
asBase64Encoded:(BOOL)base64Encode;
|
||||
|
||||
- (shell::FlutterPlatformViewsController*)platformViewsController;
|
||||
- (flutter::FlutterPlatformViewsController*)platformViewsController;
|
||||
|
||||
@end
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
|
||||
- (instancetype)initWithDelegate:(id<FlutterViewEngineDelegate>)delegate
|
||||
opaque:(BOOL)opaque NS_DESIGNATED_INITIALIZER;
|
||||
- (std::unique_ptr<shell::IOSSurface>)createSurface:(std::shared_ptr<shell::IOSGLContext>)context;
|
||||
- (std::unique_ptr<flutter::IOSSurface>)createSurface:
|
||||
(std::shared_ptr<flutter::IOSGLContext>)context;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -71,11 +71,12 @@ id<FlutterViewEngineDelegate> _delegate;
|
||||
#endif // TARGET_IPHONE_SIMULATOR
|
||||
}
|
||||
|
||||
- (std::unique_ptr<shell::IOSSurface>)createSurface:(std::shared_ptr<shell::IOSGLContext>)context {
|
||||
- (std::unique_ptr<flutter::IOSSurface>)createSurface:
|
||||
(std::shared_ptr<flutter::IOSGLContext>)context {
|
||||
if ([self.layer isKindOfClass:[CAEAGLLayer class]]) {
|
||||
fml::scoped_nsobject<CAEAGLLayer> eagl_layer(
|
||||
reinterpret_cast<CAEAGLLayer*>([self.layer retain]));
|
||||
if (shell::IsIosEmbeddedViewsPreviewEnabled()) {
|
||||
if (flutter::IsIosEmbeddedViewsPreviewEnabled()) {
|
||||
// TODO(amirh): We can lower this to iOS 8.0 once we have a Metal rendering backend.
|
||||
// https://github.com/flutter/flutter/issues/24132
|
||||
if (@available(iOS 9.0, *)) {
|
||||
@@ -84,12 +85,12 @@ id<FlutterViewEngineDelegate> _delegate;
|
||||
eagl_layer.get().presentsWithTransaction = YES;
|
||||
}
|
||||
}
|
||||
return std::make_unique<shell::IOSSurfaceGL>(context, std::move(eagl_layer),
|
||||
[_delegate platformViewsController]);
|
||||
return std::make_unique<flutter::IOSSurfaceGL>(context, std::move(eagl_layer),
|
||||
[_delegate platformViewsController]);
|
||||
} else {
|
||||
fml::scoped_nsobject<CALayer> layer(reinterpret_cast<CALayer*>([self.layer retain]));
|
||||
return std::make_unique<shell::IOSSurfaceSoftware>(std::move(layer),
|
||||
[_delegate platformViewsController]);
|
||||
return std::make_unique<flutter::IOSSurfaceSoftware>(std::move(layer),
|
||||
[_delegate platformViewsController]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +101,7 @@ id<FlutterViewEngineDelegate> _delegate;
|
||||
return;
|
||||
}
|
||||
|
||||
auto screenshot = [_delegate takeScreenshot:shell::Rasterizer::ScreenshotType::UncompressedImage
|
||||
auto screenshot = [_delegate takeScreenshot:flutter::Rasterizer::ScreenshotType::UncompressedImage
|
||||
asBase64Encoded:NO];
|
||||
|
||||
if (!screenshot.data || screenshot.data->isEmpty() || screenshot.frame_size.isEmpty()) {
|
||||
|
||||
@@ -135,12 +135,12 @@ NSNotificationName const FlutterSemanticsUpdateNotification = @"FlutterSemantics
|
||||
NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
|
||||
[center addObserver:self
|
||||
selector:@selector(onOrientationPreferencesUpdated:)
|
||||
name:@(shell::kOrientationUpdateNotificationName)
|
||||
name:@(flutter::kOrientationUpdateNotificationName)
|
||||
object:nil];
|
||||
|
||||
[center addObserver:self
|
||||
selector:@selector(onPreferredStatusBarStyleUpdated:)
|
||||
name:@(shell::kOverlayStyleUpdateNotificationName)
|
||||
name:@(flutter::kOverlayStyleUpdateNotificationName)
|
||||
object:nil];
|
||||
|
||||
[center addObserver:self
|
||||
@@ -752,7 +752,7 @@ static flutter::PointerData::DeviceKind DeviceKindFromTouchType(UITouch* touch)
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSDictionary* info = notification.userInfo;
|
||||
|
||||
NSNumber* update = info[@(shell::kOrientationUpdateNotificationKey)];
|
||||
NSNumber* update = info[@(flutter::kOrientationUpdateNotificationKey)];
|
||||
|
||||
if (update == nil) {
|
||||
return;
|
||||
@@ -975,7 +975,7 @@ constexpr CGFloat kStandardStatusBarHeight = 20.0;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSDictionary* info = notification.userInfo;
|
||||
|
||||
NSNumber* update = info[@(shell::kOverlayStyleUpdateNotificationKey)];
|
||||
NSNumber* update = info[@(flutter::kOverlayStyleUpdateNotificationKey)];
|
||||
|
||||
if (update == nil) {
|
||||
return;
|
||||
@@ -992,7 +992,7 @@ constexpr CGFloat kStandardStatusBarHeight = 20.0;
|
||||
|
||||
#pragma mark - Platform views
|
||||
|
||||
- (shell::FlutterPlatformViewsController*)platformViewsController {
|
||||
- (flutter::FlutterPlatformViewsController*)platformViewsController {
|
||||
return [_engine.get() platformViewsController];
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
@interface FlutterViewController ()
|
||||
|
||||
- (fml::WeakPtr<FlutterViewController>)getWeakPtr;
|
||||
- (shell::FlutterPlatformViewsController*)platformViewsController;
|
||||
- (flutter::FlutterPlatformViewsController*)platformViewsController;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user