mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
d7f807c960
This makes the code easier to share between Fuchsia and stand-alone Flutter.
30 lines
703 B
C++
30 lines
703 B
C++
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "flutter/runtime/runtime_init.h"
|
|
|
|
#include "flutter/glue/trace_event.h"
|
|
#include "flutter/runtime/dart_init.h"
|
|
#include "flutter/runtime/platform_impl.h"
|
|
#include "flutter/sky/engine/public/web/Sky.h"
|
|
#include "lib/ftl/logging.h"
|
|
|
|
namespace blink {
|
|
namespace {
|
|
|
|
PlatformImpl* g_platform_impl = nullptr;
|
|
|
|
} // namespace
|
|
|
|
void InitRuntime() {
|
|
TRACE_EVENT0("flutter", "InitRuntime");
|
|
|
|
FTL_CHECK(!g_platform_impl);
|
|
g_platform_impl = new PlatformImpl();
|
|
InitEngine(g_platform_impl);
|
|
InitDartVM();
|
|
}
|
|
|
|
} // namespace blink
|