Skip to content

Commit

Permalink
Merge branch 'master' into embedder_win
Browse files Browse the repository at this point in the history
  • Loading branch information
ds84182 committed Mar 31, 2018
2 parents 245bbf2 + f6905f5 commit 2054aae
Show file tree
Hide file tree
Showing 152 changed files with 6,222 additions and 5,916 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -7,3 +7,4 @@ Google Inc.
Jim Simon <jim.j.simon@gmail.com>
Ali Bitek <alibitek@protonmail.ch>
Jacob Greenfield <jacob.greenfield.256@gmail.com>
Dan Field <dfield@gmail.com>
61 changes: 51 additions & 10 deletions BUILD.gn
Expand Up @@ -2,16 +2,24 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("$flutter_root/common/config.gni")

group("flutter") {
testonly = true

public_deps = [
"$flutter_root/lib/snapshot:kernel_platform_files",
"$flutter_root/lib/snapshot:generate_snapshot_bin",
"$flutter_root/lib/snapshot:kernel_platform_files",
"$flutter_root/sky",
"$flutter_root/third_party/txt",
]

if (flutter_runtime_mode != "debug") {
public_deps += [
"$flutter_root/lib/snapshot:entry_points_json_files",
]
}

if (!is_fuchsia && !is_fuchsia_host) {
if (current_toolchain == host_toolchain) {
public_deps += [
Expand Down Expand Up @@ -61,28 +69,61 @@ if (is_fuchsia) {
deps = [
"$flutter_root/content_handler:aot",
]
if (flutter_runtime_mode != "release") {
deps += [
"//third_party/dart/runtime/observatory:embedded_archive_observatory",
]
}

binary = "flutter_aot_runner"

meta = [ {
path = rebase_path("content_handler/meta/sandbox")
dest = "sandbox"
} ]
if (flutter_runtime_mode != "release") {
resources = [
{
path = rebase_path(
"$root_gen_dir/observatory/embedded_archive_observatory.tar")
dest = "observatory.tar"
},
]
}

meta = [
{
path = rebase_path("content_handler/meta/sandbox")
dest = "sandbox"
},
]
}

package("flutter_jit_runner") {
deps = [
"$flutter_root/content_handler:jit",
]
if (flutter_runtime_mode != "release") {
deps += [
"//third_party/dart/runtime/observatory:embedded_archive_observatory",
]
}

binary = "flutter_jit_runner"

meta = [ {
path = rebase_path("content_handler/meta/sandbox")
dest = "sandbox"
} ]
}
if (flutter_runtime_mode != "release") {
resources = [
{
path = rebase_path(
"$root_gen_dir/observatory/embedded_archive_observatory.tar")
dest = "observatory.tar"
},
]
}

meta = [
{
path = rebase_path("content_handler/meta/sandbox")
dest = "sandbox"
},
]
}
} else {
group("dist") {
testonly = true
Expand Down
23 changes: 15 additions & 8 deletions CONTRIBUTING.md
Expand Up @@ -95,8 +95,10 @@ Run the following steps, from the `src` directory created in the steps above:

* `git pull upstream master` in `src/flutter` to update the Flutter Engine repo.
* `gclient sync` to update your dependencies.
* `./flutter/tools/gn --android --unoptimized` to prepare your build files (or `--android --android-cpu [x86|x64] --unoptimized` for x86/x64 emulators) .
* `ninja -C out/android_debug_unopt` to actually build the Android binary (or `out/android_debug_unopt_x64 for x86/x64 emulators).
* `./flutter/tools/gn --android --unoptimized` to prepare your build files for device-side executables (or `--android --android-cpu [x86|x64] --unoptimized` for x86/x64 emulators) .
* `./flutter/tools/gn --unoptimized` to prepare the build files for host-side executables.
* `ninja -C out/android_debug_unopt -C out/host_debug_unopt` to build all executables (use `out/android_debug_unopt_x64` for x86/x64 emulators).
* For Googlers, consider also using the option `-j 1000` to parallelize the build using Goma.

This builds a debug-enabled ("unoptimized") binary configured to run Dart in
checked mode ("debug"). There are other versions, [discussed on the wiki](https://github.com/flutter/flutter/wiki/Flutter's-modes).
Expand Down Expand Up @@ -137,10 +139,12 @@ to test the engine.
* Make sure you have Xcode 9.0+ installed.
* `git pull upstream master` in `src/flutter` to update the Flutter Engine repo.
* `gclient sync` to update dependencies.
* `./flutter/tools/gn --ios --unoptimized` to prepare build files (or `--ios --simulator --unoptimized` for simulator).
* `./flutter/tools/gn --ios --unoptimized` to prepare build files for device-side executables (or `--ios --simulator --unoptimized` for simulator).
* For a discussion on the various flags and modes, [read this discussion](https://github.com/flutter/flutter/wiki/Flutter's-modes).
* This also produces an Xcode project for working with the engine source code at `out/ios_debug_unopt`
* `ninja -C out/ios_debug_unopt` to build iOS artifacts (or `out/ios_debug_sim_unopt` for simulator).
* `./flutter/tools/gn --unoptimized` to prepare the build files for host-side executables.
* `ninja -C out/ios_debug_unopt -C out/host_debug_unopt` to build all artifacts (use `out/ios_debug_sim_unopt` for Simulator).
* For Googlers, consider also using the option `-j 1000` to parallelize the build using Goma.

Once the artifacts are built, you can start using them in your application by following these steps:
* `cd /path/to/flutter/examples/hello_world`
Expand All @@ -151,15 +155,18 @@ Once the artifacts are built, you can start using them in your application by fo

### Desktop (Mac and Linux), for tests

To run the tests, you should first clone [the main Flutter repository](https://github.com/flutter/flutter).
See [the instructions for contributing](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md)
to the main Flutter repository for detailed instructions. By default, Flutter will use the bundled version
of the engine. Follow the next steps to run tests using the locally-built engine:

* `git pull upstream master` in `src/flutter` to update the Flutter Engine repo.
* `gclient sync` to update your dependencies.
* `./flutter/tools/gn --unoptimized` to prepare your build files.
* `ninja -C out/host_debug_unopt` to build a desktop unoptimized binary.
* For Googlers, consider also using the option `-j 1000` to parallelize the build using Goma.
* `--unoptimized` disables C++ compiler optimizations and does not strip debug symbols. You may skip the flag and invoke `ninja -C out/host_debug` if you would rather have the native components optimized.

To run the tests, you'll also need to clone [the main Flutter repository](https://github.com/flutter/flutter).
See [the instructions for contributing](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md)
to the main Flutter repository for detailed instructions.
* `flutter test --local-engine=host_debug_unopt` will run tests using the locally-built `flutter_tester`.

### Desktop (gen_snapshot for Windows)

Expand Down
54 changes: 27 additions & 27 deletions DEPS
Expand Up @@ -23,46 +23,46 @@ vars = {
'fuchsia_git': 'https://fuchsia.googlesource.com',
'github_git': 'https://github.com',
'skia_git': 'https://skia.googlesource.com',
'skia_revision': 'f802e757646f424b563fdc1f5b5ee3c677659e98',
'skia_revision': 'abf7b763e2c1ba069942dedec914494817fd27a8',

# When updating the Dart revision, ensure that all entries that are
# dependencies of Dart are also updated to match the entries in the
# Dart SDK's DEPS file for that revision of Dart. The DEPS file for
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
# You can use //tools/dart/create_updated_flutter_deps.py to produce
# updated revision list of existing dependencies.
'dart_revision': '0b4f01f7593c8c42a77dc27d1fc234c95eacc88e',
'dart_revision': '52afcba357ad398e8c24f3e3363ac6ff5293df63',

'dart_args_tag': '0.13.7',
'dart_async_tag': '2.0.4',
'dart_args_tag': '1.4.1',
'dart_async_tag': '2.0.6',
'dart_barback_tag': '0.15.2+14',
'dart_bazel_worker_tag': 'v0.1.9',
'dart_boolean_selector_tag': '1.0.2',
'dart_boringssl_gen_rev': 'd2b56d1b7657e52eb5a1f075968c773aa3e53614',
'dart_boringssl_rev': 'd519bf6be0b447fb80fbc539d4bff4479b5482a2',
'dart_boolean_selector_tag': '1.0.3',
'dart_boringssl_gen_rev': '344f455fd13d46f054726638e76026156ea73aa9',
'dart_boringssl_rev': '672f6fc2486745d0cabc3aaeb4e0a3cd13b37b12',
'dart_charcode_tag': 'v1.1.1',
'dart_cli_util_tag': '0.1.2+1',
'dart_collection_tag': '1.14.5',
'dart_collection_tag': '1.14.6',
'dart_convert_tag': '2.0.1',
'dart_crypto_tag': '2.0.2+1',
'dart_csslib_tag': '0.14.1',
'dart_dart2js_info_tag': '0.5.5+1',
'dart_dart_style_tag': '1.0.9',
'dart_dartdoc_tag': 'v0.16.0',
'dart_dart_style_tag': '1.0.10',
'dart_dartdoc_tag': 'v0.18.0',
'dart_fixnum_tag': '0.10.5',
'dart_glob_tag': '1.1.5',
'dart_html_tag': '0.13.2+2',
'dart_html_tag': '0.13.3',
'dart_http_multi_server_tag': '2.0.4',
'dart_http_parser_tag': '3.1.1',
'dart_http_retry_tag': '0.1.0',
'dart_http_tag': '0.11.3+14',
'dart_http_retry_tag': '0.1.1',
'dart_http_tag': '0.11.3+16',
'dart_http_throttle_tag': '1.0.1',
'dart_intl_tag': '0.15.2',
'dart_isolate_tag': '1.1.0',
'dart_json_rpc_2_tag': '2.0.6',
'dart_linter_tag': '0.1.43',
'dart_linter_tag': '0.1.46',
'dart_logging_tag': '0.11.3+1',
'dart_markdown_tag': '1.0.0',
'dart_markdown_tag': '1.1.1',
'dart_matcher_tag': '0.12.1+4',
'dart_mime_tag': '0.9.6',
'dart_mockito_tag': 'a92db054fba18bc2d605be7670aee74b7cadc00a',
Expand All @@ -74,21 +74,21 @@ vars = {
'dart_path_tag': '1.5.1',
'dart_plugin_tag': '0.2.0+2',
'dart_pool_tag': '1.3.4',
'dart_protobuf_tag': '0.7.0',
'dart_pub_rev': '64c5f40adf6828da1b63320dd39bcedbef1354c6',
'dart_protobuf_tag': '0.7.1',
'dart_pub_rev': '875d35005a7d33f367d70a3e31e9d3bad5d1ebd8',
'dart_pub_semver_tag': '1.3.2',
'dart_quiver_tag': '0.28.0',
'dart_quiver_tag': '5aaa3f58c48608af5b027444d561270b53f15dbf',
'dart_resource_rev': 'af5a5bf65511943398146cf146e466e5f0b95cb9',
'dart_root_certificates_rev': '16ef64be64c7dfdff2b9f4b910726e635ccc519e',
'dart_shelf_packages_handler_tag': '1.0.3',
'dart_shelf_static_rev': '3558aa35a0d2f0f35868c3fd64b258e140db0122',
'dart_shelf_tag': '0.7.1',
'dart_shelf_static_rev': 'v0.2.7',
'dart_shelf_tag': '0.7.2',
'dart_shelf_web_socket_tag': '0.2.2',
'dart_source_map_stack_trace_tag': '1.1.4',
'dart_source_maps_tag': '0.10.4',
'dart_source_span_tag': '1.4.0',
'dart_stack_trace_tag': '1.9.0',
'dart_stream_channel_tag': '1.6.2',
'dart_stack_trace_tag': '1.9.2',
'dart_stream_channel_tag': '1.6.4',
'dart_string_scanner_tag': '1.0.2',
'dart_test_tag': '0.12.30+1',
'dart_tuple_tag': 'v1.0.1',
Expand All @@ -115,7 +115,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '06e2d5a3e84459931ca9bedd3171c76f9953ebfa',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '35d44f8c4e20043de7615adf2f1203acb12ad236',

# Fuchsia compatibility
#
Expand All @@ -124,16 +124,16 @@ deps = {
# and not have to specific specific hashes.

'src/garnet':
Var('fuchsia_git') + '/garnet' + '@' + 'b3ba6b6d6ab8ef658278cc43c9f839a8a8d1718e',
Var('fuchsia_git') + '/garnet' + '@' + 'b7492b5f34e32248b164eb48ae8e67995aebda67',

'src/topaz':
Var('fuchsia_git') + '/topaz' + '@' + 'acf6b391d5ddad479427260b8683799685319dba',
Var('fuchsia_git') + '/topaz' + '@' + 'e331f910c1003d154a4de6e1b5356f8d785fd6ec',

'src/third_party/benchmark':
Var('fuchsia_git') + '/third_party/benchmark' + '@' + '296537bc48d380adf21567c5d736ab79f5363d22',

'src/third_party/gtest':
Var('fuchsia_git') + '/third_party/gtest' + '@' + 'c00f82917331efbbd27124b537e4ccc915a02b72',
'src/third_party/googletest':
Var('fuchsia_git') + '/third_party/googletest' + '@' + '2072b0053d3537fa5e8d222e34c759987aae1320',

'src/third_party/rapidjson':
Var('fuchsia_git') + '/third_party/rapidjson' + '@' + '9defbb0209a534ffeb3a2b79d5ee440a77407292',
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -10,9 +10,9 @@ The Flutter Engine is the runtime environment for hosting Flutter applications.
Most developers will interact with Flutter via the Flutter Framework and APIs,
which run inside the engine.

_Flutter is an early-stage open-source project._ We are still adding
features. However,
you can build demos and examples today. We hope you try it out and send
_Flutter is still under development and we continue to add
features._ However, it is ready for use by early adopters who are willing to deal
with the odd wrinkle or two along the way. We hope you try it out and send
us [feedback](mailto:flutter-dev@googlegroups.com).

- For information about using Flutter to build apps, please see
Expand Down
1 change: 1 addition & 0 deletions assets/BUILD.gn
Expand Up @@ -4,6 +4,7 @@

source_set("assets") {
sources = [
"asset_provider.h",
"directory_asset_bundle.cc",
"directory_asset_bundle.h",
"unzipper_provider.cc",
Expand Down
25 changes: 25 additions & 0 deletions assets/asset_provider.h
@@ -0,0 +1,25 @@
// Copyright 2018 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.

#ifndef FLUTTER_ASSETS_ASSET_PROVIDER_H_
#define FLUTTER_ASSETS_ASSET_PROVIDER_H_

#include <string>
#include <vector>

#include "lib/fxl/memory/ref_counted.h"

namespace blink {

class AssetProvider
: public fxl::RefCountedThreadSafe<AssetProvider>
{
public:
virtual bool GetAsBuffer(const std::string& asset_name,
std::vector<uint8_t>* data) = 0;
virtual ~AssetProvider() = default;
};

} // namespace blink
#endif // FLUTTER_ASSETS_ASSET_PROVIDER_H
7 changes: 4 additions & 3 deletions assets/directory_asset_bundle.h
Expand Up @@ -8,21 +8,22 @@
#include <string>
#include <vector>

#include "flutter/assets/asset_provider.h"
#include "lib/fxl/files/unique_fd.h"
#include "lib/fxl/macros.h"
#include "lib/fxl/memory/ref_counted.h"

namespace blink {

class DirectoryAssetBundle
: public fxl::RefCountedThreadSafe<DirectoryAssetBundle> {
: public AssetProvider {
public:
explicit DirectoryAssetBundle(std::string directory);
// Expects fd to be valid, otherwise the file descriptor is ignored.
explicit DirectoryAssetBundle(fxl::UniqueFD fd);
~DirectoryAssetBundle();
virtual ~DirectoryAssetBundle();

bool GetAsBuffer(const std::string& asset_name, std::vector<uint8_t>* data);
virtual bool GetAsBuffer(const std::string& asset_name, std::vector<uint8_t>* data);

std::string GetPathForAsset(const std::string& asset_name);

Expand Down
5 changes: 2 additions & 3 deletions content_handler/BUILD.gn
Expand Up @@ -64,11 +64,10 @@ template("flutter_content_handler") {
"//garnet/public/lib/svc/cpp",
"//garnet/public/lib/ui/input/fidl",
"//garnet/public/lib/ui/scenic:client",
"//garnet/public/lib/ui/views/fidl",
"//garnet/public/lib/ui/views/fidl:v1",
"//garnet/public/lib/vulkan",
"//garnet/public/lib/zip",
"//peridot/public/lib/clipboard/fidl",
"//peridot/public/lib/context/fidl",
"//peridot/public/lib:fidl",
"//third_party/rapidjson",
"//third_party/skia",
"//topaz/lib/tonic",
Expand Down
5 changes: 2 additions & 3 deletions content_handler/accessibility_bridge.cc
Expand Up @@ -8,16 +8,15 @@

#include "flutter/lib/ui/semantics/semantics_node.h"
#include "lib/app/cpp/application_context.h"
#include "lib/context/fidl/context_writer.fidl.h"
#include "lib/fxl/macros.h"
#include "third_party/rapidjson/rapidjson/document.h"
#include "third_party/rapidjson/rapidjson/stringbuffer.h"
#include "third_party/rapidjson/rapidjson/writer.h"

namespace flutter_runner {

AccessibilityBridge::AccessibilityBridge(app::ApplicationContext* context)
: writer_(context->ConnectToEnvironmentService<maxwell::ContextWriter>()) {}
AccessibilityBridge::AccessibilityBridge(component::ApplicationContext* context)
: writer_(context->ConnectToEnvironmentService<modular::ContextWriter>()) {}

void AccessibilityBridge::UpdateSemantics(
const blink::SemanticsNodeUpdates& update) {
Expand Down

0 comments on commit 2054aae

Please sign in to comment.