From 498a34aff75d8667f0a8e2dac04b230212cb45b4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Mar 2020 15:06:01 -0400 Subject: [PATCH 01/58] Roll src/third_party/skia 23899c64e3db..78dac6dcb222 (19 commits) (#17069) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 7 +++---- sky/packages/sky_engine/LICENSE | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DEPS b/DEPS index acca636dd3618..e98b158a687e5 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '23899c64e3db9378bcc3a960962777f1a5c49ab4', + 'skia_revision': '78dac6dcb222b38234d20b3deab68af1bff6b6e3', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 0c7281591b920..3c4530a642bd9 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 3e8453212934f21efae403dc1d9a1abc +Signature: b6d5bdb0bb5b9596edb4fa3facb21f23 UNUSED LICENSES: @@ -173,7 +173,6 @@ USED LICENSES: ==================================================================================================== LIBRARY: etc1 -LIBRARY: skia LIBRARY: vulkan ORIGIN: ../../../flutter/third_party/txt/LICENSE TYPE: LicenseType.apache @@ -185,7 +184,6 @@ FILE: ../../../third_party/skia/include/third_party/vulkan/vulkan/vulkan_ios.h FILE: ../../../third_party/skia/include/third_party/vulkan/vulkan/vulkan_macos.h FILE: ../../../third_party/skia/include/third_party/vulkan/vulkan/vulkan_win32.h FILE: ../../../third_party/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h -FILE: ../../../third_party/skia/src/images/SkWebpEncoder.cpp FILE: ../../../third_party/skia/third_party/etc1/etc1.cpp FILE: ../../../third_party/skia/third_party/etc1/etc1.h ---------------------------------------------------------------------------------------------------- @@ -1424,7 +1422,6 @@ FILE: ../../../third_party/skia/specs/web-img-decode/current/index.html FILE: ../../../third_party/skia/specs/web-img-decode/proposed/impl/impl.js FILE: ../../../third_party/skia/specs/web-img-decode/proposed/index.html FILE: ../../../third_party/skia/src/core/SkOrderedReadBuffer.h -FILE: ../../../third_party/skia/src/opts/SkVM_opts.h FILE: ../../../third_party/skia/src/ports/SkTLS_pthread.cpp FILE: ../../../third_party/skia/src/ports/SkTLS_win.cpp FILE: ../../../third_party/skia/src/sksl/lex/sksl.lex @@ -5341,6 +5338,7 @@ FILE: ../../../third_party/skia/docs/examples/zero_off_dashing.cpp FILE: ../../../third_party/skia/src/gpu/tessellate/GrFillPathShader.cpp FILE: ../../../third_party/skia/src/gpu/tessellate/GrFillPathShader.h FILE: ../../../third_party/skia/src/gpu/tessellate/GrPathShader.h +FILE: ../../../third_party/skia/src/opts/SkVM_opts.h ---------------------------------------------------------------------------------------------------- Copyright 2020 Google LLC. @@ -6568,6 +6566,7 @@ FILE: ../../../third_party/skia/src/core/SkScalar.cpp FILE: ../../../third_party/skia/src/core/SkTextFormatParams.h FILE: ../../../third_party/skia/src/images/SkJPEGWriteUtility.cpp FILE: ../../../third_party/skia/src/images/SkJPEGWriteUtility.h +FILE: ../../../third_party/skia/src/images/SkWebpEncoder.cpp FILE: ../../../third_party/skia/src/pdf/SkDeflate.cpp FILE: ../../../third_party/skia/src/pdf/SkDeflate.h FILE: ../../../third_party/skia/src/pdf/SkPDFFormXObject.cpp diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17f306abefc94..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -515,7 +515,6 @@ boringssl engine etc1 observatory_pub_packages -skia txt vulkan wuffs From bcefcdb8801ac11a373569dd12aa48b8f3c4a97d Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 12:28:24 -0700 Subject: [PATCH 02/58] Use the ELF loader to setup AOT symbols in benchmark runner. (#17051) We no longer package AOT artifacts as discrete blobs. The portable ELF loader from the testing library may be used instead. Fixes https://github.com/flutter/flutter/issues/52263 --- lib/ui/BUILD.gn | 5 +---- runtime/BUILD.gn | 1 + shell/common/BUILD.gn | 2 ++ shell/common/shell_benchmarks.cc | 26 +++++++------------------- shell/platform/embedder/BUILD.gn | 1 + testing/BUILD.gn | 2 +- 6 files changed, 13 insertions(+), 24 deletions(-) diff --git a/lib/ui/BUILD.gn b/lib/ui/BUILD.gn index 235c1acdefdf9..4d3210d3bef37 100644 --- a/lib/ui/BUILD.gn +++ b/lib/ui/BUILD.gn @@ -175,10 +175,7 @@ if (current_toolchain == host_toolchain) { ":ui", ":ui_unittests_fixtures", "//flutter/common", - "//flutter/fml", - "//flutter/lib/snapshot", - "//flutter/runtime", - "//flutter/shell/common", + "//flutter/testing", "//flutter/testing:dart", "//flutter/testing:opengl", "//flutter/third_party/tonic", diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index a61d36256698b..59ebfbedc9d92 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -150,6 +150,7 @@ source_set("runtime_unittests_common") { "//flutter/fml", "//flutter/lib/snapshot", "//flutter/shell/common", + "//flutter/testing", "//flutter/testing:dart", "//flutter/third_party/tonic", "//third_party/dart/runtime/bin:elf_loader", diff --git a/shell/common/BUILD.gn b/shell/common/BUILD.gn index 970638ea8dac6..8e4a48e2bb000 100644 --- a/shell/common/BUILD.gn +++ b/shell/common/BUILD.gn @@ -209,6 +209,7 @@ if (enable_unittests) { "//flutter/fml/dart", "//flutter/lib/ui:ui", "//flutter/shell", + "//flutter/testing", "//flutter/testing:dart", ] @@ -278,6 +279,7 @@ if (enable_unittests) { deps = [ ":shell_unittests_fixtures", "//flutter/benchmarking", + "//flutter/testing:dart", "//flutter/testing:testing_lib", ] } diff --git a/shell/common/shell_benchmarks.cc b/shell/common/shell_benchmarks.cc index f7eb44e4c551a..99d38e70d8143 100644 --- a/shell/common/shell_benchmarks.cc +++ b/shell/common/shell_benchmarks.cc @@ -7,6 +7,7 @@ #include "flutter/runtime/dart_vm.h" #include "flutter/shell/common/shell.h" #include "flutter/shell/common/thread_host.h" +#include "flutter/testing/elf_loader.h" #include "flutter/testing/testing.h" namespace flutter { @@ -18,6 +19,8 @@ static void StartupAndShutdownShell(benchmark::State& state, fml::FilePermission::kRead); std::unique_ptr shell; std::unique_ptr thread_host; + testing::ELFAOTSymbols aot_symbols; + { benchmarking::ScopedPauseTiming pause(state, !measure_startup); Settings settings = {}; @@ -25,25 +28,10 @@ static void StartupAndShutdownShell(benchmark::State& state, settings.task_observer_remove = [](intptr_t) {}; if (DartVM::IsRunningPrecompiledCode()) { - settings.vm_snapshot_data = [&]() { - return fml::FileMapping::CreateReadOnly(assets_dir, "vm_snapshot_data"); - }; - - settings.isolate_snapshot_data = [&]() { - return fml::FileMapping::CreateReadOnly(assets_dir, - "isolate_snapshot_data"); - }; - - settings.vm_snapshot_instr = [&]() { - return fml::FileMapping::CreateReadExecute(assets_dir, - "vm_snapshot_instr"); - }; - - settings.isolate_snapshot_instr = [&]() { - return fml::FileMapping::CreateReadExecute(assets_dir, - "isolate_snapshot_instr"); - }; - + aot_symbols = testing::LoadELFSymbolFromFixturesIfNeccessary(); + FML_CHECK( + testing::PrepareSettingsForAOTWithSymbols(settings, aot_symbols)) + << "Could not setup settings with AOT symbols."; } else { settings.application_kernels = [&]() { std::vector> kernel_mappings; diff --git a/shell/platform/embedder/BUILD.gn b/shell/platform/embedder/BUILD.gn index 7215622912c76..09547a3de27e0 100644 --- a/shell/platform/embedder/BUILD.gn +++ b/shell/platform/embedder/BUILD.gn @@ -137,6 +137,7 @@ if (current_toolchain == host_toolchain) { "//flutter/flow", "//flutter/lib/ui", "//flutter/runtime", + "//flutter/testing", "//flutter/testing:dart", "//flutter/testing:opengl", "//flutter/testing:skia", diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 67a920f10128b..b8c3bd0a2d53b 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -52,7 +52,7 @@ source_set("dart") { ] public_deps = [ - ":testing", + ":testing_lib", "//flutter/common", "//flutter/runtime", "//flutter/runtime:libdart", From 220039a9c80e2f1da151821b9a6f28d06fd93389 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Tue, 10 Mar 2020 14:09:10 -0700 Subject: [PATCH 03/58] Revert "Fix bounds of image_filter_layer (#16960)" (#17074) This reverts commit 8b6119ec8367bbe3de52fd5f40737219be8d5b8b. --- flow/layers/image_filter_layer.cc | 14 +----- flow/layers/image_filter_layer_unittests.cc | 52 +++++---------------- 2 files changed, 12 insertions(+), 54 deletions(-) diff --git a/flow/layers/image_filter_layer.cc b/flow/layers/image_filter_layer.cc index c44303a43f7d5..119fddc181fb8 100644 --- a/flow/layers/image_filter_layer.cc +++ b/flow/layers/image_filter_layer.cc @@ -11,21 +11,9 @@ ImageFilterLayer::ImageFilterLayer(sk_sp filter) void ImageFilterLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) { - TRACE_EVENT0("flutter", "ImageFilterLayer::Preroll"); - Layer::AutoPrerollSaveLayerState save = Layer::AutoPrerollSaveLayerState::Create(context); - - SkRect child_paint_bounds = SkRect::MakeEmpty(); - PrerollChildren(context, matrix, &child_paint_bounds); - if (filter_) { - const SkIRect filter_input_bounds = child_paint_bounds.roundOut(); - SkIRect filter_output_bounds = - filter_->filterBounds(filter_input_bounds, SkMatrix::I(), - SkImageFilter::kForward_MapDirection); - child_paint_bounds = SkRect::Make(filter_output_bounds); - } - set_paint_bounds(child_paint_bounds); + ContainerLayer::Preroll(context, matrix); if (!context->has_platform_view && context->raster_cache && SkRect::Intersects(context->cull_rect, paint_bounds())) { diff --git a/flow/layers/image_filter_layer_unittests.cc b/flow/layers/image_filter_layer_unittests.cc index 94f9f902a3107..63357fbd89ce8 100644 --- a/flow/layers/image_filter_layer_unittests.cc +++ b/flow/layers/image_filter_layer_unittests.cc @@ -83,11 +83,8 @@ TEST_F(ImageFilterLayerTest, SimpleFilter) { auto layer = std::make_shared(layer_filter); layer->Add(mock_layer); - const SkRect child_rounded_bounds = - SkRect::MakeLTRB(5.0f, 6.0f, 21.0f, 22.0f); - layer->Preroll(preroll_context(), initial_transform); - EXPECT_EQ(layer->paint_bounds(), child_rounded_bounds); + EXPECT_EQ(layer->paint_bounds(), child_bounds); EXPECT_TRUE(layer->needs_painting()); EXPECT_EQ(mock_layer->parent_matrix(), initial_transform); @@ -99,8 +96,8 @@ TEST_F(ImageFilterLayerTest, SimpleFilter) { MockCanvas::DrawCall{0, MockCanvas::SaveData{1}}, MockCanvas::DrawCall{1, MockCanvas::SetMatrixData{SkMatrix()}}, MockCanvas::DrawCall{ - 1, MockCanvas::SaveLayerData{child_rounded_bounds, - filter_paint, nullptr, 2}}, + 1, MockCanvas::SaveLayerData{child_bounds, filter_paint, + nullptr, 2}}, MockCanvas::DrawCall{ 2, MockCanvas::DrawPathData{child_path, child_paint}}, MockCanvas::DrawCall{2, MockCanvas::RestoreData{1}}, @@ -108,26 +105,6 @@ TEST_F(ImageFilterLayerTest, SimpleFilter) { })); } -TEST_F(ImageFilterLayerTest, SimpleFilterBounds) { - const SkMatrix initial_transform = SkMatrix::MakeTrans(0.5f, 1.0f); - const SkRect child_bounds = SkRect::MakeLTRB(5.0f, 6.0f, 20.5f, 21.5f); - const SkPath child_path = SkPath().addRect(child_bounds); - const SkPaint child_paint = SkPaint(SkColors::kYellow); - const SkMatrix filter_transform = SkMatrix::MakeScale(2.0, 2.0); - auto layer_filter = SkImageFilter::MakeMatrixFilter( - filter_transform, SkFilterQuality::kMedium_SkFilterQuality, nullptr); - auto mock_layer = std::make_shared(child_path, child_paint); - auto layer = std::make_shared(layer_filter); - layer->Add(mock_layer); - - const SkRect filter_bounds = SkRect::MakeLTRB(10.0f, 12.0f, 42.0f, 44.0f); - - layer->Preroll(preroll_context(), initial_transform); - EXPECT_EQ(layer->paint_bounds(), filter_bounds); - EXPECT_TRUE(layer->needs_painting()); - EXPECT_EQ(mock_layer->parent_matrix(), initial_transform); -} - TEST_F(ImageFilterLayerTest, MultipleChildren) { const SkMatrix initial_transform = SkMatrix::MakeTrans(0.5f, 1.0f); const SkRect child_bounds = SkRect::MakeLTRB(5.0f, 6.0f, 2.5f, 3.5f); @@ -146,12 +123,10 @@ TEST_F(ImageFilterLayerTest, MultipleChildren) { SkRect children_bounds = child_path1.getBounds(); children_bounds.join(child_path2.getBounds()); - SkRect children_rounded_bounds = SkRect::Make(children_bounds.roundOut()); - layer->Preroll(preroll_context(), initial_transform); EXPECT_EQ(mock_layer1->paint_bounds(), child_path1.getBounds()); EXPECT_EQ(mock_layer2->paint_bounds(), child_path2.getBounds()); - EXPECT_EQ(layer->paint_bounds(), children_rounded_bounds); + EXPECT_EQ(layer->paint_bounds(), children_bounds); EXPECT_TRUE(mock_layer1->needs_painting()); EXPECT_TRUE(mock_layer2->needs_painting()); EXPECT_TRUE(layer->needs_painting()); @@ -166,8 +141,8 @@ TEST_F(ImageFilterLayerTest, MultipleChildren) { {MockCanvas::DrawCall{0, MockCanvas::SaveData{1}}, MockCanvas::DrawCall{1, MockCanvas::SetMatrixData{SkMatrix()}}, MockCanvas::DrawCall{ - 1, MockCanvas::SaveLayerData{children_rounded_bounds, - filter_paint, nullptr, 2}}, + 1, MockCanvas::SaveLayerData{children_bounds, filter_paint, + nullptr, 2}}, MockCanvas::DrawCall{ 2, MockCanvas::DrawPathData{child_path1, child_paint1}}, MockCanvas::DrawCall{ @@ -198,16 +173,11 @@ TEST_F(ImageFilterLayerTest, Nested) { SkRect children_bounds = child_path1.getBounds(); children_bounds.join(child_path2.getBounds()); - const SkRect children_rounded_bounds = - SkRect::Make(children_bounds.roundOut()); - const SkRect mock_layer2_rounded_bounds = - SkRect::Make(child_path2.getBounds().roundOut()); - layer1->Preroll(preroll_context(), initial_transform); EXPECT_EQ(mock_layer1->paint_bounds(), child_path1.getBounds()); EXPECT_EQ(mock_layer2->paint_bounds(), child_path2.getBounds()); - EXPECT_EQ(layer1->paint_bounds(), children_rounded_bounds); - EXPECT_EQ(layer2->paint_bounds(), mock_layer2_rounded_bounds); + EXPECT_EQ(layer1->paint_bounds(), children_bounds); + EXPECT_EQ(layer2->paint_bounds(), mock_layer2->paint_bounds()); EXPECT_TRUE(mock_layer1->needs_painting()); EXPECT_TRUE(mock_layer2->needs_painting()); EXPECT_TRUE(layer1->needs_painting()); @@ -224,14 +194,14 @@ TEST_F(ImageFilterLayerTest, Nested) { MockCanvas::DrawCall{0, MockCanvas::SaveData{1}}, MockCanvas::DrawCall{1, MockCanvas::SetMatrixData{SkMatrix()}}, MockCanvas::DrawCall{ - 1, MockCanvas::SaveLayerData{children_rounded_bounds, - filter_paint1, nullptr, 2}}, + 1, MockCanvas::SaveLayerData{children_bounds, filter_paint1, + nullptr, 2}}, MockCanvas::DrawCall{ 2, MockCanvas::DrawPathData{child_path1, child_paint1}}, MockCanvas::DrawCall{2, MockCanvas::SaveData{3}}, MockCanvas::DrawCall{3, MockCanvas::SetMatrixData{SkMatrix()}}, MockCanvas::DrawCall{ - 3, MockCanvas::SaveLayerData{mock_layer2_rounded_bounds, + 3, MockCanvas::SaveLayerData{child_path2.getBounds(), filter_paint2, nullptr, 4}}, MockCanvas::DrawCall{ 4, MockCanvas::DrawPathData{child_path2, child_paint2}}, From 5294bd3ffac341d76e6c957096853c58632661e5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Mar 2020 17:56:01 -0400 Subject: [PATCH 04/58] Roll src/third_party/skia 78dac6dcb222..d3f67dbf9f36 (6 commits) (#17072) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index e98b158a687e5..55ff900123383 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '78dac6dcb222b38234d20b3deab68af1bff6b6e3', + 'skia_revision': 'd3f67dbf9f36471a30c144022d9f788701de9bd8', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3c4530a642bd9..48f98cc122fd7 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b6d5bdb0bb5b9596edb4fa3facb21f23 +Signature: 1f7d1b2013ba1cac9a0046909cbe8969 UNUSED LICENSES: From d884e27a6817d970df0ad13f072f9fac3ec468e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Tue, 10 Mar 2020 15:47:17 -0700 Subject: [PATCH 05/58] Add RTree to flow (#16923) --- ci/licenses_golden/licenses_flutter | 3 + flow/BUILD.gn | 3 + flow/rtree.cc | 100 ++++++++++++ flow/rtree.h | 65 ++++++++ flow/rtree_unittests.cc | 235 ++++++++++++++++++++++++++++ 5 files changed, 406 insertions(+) create mode 100644 flow/rtree.cc create mode 100644 flow/rtree.h create mode 100644 flow/rtree_unittests.cc diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 6056147ddc95f..bd1bf3108e8d6 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -92,6 +92,9 @@ FILE: ../../../flutter/flow/raster_cache.h FILE: ../../../flutter/flow/raster_cache_key.cc FILE: ../../../flutter/flow/raster_cache_key.h FILE: ../../../flutter/flow/raster_cache_unittests.cc +FILE: ../../../flutter/flow/rtree.cc +FILE: ../../../flutter/flow/rtree.h +FILE: ../../../flutter/flow/rtree_unittests.cc FILE: ../../../flutter/flow/scene_update_context.cc FILE: ../../../flutter/flow/scene_update_context.h FILE: ../../../flutter/flow/skia_gpu_object.cc diff --git a/flow/BUILD.gn b/flow/BUILD.gn index c194d35ea628d..14ceec4dadc5c 100644 --- a/flow/BUILD.gn +++ b/flow/BUILD.gn @@ -58,6 +58,8 @@ source_set("flow") { "raster_cache.h", "raster_cache_key.cc", "raster_cache_key.h", + "rtree.cc", + "rtree.h", "skia_gpu_object.cc", "skia_gpu_object.h", "texture.cc", @@ -150,6 +152,7 @@ executable("flow_unittests") { "matrix_decomposition_unittests.cc", "mutators_stack_unittests.cc", "raster_cache_unittests.cc", + "rtree_unittests.cc", "skia_gpu_object_unittests.cc", "testing/mock_layer_unittests.cc", "testing/mock_texture_unittests.cc", diff --git a/flow/rtree.cc b/flow/rtree.cc new file mode 100644 index 0000000000000..a6df0d903c303 --- /dev/null +++ b/flow/rtree.cc @@ -0,0 +1,100 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "rtree.h" + +#include + +#include "flutter/fml/logging.h" +#include "third_party/skia/include/core/SkBBHFactory.h" + +namespace flutter { + +RTree::RTree() : bbh_{SkRTreeFactory{}()}, all_ops_count_(0) {} + +void RTree::insert(const SkRect boundsArray[], + const SkBBoxHierarchy::Metadata metadata[], + int N) { + FML_DCHECK(0 == all_ops_count_); + bbh_->insert(boundsArray, metadata, N); + for (int i = 0; i < N; i++) { + if (metadata != nullptr && metadata[i].isDraw) { + draw_op_[i] = boundsArray[i]; + } + } + all_ops_count_ = N; +} + +void RTree::insert(const SkRect boundsArray[], int N) { + insert(boundsArray, nullptr, N); +} + +void RTree::search(const SkRect& query, std::vector* results) const { + bbh_->search(query, results); +} + +std::list RTree::searchNonOverlappingDrawnRects( + const SkRect& query) const { + // Get the indexes for the operations that intersect with the query rect. + std::vector intermediary_results; + search(query, &intermediary_results); + + std::list final_results; + for (int index : intermediary_results) { + auto draw_op = draw_op_.find(index); + // Ignore records that don't draw anything. + if (draw_op == draw_op_.end()) { + continue; + } + auto current_record_rect = draw_op->second; + auto replaced_existing_rect = false; + // // If the current record rect intersects with any of the rects in the + // // result list, then join them, and update the rect in final_results. + std::list::iterator curr_rect_itr = final_results.begin(); + std::list::iterator first_intersecting_rect_itr; + while (!replaced_existing_rect && curr_rect_itr != final_results.end()) { + if (SkRect::Intersects(*curr_rect_itr, current_record_rect)) { + replaced_existing_rect = true; + first_intersecting_rect_itr = curr_rect_itr; + curr_rect_itr->join(current_record_rect); + } + curr_rect_itr++; + } + // It's possible that the result contains duplicated rects at this point. + // For example, consider a result list that contains rects A, B. If a + // new rect C is a superset of A and B, then A and B are the same set after + // the merge. As a result, find such cases and remove them from the result + // list. + while (replaced_existing_rect && curr_rect_itr != final_results.end()) { + if (SkRect::Intersects(*curr_rect_itr, *first_intersecting_rect_itr)) { + first_intersecting_rect_itr->join(*curr_rect_itr); + curr_rect_itr = final_results.erase(curr_rect_itr); + } else { + curr_rect_itr++; + } + } + if (!replaced_existing_rect) { + final_results.push_back(current_record_rect); + } + } + return final_results; +} + +size_t RTree::bytesUsed() const { + return bbh_->bytesUsed(); +} + +RTreeFactory::RTreeFactory() { + r_tree_ = sk_make_sp(); +} + +sk_sp RTreeFactory::getInstance() { + return r_tree_; +} + +sk_sp RTreeFactory::operator()() const { + return r_tree_; +} + +} // namespace flutter diff --git a/flow/rtree.h b/flow/rtree.h new file mode 100644 index 0000000000000..35c74137243c8 --- /dev/null +++ b/flow/rtree.h @@ -0,0 +1,65 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_FLOW_RTREE_H_ +#define FLUTTER_FLOW_RTREE_H_ + +#include +#include + +#include "third_party/skia/include/core/SkBBHFactory.h" +#include "third_party/skia/include/core/SkTypes.h" + +namespace flutter { +/** + * An R-Tree implementation that forwards calls to an SkRTree. + * + * This implementation provides a searchNonOverlappingDrawnRects method, + * which can be used to query the rects for the operations recorded in the tree. + */ +class RTree : public SkBBoxHierarchy { + public: + RTree(); + + void insert(const SkRect[], + const SkBBoxHierarchy::Metadata[], + int N) override; + void insert(const SkRect[], int N) override; + void search(const SkRect& query, std::vector* results) const override; + size_t bytesUsed() const override; + + // Finds the rects in the tree that represent drawing operations and intersect + // with the query rect. + // + // When two rects intersect with each other, they are joined into a single + // rect which also intersects with the query rect. In other words, the bounds + // of each rect in the result list are mutually exclusive. + std::list searchNonOverlappingDrawnRects(const SkRect& query) const; + + // Insertion count (not overall node count, which may be greater). + int getCount() const { return all_ops_count_; } + + private: + // A map containing the draw operation rects keyed off the operation index + // in the insert call. + std::map draw_op_; + sk_sp bbh_; + int all_ops_count_; +}; + +class RTreeFactory : public SkBBHFactory { + public: + RTreeFactory(); + + // Gets the instance to the R-tree. + sk_sp getInstance(); + sk_sp operator()() const override; + + private: + sk_sp r_tree_; +}; + +} // namespace flutter + +#endif // FLUTTER_FLOW_RTREE_H_ diff --git a/flow/rtree_unittests.cc b/flow/rtree_unittests.cc new file mode 100644 index 0000000000000..f3e82e00ebc4f --- /dev/null +++ b/flow/rtree_unittests.cc @@ -0,0 +1,235 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "rtree.h" + +#include "flutter/testing/testing.h" +#include "third_party/skia/include/core/SkCanvas.h" +#include "third_party/skia/include/core/SkPictureRecorder.h" + +namespace flutter { +namespace testing { + +TEST(RTree, searchNonOverlappingDrawnRects_NoIntersection) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // If no rect is intersected with the query rect, then the result list is + // empty. + recording_canvas->drawRect(SkRect::MakeLTRB(20, 20, 40, 40), rect_paint); + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(40, 40, 80, 80)); + ASSERT_TRUE(hits.empty()); +} + +TEST(RTree, searchNonOverlappingDrawnRects_SingleRectIntersection) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Given a single rect A that intersects with the query rect, + // the result list contains this rect. + recording_canvas->drawRect(SkRect::MakeLTRB(120, 120, 160, 160), rect_paint); + + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(140, 140, 150, 150)); + ASSERT_EQ(1UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(120, 120, 160, 160)); +} + +TEST(RTree, searchNonOverlappingDrawnRects_IgnoresNonDrawingRecords) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Creates two non drawing records. + recording_canvas->translate(100, 100); + // The result list should only contain the clipping rect. + recording_canvas->clipRect(SkRect::MakeLTRB(40, 40, 50, 50), + SkClipOp::kIntersect); + recording_canvas->drawRect(SkRect::MakeLTRB(20, 20, 80, 80), rect_paint); + + recorder->finishRecordingAsPicture(); + + // The rtree has a translate, a clip and a rect record. + ASSERT_EQ(3, rtree_factory.getInstance()->getCount()); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(0, 0, 1000, 1000)); + ASSERT_EQ(1UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(120, 120, 180, 180)); +} + +TEST(RTree, searchNonOverlappingDrawnRects_MultipleRectIntersection) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Given the A, B that intersect with the query rect, + // there should be A and B in the result list since + // they don't intersect with each other. + // + // +-----+ +-----+ + // | A | | B | + // +-----+ +-----+ + // A + recording_canvas->drawRect(SkRect::MakeLTRB(100, 100, 200, 200), rect_paint); + // B + recording_canvas->drawRect(SkRect::MakeLTRB(300, 100, 400, 200), rect_paint); + + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(0, 0, 1000, 1050)); + ASSERT_EQ(2UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(100, 100, 200, 200)); + ASSERT_EQ(*std::next(hits.begin(), 1), SkRect::MakeLTRB(300, 100, 400, 200)); +} + +TEST(RTree, searchNonOverlappingDrawnRects_JoinRectsWhenIntersectedCase1) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Given the A, and B rects, which intersect with the query rect, + // the result list contains the rect resulting from the union of A and B. + // + // +-----+ + // | A | + // | +-----+ + // | | C | + // | +-----+ + // | | + // +-----+ + + // A + recording_canvas->drawRect(SkRect::MakeLTRB(100, 100, 150, 150), rect_paint); + // B + recording_canvas->drawRect(SkRect::MakeLTRB(125, 125, 175, 175), rect_paint); + + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeXYWH(120, 120, 126, 126)); + ASSERT_EQ(1UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(100, 100, 175, 175)); +} + +TEST(RTree, searchNonOverlappingDrawnRects_JoinRectsWhenIntersectedCase2) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Given the A, B, and C rects that intersect with the query rect, + // there should be only C in the result list, + // since A and B are contained in C. + // + // +---------------------+ + // | C | + // | +-----+ +-----+ | + // | | A | | B | | + // | +-----+ +-----+ | + // +---------------------+ + // +-----+ + // | D | + // +-----+ + + // A + recording_canvas->drawRect(SkRect::MakeLTRB(100, 100, 200, 200), rect_paint); + // B + recording_canvas->drawRect(SkRect::MakeLTRB(300, 100, 400, 200), rect_paint); + // C + recording_canvas->drawRect(SkRect::MakeLTRB(50, 50, 500, 250), rect_paint); + // D + recording_canvas->drawRect(SkRect::MakeLTRB(280, 100, 280, 320), rect_paint); + + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(30, 30, 550, 270)); + ASSERT_EQ(1UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(50, 50, 500, 250)); +} + +TEST(RTree, searchNonOverlappingDrawnRects_JoinRectsWhenIntersectedCase3) { + auto rtree_factory = RTreeFactory(); + auto recorder = std::make_unique(); + auto recording_canvas = + recorder->beginRecording(SkRect::MakeIWH(1000, 1000), &rtree_factory); + + auto rect_paint = SkPaint(); + rect_paint.setColor(SkColors::kCyan); + rect_paint.setStyle(SkPaint::Style::kFill_Style); + + // Given the A, B, C and D rects that intersect with the query rect, + // the result list contains a single rect, which is the union of + // these four rects. + // + // +------------------------------+ + // | D | + // | +-----+ +-----+ +-----+ | + // | | A | | B | | C | | + // | +-----+ +-----+ | | | + // +----------------------| |-+ + // +-----+ + // +-----+ + // | E | + // +-----+ + + // A + recording_canvas->drawRect(SkRect::MakeLTRB(100, 100, 200, 200), rect_paint); + // B + recording_canvas->drawRect(SkRect::MakeLTRB(300, 100, 400, 200), rect_paint); + // C + recording_canvas->drawRect(SkRect::MakeLTRB(500, 100, 600, 300), rect_paint); + // D + recording_canvas->drawRect(SkRect::MakeLTRB(50, 50, 620, 250), rect_paint); + // E + recording_canvas->drawRect(SkRect::MakeLTRB(280, 100, 280, 320), rect_paint); + + recorder->finishRecordingAsPicture(); + + auto hits = rtree_factory.getInstance()->searchNonOverlappingDrawnRects( + SkRect::MakeLTRB(30, 30, 550, 270)); + ASSERT_EQ(1UL, hits.size()); + ASSERT_EQ(*hits.begin(), SkRect::MakeLTRB(50, 50, 620, 300)); +} + +} // namespace testing +} // namespace flutter From f1ff6a2c19af7fae82e21ba64b6d9b58dbbb0d9e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Mar 2020 18:56:03 -0400 Subject: [PATCH 06/58] Roll src/third_party/dart 97674262bc29..ace1d9b9213a (14 commits) (#17078) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 122 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index 55ff900123383..934af220aa663 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '97674262bc29447dc59d5c93024b18b27d4bcf98', + 'dart_revision': 'ace1d9b9213a119474e95d93dbc5fabfe1b1affa', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 04a6928be6c1b..5c056131edde0 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 156300dd26ac9a9b6866b46697f14d81 +Signature: d9b2961d0b78a2c057b042fa47abc1f5 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 17e07c537e136d92f1f3f6957531c81b8b4374af Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 16:01:53 -0700 Subject: [PATCH 07/58] Implement asynchronous texture uploads when using the Metal backend on iOS. (#17046) This moves the Metal `GrContext` creation utilities from `GPUSurfaceMetal` into a separate `IOSContext` object subclass. An analogue of this object was used in the GL regime for the management of onscreen and offscreen contexts that were not tied to the lifecycle of the `GPUSurface`. This pattern has now been generalized for use with all backends that need a resource context (`IOSContextGL` and `IOContextMetal`). The platform views controller management in the `ExternalViewEmbedder` interface implementation was repeated three times for [Metal][metal], [OpenGL](opengl) and [Software](software) rendering. This repetition has been removed and a single implementation present in the base `IOSSurface` and used on all platforms. Addition of new client rendering APIs should not affect how the engine renders into the platform view interleaving levels. All rendering API selection logic has been moved into a single set of utilities in `rendering_api_selection.h`. This enables the removal of a lot of code blocks guarded by `FLUTTER_SHELL_ENABLE_METAL`. The remaining uses of this will be removed when unified builds are enabled. The Metal backend now also adds traces similar to the GL backend. The `IOGLContext` has been renamed to `IOContextGL` to be more in line with the convention used in this library. Fixes https://github.com/flutter/flutter/issues/41827 Adds https://github.com/flutter/flutter/issues/52150 [metal]: https://github.com/flutter/engine/blob/1194ba2b218706a201c5d2c5325b55a5932546c5/shell/platform/darwin/ios/ios_surface_metal.mm#L55 [opengl]: https://github.com/flutter/engine/blob/1194ba2b218706a201c5d2c5325b55a5932546c5/shell/platform/darwin/ios/ios_surface_gl.mm#L95 [software]: https://github.com/flutter/engine/blob/1194ba2b218706a201c5d2c5325b55a5932546c5/shell/platform/darwin/ios/ios_surface_software.mm#L146 --- ci/licenses_golden/licenses_flutter | 16 ++- flow/compositor_context.cc | 1 + lib/ui/painting/image_decoder.cc | 1 + shell/common/rasterizer.cc | 2 + shell/gpu/gpu_surface_gl.h | 1 + shell/gpu/gpu_surface_metal.h | 7 +- shell/gpu/gpu_surface_metal.mm | 78 +++------- shell/platform/darwin/ios/BUILD.gn | 30 ++-- .../ios/framework/Source/FlutterEngine.mm | 6 +- .../ios/framework/Source/FlutterOverlayView.h | 4 +- .../framework/Source/FlutterOverlayView.mm | 46 ++---- .../framework/Source/FlutterPlatformViews.mm | 13 +- .../Source/FlutterPlatformViews_Internal.h | 7 +- .../darwin/ios/framework/Source/FlutterView.h | 4 +- .../ios/framework/Source/FlutterView.mm | 110 ++------------ shell/platform/darwin/ios/ios_context.h | 131 +++++++++++++++++ shell/platform/darwin/ios/ios_context.mm | 38 +++++ .../{ios_gl_context.h => ios_context_gl.h} | 41 +++--- shell/platform/darwin/ios/ios_context_gl.mm | 61 ++++++++ shell/platform/darwin/ios/ios_context_metal.h | 57 ++++++++ .../platform/darwin/ios/ios_context_metal.mm | 86 +++++++++++ .../darwin/ios/ios_context_software.h | 38 +++++ .../darwin/ios/ios_context_software.mm | 34 +++++ .../darwin/ios/ios_external_texture_gl.h | 23 +-- shell/platform/darwin/ios/ios_gl_context.mm | 63 -------- .../darwin/ios/ios_gl_render_target.h | 57 -------- .../darwin/ios/ios_render_target_gl.h | 50 +++++++ ...nder_target.mm => ios_render_target_gl.mm} | 53 +++---- shell/platform/darwin/ios/ios_surface.h | 50 ++++++- shell/platform/darwin/ios/ios_surface.mm | 134 ++++++++++++++++-- shell/platform/darwin/ios/ios_surface_gl.h | 54 ++----- shell/platform/darwin/ios/ios_surface_gl.mm | 109 +++----------- shell/platform/darwin/ios/ios_surface_metal.h | 49 ++----- .../platform/darwin/ios/ios_surface_metal.mm | 115 +++++---------- .../darwin/ios/ios_surface_software.h | 31 +--- .../darwin/ios/ios_surface_software.mm | 70 +-------- shell/platform/darwin/ios/platform_view_ios.h | 9 +- .../platform/darwin/ios/platform_view_ios.mm | 21 +-- .../darwin/ios/rendering_api_selection.h | 27 ++++ .../darwin/ios/rendering_api_selection.mm | 83 +++++++++++ 40 files changed, 1031 insertions(+), 779 deletions(-) create mode 100644 shell/platform/darwin/ios/ios_context.h create mode 100644 shell/platform/darwin/ios/ios_context.mm rename shell/platform/darwin/ios/{ios_gl_context.h => ios_context_gl.h} (51%) create mode 100644 shell/platform/darwin/ios/ios_context_gl.mm create mode 100644 shell/platform/darwin/ios/ios_context_metal.h create mode 100644 shell/platform/darwin/ios/ios_context_metal.mm create mode 100644 shell/platform/darwin/ios/ios_context_software.h create mode 100644 shell/platform/darwin/ios/ios_context_software.mm delete mode 100644 shell/platform/darwin/ios/ios_gl_context.mm delete mode 100644 shell/platform/darwin/ios/ios_gl_render_target.h create mode 100644 shell/platform/darwin/ios/ios_render_target_gl.h rename shell/platform/darwin/ios/{ios_gl_render_target.mm => ios_render_target_gl.mm} (75%) create mode 100644 shell/platform/darwin/ios/rendering_api_selection.h create mode 100644 shell/platform/darwin/ios/rendering_api_selection.mm diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index bd1bf3108e8d6..2f6c5c31fccef 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -868,12 +868,18 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/platform_messa FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/vsync_waiter_ios.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/module.modulemap +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context.h +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context.mm +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_gl.h +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_gl.mm +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_metal.h +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_metal.mm +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_software.h +FILE: ../../../flutter/shell/platform/darwin/ios/ios_context_software.mm FILE: ../../../flutter/shell/platform/darwin/ios/ios_external_texture_gl.h FILE: ../../../flutter/shell/platform/darwin/ios/ios_external_texture_gl.mm -FILE: ../../../flutter/shell/platform/darwin/ios/ios_gl_context.h -FILE: ../../../flutter/shell/platform/darwin/ios/ios_gl_context.mm -FILE: ../../../flutter/shell/platform/darwin/ios/ios_gl_render_target.h -FILE: ../../../flutter/shell/platform/darwin/ios/ios_gl_render_target.mm +FILE: ../../../flutter/shell/platform/darwin/ios/ios_render_target_gl.h +FILE: ../../../flutter/shell/platform/darwin/ios/ios_render_target_gl.mm FILE: ../../../flutter/shell/platform/darwin/ios/ios_surface.h FILE: ../../../flutter/shell/platform/darwin/ios/ios_surface.mm FILE: ../../../flutter/shell/platform/darwin/ios/ios_surface_gl.h @@ -884,6 +890,8 @@ FILE: ../../../flutter/shell/platform/darwin/ios/ios_surface_software.h FILE: ../../../flutter/shell/platform/darwin/ios/ios_surface_software.mm FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.h FILE: ../../../flutter/shell/platform/darwin/ios/platform_view_ios.mm +FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.h +FILE: ../../../flutter/shell/platform/darwin/ios/rendering_api_selection.mm FILE: ../../../flutter/shell/platform/darwin/macos/framework/FlutterMacOS.podspec FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterDartProject.h diff --git a/flow/compositor_context.cc b/flow/compositor_context.cc index 68f308fbf2f57..d816ca53ef877 100644 --- a/flow/compositor_context.cc +++ b/flow/compositor_context.cc @@ -70,6 +70,7 @@ CompositorContext::ScopedFrame::~ScopedFrame() { RasterStatus CompositorContext::ScopedFrame::Raster( flutter::LayerTree& layer_tree, bool ignore_raster_cache) { + TRACE_EVENT0("flutter", "CompositorContext::ScopedFrame::Raster"); bool root_needs_readback = layer_tree.Preroll(*this, ignore_raster_cache); bool needs_save_layer = root_needs_readback && !surface_supports_readback(); PostPrerollResult post_preroll_result = PostPrerollResult::kSuccess; diff --git a/lib/ui/painting/image_decoder.cc b/lib/ui/painting/image_decoder.cc index b730de7d66c35..604b41d7dcd95 100644 --- a/lib/ui/painting/image_decoder.cc +++ b/lib/ui/painting/image_decoder.cc @@ -282,6 +282,7 @@ static SkiaGPUObject UploadRasterImage( }) .SetIfFalse([&result, context = io_manager->GetResourceContext(), &pixmap, queue = io_manager->GetSkiaUnrefQueue()] { + TRACE_EVENT0("flutter", "MakeCrossContextImageFromPixmap"); sk_sp texture_image = SkImage::MakeCrossContextFromPixmap( context.get(), // context pixmap, // pixmap diff --git a/shell/common/rasterizer.cc b/shell/common/rasterizer.cc index 7d6a7a74e8a91..acad5ada8510a 100644 --- a/shell/common/rasterizer.cc +++ b/shell/common/rasterizer.cc @@ -295,6 +295,7 @@ RasterStatus Rasterizer::DoDraw( } RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) { + TRACE_EVENT0("flutter", "Rasterizer::DrawToSurface"); FML_DCHECK(surface_); auto frame = surface_->AcquireFrame(layer_tree.frame_size()); @@ -350,6 +351,7 @@ RasterStatus Rasterizer::DrawToSurface(flutter::LayerTree& layer_tree) { FireNextFrameCallbackIfPresent(); if (surface_->GetContext()) { + TRACE_EVENT0("flutter", "PerformDeferredSkiaCleanup"); surface_->GetContext()->performDeferredCleanup(kSkiaCleanupExpiration); } diff --git a/shell/gpu/gpu_surface_gl.h b/shell/gpu/gpu_surface_gl.h index d2e62d7e1fefd..0a0806040adef 100644 --- a/shell/gpu/gpu_surface_gl.h +++ b/shell/gpu/gpu_surface_gl.h @@ -26,6 +26,7 @@ class GPUSurfaceGL : public Surface { GPUSurfaceGLDelegate* delegate, bool render_to_surface); + // |Surface| ~GPUSurfaceGL() override; // |Surface| diff --git a/shell/gpu/gpu_surface_metal.h b/shell/gpu/gpu_surface_metal.h index fc6b0964766ce..3332dca6585fe 100644 --- a/shell/gpu/gpu_surface_metal.h +++ b/shell/gpu/gpu_surface_metal.h @@ -19,11 +19,12 @@ namespace flutter { class GPUSurfaceMetal : public Surface { public: - GPUSurfaceMetal(GPUSurfaceDelegate* delegate, fml::scoped_nsobject layer); GPUSurfaceMetal(GPUSurfaceDelegate* delegate, - sk_sp gr_context, - fml::scoped_nsobject layer); + fml::scoped_nsobject layer, + sk_sp context, + fml::scoped_nsprotocol> command_queue); + // |Surface| ~GPUSurfaceMetal() override; private: diff --git a/shell/gpu/gpu_surface_metal.mm b/shell/gpu/gpu_surface_metal.mm index bb436d2138768..154e951319bdb 100644 --- a/shell/gpu/gpu_surface_metal.mm +++ b/shell/gpu/gpu_surface_metal.mm @@ -6,6 +6,7 @@ #include +#include "flutter/fml/trace_event.h" #include "third_party/skia/include/core/SkSurface.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" #include "third_party/skia/include/ports/SkCFObject.h" @@ -15,62 +16,17 @@ namespace flutter { GPUSurfaceMetal::GPUSurfaceMetal(GPUSurfaceDelegate* delegate, - fml::scoped_nsobject layer) - : delegate_(delegate), layer_(std::move(layer)) { - if (!layer_) { - FML_LOG(ERROR) << "Could not create metal surface because of invalid layer."; - return; - } - - layer.get().pixelFormat = MTLPixelFormatBGRA8Unorm; + fml::scoped_nsobject layer, + sk_sp context, + fml::scoped_nsprotocol> command_queue) + : delegate_(delegate), + layer_(std::move(layer)), + context_(std::move(context)), + command_queue_(std::move(command_queue)) { + layer_.get().pixelFormat = MTLPixelFormatBGRA8Unorm; // Flutter needs to read from the color attachment in cases where there are effects such as // backdrop filters. - layer.get().framebufferOnly = NO; - - auto metal_device = fml::scoped_nsprotocol>([layer_.get().device retain]); - auto metal_queue = fml::scoped_nsprotocol>([metal_device newCommandQueue]); - - if (!metal_device || !metal_queue) { - FML_LOG(ERROR) << "Could not create metal device or queue."; - return; - } - - command_queue_ = metal_queue; - - // The context creation routine accepts arguments using transfer semantics. - auto context = GrContext::MakeMetal(metal_device.release(), metal_queue.release()); - if (!context) { - FML_LOG(ERROR) << "Could not create Skia metal context."; - return; - } - - context_ = context; -} - -GPUSurfaceMetal::GPUSurfaceMetal(GPUSurfaceDelegate* delegate, - sk_sp gr_context, - fml::scoped_nsobject layer) - : delegate_(delegate), layer_(std::move(layer)), context_(gr_context) { - if (!layer_) { - FML_LOG(ERROR) << "Could not create metal surface because of invalid layer."; - return; - } - if (!context_) { - FML_LOG(ERROR) << "Could not create metal surface because of invalid Skia metal context."; - return; - } - - layer.get().pixelFormat = MTLPixelFormatBGRA8Unorm; - - auto metal_device = fml::scoped_nsprotocol>([layer_.get().device retain]); - auto metal_queue = fml::scoped_nsprotocol>([metal_device newCommandQueue]); - - if (!metal_device || !metal_queue) { - FML_LOG(ERROR) << "Could not create metal device or queue."; - return; - } - - command_queue_ = metal_queue; + layer_.get().framebufferOnly = NO; } GPUSurfaceMetal::~GPUSurfaceMetal() { @@ -95,13 +51,20 @@ } const auto bounds = layer_.get().bounds.size; - if (bounds.width <= 0.0 || bounds.height <= 0.0) { + const auto scale = layer_.get().contentsScale; + if (bounds.width <= 0.0 || bounds.height <= 0.0 || scale <= 0.0) { FML_LOG(ERROR) << "Metal layer bounds were invalid."; return nullptr; } + const auto scaled_bounds = CGSizeMake(bounds.width * scale, bounds.height * scale); + ReleaseUnusedDrawableIfNecessary(); + if (!CGSizeEqualToSize(scaled_bounds, layer_.get().drawableSize)) { + layer_.get().drawableSize = scaled_bounds; + } + auto surface = SkSurface::MakeFromCAMetalLayer(context_.get(), // context layer_.get(), // layer kTopLeft_GrSurfaceOrigin, // origin @@ -118,6 +81,7 @@ } auto submit_callback = [this](const SurfaceFrame& surface_frame, SkCanvas* canvas) -> bool { + TRACE_EVENT0("flutter", "GPUSurfaceMetal::Submit"); canvas->flush(); if (next_drawable_ == nullptr) { @@ -159,9 +123,7 @@ SkMatrix GPUSurfaceMetal::GetRootTransformation() const { // This backend does not currently support root surface transformations. Just // return identity. - SkMatrix matrix; - matrix.reset(); - return matrix; + return {}; } // |Surface| diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index 014b51c90ed30..1671975c8d0e5 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -44,6 +44,8 @@ shared_library("create_flutter_framework_dylib") { ldflags = [ "-Wl,-install_name,@rpath/Flutter.framework/Flutter" ] + public = _flutter_framework_headers + sources = [ "framework/Source/FlutterAppDelegate.mm", "framework/Source/FlutterBinaryMessengerRelay.mm", @@ -81,12 +83,16 @@ shared_library("create_flutter_framework_dylib") { "framework/Source/platform_message_router.mm", "framework/Source/vsync_waiter_ios.h", "framework/Source/vsync_waiter_ios.mm", + "ios_context.h", + "ios_context.mm", + "ios_context_gl.h", + "ios_context_gl.mm", + "ios_context_software.h", + "ios_context_software.mm", "ios_external_texture_gl.h", "ios_external_texture_gl.mm", - "ios_gl_context.h", - "ios_gl_context.mm", - "ios_gl_render_target.h", - "ios_gl_render_target.mm", + "ios_render_target_gl.h", + "ios_render_target_gl.mm", "ios_surface.h", "ios_surface.mm", "ios_surface_gl.h", @@ -95,15 +101,10 @@ shared_library("create_flutter_framework_dylib") { "ios_surface_software.mm", "platform_view_ios.h", "platform_view_ios.mm", + "rendering_api_selection.h", + "rendering_api_selection.mm", ] - if (shell_enable_metal) { - sources += [ - "ios_surface_metal.h", - "ios_surface_metal.mm", - ] - } - sources += _flutter_framework_headers deps = [ @@ -126,6 +127,13 @@ shared_library("create_flutter_framework_dylib") { if (shell_enable_metal) { defines += [ "FLUTTER_SHELL_ENABLE_METAL=1" ] + + sources += [ + "ios_context_metal.h", + "ios_context_metal.mm", + "ios_surface_metal.h", + "ios_surface_metal.mm", + ] } libs = [ diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index cdab6c4b0d685..c267518929685 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -26,6 +26,7 @@ #import "flutter/shell/platform/darwin/ios/framework/Source/platform_message_response_darwin.h" #import "flutter/shell/platform/darwin/ios/ios_surface.h" #import "flutter/shell/platform/darwin/ios/platform_view_ios.h" +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" NSString* const FlutterDefaultDartEntrypoint = nil; @@ -427,7 +428,7 @@ - (BOOL)createShell:(NSString*)entrypoint libraryURI:(NSString*)libraryURI { } const auto threadLabel = [NSString stringWithFormat:@"%@.%zu", _labelPrefix, shellCount++]; - FML_DLOG(INFO) << "Creating threadHost for " << threadLabel.UTF8String; + // The current thread will be used as the platform thread. Ensure that the message loop is // initialized. fml::MessageLoop::EnsureInitializedForCurrentThread(); @@ -441,7 +442,8 @@ - (BOOL)createShell:(NSString*)entrypoint libraryURI:(NSString*)libraryURI { // synchronous. flutter::Shell::CreateCallback on_create_platform_view = [](flutter::Shell& shell) { - return std::make_unique(shell, shell.GetTaskRunners()); + return std::make_unique( + shell, flutter::GetRenderingAPIForProcess(), shell.GetTaskRunners()); }; flutter::Shell::CreateCallback on_create_rasterizer = diff --git a/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h b/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h index 0ace741ccab80..088959e69876c 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h @@ -13,7 +13,7 @@ #include "flutter/fml/memory/weak_ptr.h" #include "flutter/shell/common/shell.h" -#include "flutter/shell/platform/darwin/ios/ios_gl_context.h" +#include "flutter/shell/platform/darwin/ios/ios_context_gl.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" #include "flutter/shell/platform/darwin/ios/ios_surface_gl.h" @@ -36,7 +36,7 @@ - (instancetype)init NS_DESIGNATED_INITIALIZER; - (instancetype)initWithContentsScale:(CGFloat)contentsScale; - (std::unique_ptr)createSurface: - (std::shared_ptr)gl_context; + (std::shared_ptr)ios_context; @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.mm b/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.mm index bf4c1c21f62a8..11c0d60618886 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterOverlayView.mm @@ -14,9 +14,6 @@ #include "flutter/shell/common/rasterizer.h" #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterView.h" #include "flutter/shell/platform/darwin/ios/ios_surface_gl.h" -#if FLUTTER_SHELL_ENABLE_METAL -#include "flutter/shell/platform/darwin/ios/ios_surface_metal.h" -#endif #include "flutter/shell/platform/darwin/ios/ios_surface_software.h" #include "third_party/skia/include/utils/mac/SkCGUtils.h" @@ -50,18 +47,11 @@ - (instancetype)init { - (instancetype)initWithContentsScale:(CGFloat)contentsScale { self = [self init]; - if ([self.layer isKindOfClass:[CAEAGLLayer class]]) { - CAEAGLLayer* layer = reinterpret_cast(self.layer); - layer.allowsGroupOpacity = NO; - layer.contentsScale = contentsScale; - layer.rasterizationScale = contentsScale; -#if FLUTTER_SHELL_ENABLE_METAL - } else if ([self.layer isKindOfClass:[CAMetalLayer class]]) { - CAMetalLayer* layer = reinterpret_cast(self.layer); - layer.allowsGroupOpacity = NO; - layer.contentsScale = contentsScale; - layer.rasterizationScale = contentsScale; -#endif // FLUTTER_SHELL_ENABLE_METAL + if ([self.layer isKindOfClass:NSClassFromString(@"CAEAGLLayer")] || + [self.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]) { + self.layer.allowsGroupOpacity = NO; + self.layer.contentsScale = contentsScale; + self.layer.rasterizationScale = contentsScale; } return self; @@ -72,27 +62,11 @@ + (Class)layerClass { } - (std::unique_ptr)createSurface: - (std::shared_ptr)gl_context { - if ([self.layer isKindOfClass:[CAEAGLLayer class]]) { - fml::scoped_nsobject eagl_layer( - reinterpret_cast([self.layer retain])); - if (@available(iOS 9.0, *)) { - eagl_layer.get().presentsWithTransaction = YES; - } - return std::make_unique(std::move(eagl_layer), gl_context); -#if FLUTTER_SHELL_ENABLE_METAL - } else if ([self.layer isKindOfClass:[CAMetalLayer class]]) { - fml::scoped_nsobject metalLayer( - reinterpret_cast([self.layer retain])); - if (@available(iOS 8.0, *)) { - metalLayer.get().presentsWithTransaction = YES; - } - return std::make_unique(std::move(metalLayer)); -#endif // FLUTTER_SHELL_ENABLE_METAL - } else { - fml::scoped_nsobject layer(reinterpret_cast([self.layer retain])); - return std::make_unique(std::move(layer), nullptr); - } + (std::shared_ptr)ios_context { + return flutter::IOSSurface::Create(std::move(ios_context), // context + fml::scoped_nsobject{[self.layer retain]}, // layer + nullptr // platform views controller + ); } // TODO(amirh): implement drawLayer to support snapshotting. diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm index fa5f8d4aba8d5..b86c4623fa7a7 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews.mm @@ -308,7 +308,7 @@ // // The UIKit frame is set based on the logical resolution instead of physical. // (https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/Displays/Displays.html). - // However, flow is based on the physical resolution. For eaxmple, 1000 pixels in flow equals + // However, flow is based on the physical resolution. For example, 1000 pixels in flow equals // 500 points in UIKit. And until this point, we did all the calculation based on the flow // resolution. So we need to scale down to match UIKit's logical resolution. CGFloat screenScale = [UIScreen mainScreen].scale; @@ -367,12 +367,12 @@ } bool FlutterPlatformViewsController::SubmitFrame(GrContext* gr_context, - std::shared_ptr gl_context) { + std::shared_ptr ios_context) { DisposeViews(); bool did_submit = true; for (int64_t view_id : composition_order_) { - EnsureOverlayInitialized(view_id, gl_context, gr_context); + EnsureOverlayInitialized(view_id, ios_context, gr_context); auto frame = overlays_[view_id]->surface->AcquireFrame(frame_size_); // If frame is null, AcquireFrame already printed out an error message. if (frame) { @@ -460,7 +460,7 @@ void FlutterPlatformViewsController::EnsureOverlayInitialized( int64_t overlay_id, - std::shared_ptr gl_context, + std::shared_ptr ios_context, GrContext* gr_context) { FML_DCHECK(flutter_view_); @@ -474,7 +474,8 @@ overlay_view.get().frame = flutter_view_.get().bounds; overlay_view.get().autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); - std::unique_ptr ios_surface = [overlay_view.get() createSurface:nil]; + std::unique_ptr ios_surface = + [overlay_view.get() createSurface:std::move(ios_context)]; std::unique_ptr surface = ios_surface->CreateGPUSurface(); overlays_[overlay_id] = std::make_unique( std::move(overlay_view), std::move(ios_surface), std::move(surface)); @@ -500,7 +501,7 @@ overlay_view.get().autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); std::unique_ptr ios_surface = - [overlay_view.get() createSurface:std::move(gl_context)]; + [overlay_view.get() createSurface:std::move(ios_context)]; std::unique_ptr surface = ios_surface->CreateGPUSurface(gr_context); overlays_[overlay_id] = std::make_unique( std::move(overlay_view), std::move(ios_surface), std::move(surface)); diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h index bdd013c98e07f..d135d7d2ac290 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViews_Internal.h @@ -12,6 +12,7 @@ #include "flutter/shell/platform/darwin/common/framework/Headers/FlutterChannels.h" #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlatformViews.h" #include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" // A UIView that is used as the parent for embedded UIViews. // @@ -53,7 +54,7 @@ CATransform3D GetCATransform3DFromSkMatrix(const SkMatrix& matrix); // The position of the `layer` should be unchanged after resetting the anchor. void ResetAnchor(CALayer* layer); -class IOSGLContext; +class IOSContextGL; class IOSSurface; struct FlutterPlatformViewLayer { @@ -111,7 +112,7 @@ class FlutterPlatformViewsController { // Discards all platform views instances and auxiliary resources. void Reset(); - bool SubmitFrame(GrContext* gr_context, std::shared_ptr gl_context); + bool SubmitFrame(GrContext* gr_context, std::shared_ptr ios_context); void OnMethodCall(FlutterMethodCall* call, FlutterResult& result); @@ -173,7 +174,7 @@ class FlutterPlatformViewsController { // Dispose the views in `views_to_dispose_`. void DisposeViews(); void EnsureOverlayInitialized(int64_t overlay_id, - std::shared_ptr gl_context, + std::shared_ptr ios_context, GrContext* gr_context); // This will return true after pre-roll if any of the embedded views diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.h b/shell/platform/darwin/ios/framework/Source/FlutterView.h index 0da2d5b0bc71d..b767ceb6e8384 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.h @@ -13,6 +13,7 @@ #include "flutter/fml/memory/weak_ptr.h" #include "flutter/shell/common/shell.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" @protocol FlutterViewEngineDelegate @@ -33,8 +34,7 @@ - (instancetype)initWithDelegate:(id)delegate opaque:(BOOL)opaque NS_DESIGNATED_INITIALIZER; -- (std::unique_ptr)createSurface: - (std::shared_ptr)context; +- (std::unique_ptr)createSurface:(std::shared_ptr)context; @end diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/shell/platform/darwin/ios/framework/Source/FlutterView.mm index 6ea664013575f..ed2d1f02b7127 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -17,10 +17,6 @@ #include "flutter/shell/platform/darwin/ios/ios_surface_software.h" #include "third_party/skia/include/utils/mac/SkCGUtils.h" -#if FLUTTER_SHELL_ENABLE_METAL -#include "flutter/shell/platform/darwin/ios/ios_surface_metal.h" -#endif // FLUTTER_SHELL_ENABLE_METAL - @implementation FlutterView id _delegate; @@ -56,110 +52,28 @@ - (instancetype)initWithDelegate:(id)delegate opaque: } - (void)layoutSubviews { - if ([self.layer isKindOfClass:[CAEAGLLayer class]]) { - CAEAGLLayer* layer = reinterpret_cast(self.layer); - layer.allowsGroupOpacity = YES; + if ([self.layer isKindOfClass:NSClassFromString(@"CAEAGLLayer")] || + [self.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]) { CGFloat screenScale = [UIScreen mainScreen].scale; - layer.contentsScale = screenScale; - layer.rasterizationScale = screenScale; - } - -#if FLUTTER_SHELL_ENABLE_METAL - if ([self.layer isKindOfClass:[CAMetalLayer class]]) { - const CGFloat screenScale = [UIScreen mainScreen].scale; - - auto metal_layer = reinterpret_cast(self.layer); - metal_layer.contentsScale = screenScale; - metal_layer.rasterizationScale = screenScale; - - const auto layer_size = self.bounds.size; - metal_layer.drawableSize = - CGSizeMake(layer_size.width * screenScale, layer_size.height * screenScale); + self.layer.allowsGroupOpacity = YES; + self.layer.contentsScale = screenScale; + self.layer.rasterizationScale = screenScale; } -#endif // FLUTTER_SHELL_ENABLE_METAL [super layoutSubviews]; } -#if FLUTTER_SHELL_ENABLE_METAL -static bool UseMetalRenderer() { - // If there is a command line argument that says Metal should not be used, that takes precedence - // over everything else. This allows disabling Metal on a per run basis to check for regressions - // on an application that has otherwise opted into Metal on an iOS version that supports it. - if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--disable-metal"]) { - return false; - } - - // If the application wants to use metal on a per run basis with disregard for version checks or - // plist based opt ins, respect that opinion. This allows selectively testing features on older - // version of iOS than those explicitly stated as being supported. - if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--force-metal"]) { - return true; - } - - // This is just a version we picked that is easy to support and has all necessary Metal features. - bool ios_version_supports_metal = false; - if (@available(iOS 11.0, *)) { - ios_version_supports_metal = true; - } - - // The application must opt-in by default to use Metal without command line flags. - bool application_opts_into_metal = - [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"io.flutter.metal_preview"] boolValue]; - - return ios_version_supports_metal && application_opts_into_metal; -} -#endif // FLUTTER_SHELL_ENABLE_METAL - + (Class)layerClass { -#if TARGET_IPHONE_SIMULATOR - return [CALayer class]; -#else // TARGET_IPHONE_SIMULATOR -#if FLUTTER_SHELL_ENABLE_METAL - if (UseMetalRenderer()) { - return [CAMetalLayer class]; - } else { - return [CAEAGLLayer class]; - } -#else // FLUTTER_SHELL_ENABLE_METAL - return [CAEAGLLayer class]; -#endif // FLUTTER_SHELL_ENABLE_METAL -#endif // TARGET_IPHONE_SIMULATOR + return flutter::GetCoreAnimationLayerClassForRenderingAPI(); } - (std::unique_ptr)createSurface: - (std::shared_ptr)context { - if ([self.layer isKindOfClass:[CAEAGLLayer class]]) { - fml::scoped_nsobject eagl_layer( - reinterpret_cast([self.layer retain])); - if (flutter::IsIosEmbeddedViewsPreviewEnabled()) { - if (@available(iOS 9.0, *)) { - // TODO(amirh): only do this if there's an embedded view. - // https://github.com/flutter/flutter/issues/24133 - eagl_layer.get().presentsWithTransaction = YES; - } - } - return std::make_unique(context, std::move(eagl_layer), - [_delegate platformViewsController]); -#if FLUTTER_SHELL_ENABLE_METAL - } else if ([self.layer isKindOfClass:[CAMetalLayer class]]) { - fml::scoped_nsobject metalLayer( - reinterpret_cast([self.layer retain])); - if (flutter::IsIosEmbeddedViewsPreviewEnabled()) { - if (@available(iOS 8.0, *)) { - // TODO(amirh): only do this if there's an embedded view. - // https://github.com/flutter/flutter/issues/24133 - metalLayer.get().presentsWithTransaction = YES; - } - } - return std::make_unique(std::move(metalLayer), - [_delegate platformViewsController]); -#endif // FLUTTER_SHELL_ENABLE_METAL - } else { - fml::scoped_nsobject layer(reinterpret_cast([self.layer retain])); - return std::make_unique(std::move(layer), - [_delegate platformViewsController]); - } + (std::shared_ptr)ios_context { + return flutter::IOSSurface::Create( + std::move(ios_context), // context + fml::scoped_nsobject{[self.layer retain]}, // layer + [_delegate platformViewsController] // platform views controller + ); } - (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context { diff --git a/shell/platform/darwin/ios/ios_context.h b/shell/platform/darwin/ios/ios_context.h new file mode 100644 index 0000000000000..6615821905807 --- /dev/null +++ b/shell/platform/darwin/ios/ios_context.h @@ -0,0 +1,131 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RESOURCE_CONTEXT_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RESOURCE_CONTEXT_H_ + +#include + +#include "flutter/fml/macros.h" +#include "flutter/fml/platform/darwin/scoped_nsobject.h" +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" +#include "third_party/skia/include/gpu/GrContext.h" + +namespace flutter { + +//------------------------------------------------------------------------------ +/// @brief Manages the lifetime of the on-screen and off-screen rendering +/// contexts on iOS. On-screen contexts are used by Flutter for +/// rendering into the surface. The lifecycle of this context may be +/// tied to the lifecycle of the surface. On the other hand, the +/// lifecycle of the the off-screen context it tied to that of the +/// platform view. This one object used to manage both context +/// because GPU handles may need to be shared between the two +/// context. To achieve this, context may need references to one +/// another at creation time. This one object manages the creation, +/// use and collection of both contexts in a client rendering API +/// agnostic manner. +/// +class IOSContext { + public: + //---------------------------------------------------------------------------- + /// @brief Create an iOS context object capable of creating the on-screen + /// and off-screen GPU context for use by Skia. + /// + /// In case the engine does not support the specified client + /// rendering API, this a `nullptr` may be returned. + /// + /// @param[in] rendering_api A client rendering API supported by the + /// engine/platform. + /// + /// @return A valid context on success. `nullptr` on failure. + /// + static std::unique_ptr Create(IOSRenderingAPI rendering_api); + + //---------------------------------------------------------------------------- + /// @brief Collects the context object. This must happen on the thread on + /// which this object was created. + /// + virtual ~IOSContext(); + + //---------------------------------------------------------------------------- + /// @brief Create a resource context for use on the IO task runner. This + /// resource context is used by Skia to upload texture to + /// asynchronously and collect resources that are no longer needed + /// on the render task runner. + /// + /// @attention Client rendering APIs for which a GrContext cannot be realized + /// (software rendering), this method will always return null. + /// + /// @return A non-null Skia context on success. `nullptr` on failure. + /// + virtual sk_sp CreateResourceContext() = 0; + + //---------------------------------------------------------------------------- + /// @brief When using client rendering APIs whose contexts need to be + /// bound to a specific thread, the engine will call this method + /// to give the on-screen context a chance to bind to the current + /// thread. + /// + /// @attention Client rendering APIs that have no-concept of thread local + /// bindings (anything that is not OpenGL) will always return + /// `true`. + /// + /// @attention Client rendering APIs for which a GrContext cannot be created + /// (software rendering) will always return `false`. + /// + /// @attention This binds the on-screen context to the current thread. To + /// bind the off-screen context to the thread, use the + /// `ResoruceMakeCurrent` method instead. + /// + /// @attention Only one context may be bound to a thread at any given time. + /// Making a binding on a thread, clears the old binding. + /// + /// @return If the on-screen context could be bound to the current thread. + /// + virtual bool MakeCurrent() = 0; + + //---------------------------------------------------------------------------- + /// @brief When using client rendering APIs whose contexts need to be + /// bound to a specific thread, the engine will call this method + /// to give the off-screen context a chance to bind to the current + /// thread. + /// + /// @attention Client rendering APIs that have no-concept of thread local + /// bindings (anything that is not OpenGL) will always return + /// `true`. + /// + /// @attention Client rendering APIs for which a GrContext cannot be created + /// (software rendering) will always return `false`. + /// + /// @attention This binds the off-screen context to the current thread. To + /// bind the on-screen context to the thread, use the + /// `MakeCurrent` method instead. + /// + /// @attention Only one context may be bound to a thread at any given time. + /// Making a binding on a thread, clears the old binding. + /// + /// @return If the off-screen context could be bound to the current + /// thread. + /// + virtual bool ResourceMakeCurrent() = 0; + + //---------------------------------------------------------------------------- + /// @brief Clears the context binding of the current thread if one is + /// present. Does noting otherwise. + /// + /// @return `true` is the current context bound to the thread is cleared. + /// + virtual bool ClearCurrent() = 0; + + protected: + IOSContext(); + + private: + FML_DISALLOW_COPY_AND_ASSIGN(IOSContext); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RESOURCE_CONTEXT_H_ diff --git a/shell/platform/darwin/ios/ios_context.mm b/shell/platform/darwin/ios/ios_context.mm new file mode 100644 index 0000000000000..4cdd22a9fdd0a --- /dev/null +++ b/shell/platform/darwin/ios/ios_context.mm @@ -0,0 +1,38 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/platform/darwin/ios/ios_context.h" + +#include "flutter/fml/logging.h" +#include "flutter/shell/platform/darwin/ios/ios_context_gl.h" +#include "flutter/shell/platform/darwin/ios/ios_context_software.h" + +#if FLUTTER_SHELL_ENABLE_METAL +#include "flutter/shell/platform/darwin/ios/ios_context_metal.h" +#endif // FLUTTER_SHELL_ENABLE_METAL + +namespace flutter { + +IOSContext::IOSContext() = default; + +IOSContext::~IOSContext() = default; + +std::unique_ptr IOSContext::Create(IOSRenderingAPI rendering_api) { + switch (rendering_api) { + case IOSRenderingAPI::kOpenGLES: + return std::make_unique(); + case IOSRenderingAPI::kSoftware: + return std::make_unique(); +#if FLUTTER_SHELL_ENABLE_METAL + case IOSRenderingAPI::kMetal: + return std::make_unique(); +#endif // FLUTTER_SHELL_ENABLE_METAL + default: + break; + } + FML_CHECK(false); + return nullptr; +} + +} // namespace flutter diff --git a/shell/platform/darwin/ios/ios_gl_context.h b/shell/platform/darwin/ios/ios_context_gl.h similarity index 51% rename from shell/platform/darwin/ios/ios_gl_context.h rename to shell/platform/darwin/ios/ios_context_gl.h index 232645d9c8592..fd8885a42395a 100644 --- a/shell/platform/darwin/ios/ios_gl_context.h +++ b/shell/platform/darwin/ios/ios_context_gl.h @@ -5,39 +5,42 @@ #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_GL_CONTEXT_H_ #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_GL_CONTEXT_H_ -#import -#import -#import -#import - #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/common/platform_view.h" -#include "ios_gl_render_target.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" +#include "flutter/shell/platform/darwin/ios/ios_render_target_gl.h" + +@class CAEAGLLayer; namespace flutter { -class IOSGLContext { +class IOSContextGL final : public IOSContext { public: - IOSGLContext(); - - ~IOSGLContext(); - - std::unique_ptr CreateRenderTarget( - fml::scoped_nsobject layer); - - bool MakeCurrent(); + IOSContextGL(); - bool ResourceMakeCurrent(); + // |IOSContext| + ~IOSContextGL() override; - sk_sp ColorSpace() const { return color_space_; } + std::unique_ptr CreateRenderTarget(fml::scoped_nsobject layer); private: fml::scoped_nsobject context_; fml::scoped_nsobject resource_context_; - sk_sp color_space_; - FML_DISALLOW_COPY_AND_ASSIGN(IOSGLContext); + // |IOSContext| + sk_sp CreateResourceContext() override; + + // |IOSContext| + bool MakeCurrent() override; + + // |IOSContext| + bool ClearCurrent() override; + + // |IOSContext| + bool ResourceMakeCurrent() override; + + FML_DISALLOW_COPY_AND_ASSIGN(IOSContextGL); }; } // namespace flutter diff --git a/shell/platform/darwin/ios/ios_context_gl.mm b/shell/platform/darwin/ios/ios_context_gl.mm new file mode 100644 index 0000000000000..1396198338193 --- /dev/null +++ b/shell/platform/darwin/ios/ios_context_gl.mm @@ -0,0 +1,61 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/platform/darwin/ios/ios_context_gl.h" + +#import + +#include "flutter/shell/common/shell_io_manager.h" +#include "flutter/shell/gpu/gpu_surface_gl_delegate.h" + +namespace flutter { + +IOSContextGL::IOSContextGL() { + resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]); + if (resource_context_ != nullptr) { + context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3 + sharegroup:resource_context_.get().sharegroup]); + } else { + resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]); + context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 + sharegroup:resource_context_.get().sharegroup]); + } +} + +IOSContextGL::~IOSContextGL() = default; + +std::unique_ptr IOSContextGL::CreateRenderTarget( + fml::scoped_nsobject layer) { + return std::make_unique(std::move(layer), context_, resource_context_); +} + +// |IOSContext| +sk_sp IOSContextGL::CreateResourceContext() { + // TODO(chinmaygarde): Now that this is here, can ResourceMakeCurrent be removed? + if (![EAGLContext setCurrentContext:resource_context_.get()]) { + FML_DLOG(INFO) << "Could not make resource context current on IO thread. Async texture uploads " + "will be disabled. On Simulators, this is expected."; + return nullptr; + } + + return ShellIOManager::CreateCompatibleResourceLoadingContext( + GrBackend::kOpenGL_GrBackend, GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface()); +} + +// |IOSContext| +bool IOSContextGL::MakeCurrent() { + return [EAGLContext setCurrentContext:context_.get()]; +} + +// |IOSContext| +bool IOSContextGL::ResourceMakeCurrent() { + return [EAGLContext setCurrentContext:resource_context_.get()]; +} + +// |IOSContext| +bool IOSContextGL::ClearCurrent() { + return [EAGLContext setCurrentContext:nil]; +} + +} // namespace flutter diff --git a/shell/platform/darwin/ios/ios_context_metal.h b/shell/platform/darwin/ios/ios_context_metal.h new file mode 100644 index 0000000000000..f98b11f72d9cc --- /dev/null +++ b/shell/platform/darwin/ios/ios_context_metal.h @@ -0,0 +1,57 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_METAL_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_METAL_H_ + +#include + +#include "flutter/fml/macros.h" +#include "flutter/fml/platform/darwin/scoped_nsobject.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" +#include "third_party/skia/include/gpu/GrContext.h" + +namespace flutter { + +class IOSContextMetal final : public IOSContext { + public: + IOSContextMetal(); + + ~IOSContextMetal(); + + fml::scoped_nsprotocol> GetDevice() const; + + fml::scoped_nsprotocol> GetMainCommandQueue() const; + + fml::scoped_nsprotocol> GetResourceCommandQueue() const; + + sk_sp GetMainContext() const; + + sk_sp GetResourceContext() const; + + private: + fml::scoped_nsprotocol> device_; + fml::scoped_nsprotocol> main_queue_; + sk_sp main_context_; + sk_sp resource_context_; + bool is_valid_ = false; + + // |IOSContext| + sk_sp CreateResourceContext() override; + + // |IOSContext| + bool MakeCurrent() override; + + // |IOSContext| + bool ResourceMakeCurrent() override; + + // |IOSContext| + bool ClearCurrent() override; + + FML_DISALLOW_COPY_AND_ASSIGN(IOSContextMetal); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_METAL_H_ diff --git a/shell/platform/darwin/ios/ios_context_metal.mm b/shell/platform/darwin/ios/ios_context_metal.mm new file mode 100644 index 0000000000000..8b9cbda33455b --- /dev/null +++ b/shell/platform/darwin/ios/ios_context_metal.mm @@ -0,0 +1,86 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/platform/darwin/ios/ios_context_metal.h" + +#include "flutter/fml/logging.h" + +namespace flutter { + +IOSContextMetal::IOSContextMetal() { + device_.reset([MTLCreateSystemDefaultDevice() retain]); + if (!device_) { + FML_LOG(ERROR) << "Could not acquire Metal device."; + return; + } + + main_queue_.reset([device_ newCommandQueue]); + + if (!main_queue_) { + FML_LOG(ERROR) << "Could not create Metal command queue."; + return; + } + + [main_queue_ setLabel:@"Flutter Main Queue"]; + + // Skia expect arguments to `MakeMetal` transfer ownership of the reference in for release later + // when the GrContext is collected. + main_context_ = GrContext::MakeMetal([device_ retain], [main_queue_ retain]); + resource_context_ = GrContext::MakeMetal([device_ retain], [main_queue_ retain]); + + if (!main_context_ || !resource_context_) { + FML_LOG(ERROR) << "Could not create Skia Metal contexts."; + return; + } + + is_valid_ = false; +} + +IOSContextMetal::~IOSContextMetal() = default; + +fml::scoped_nsprotocol> IOSContextMetal::GetDevice() const { + return device_; +} + +fml::scoped_nsprotocol> IOSContextMetal::GetMainCommandQueue() const { + return main_queue_; +} + +fml::scoped_nsprotocol> IOSContextMetal::GetResourceCommandQueue() const { + // TODO(52150): Create a dedicated resource queue once multiple queues are supported in Skia. + return main_queue_; +} + +sk_sp IOSContextMetal::GetMainContext() const { + return main_context_; +} + +sk_sp IOSContextMetal::GetResourceContext() const { + return resource_context_; +} + +// |IOSContext| +sk_sp IOSContextMetal::CreateResourceContext() { + return resource_context_; +} + +// |IOSContext| +bool IOSContextMetal::MakeCurrent() { + // This only makes sense for context that need to be bound to a specific thread. + return true; +} + +// |IOSContext| +bool IOSContextMetal::ResourceMakeCurrent() { + // This only makes sense for context that need to be bound to a specific thread. + return true; +} + +// |IOSContext| +bool IOSContextMetal::ClearCurrent() { + // This only makes sense for context that need to be bound to a specific thread. + return true; +} + +} // namespace flutter diff --git a/shell/platform/darwin/ios/ios_context_software.h b/shell/platform/darwin/ios/ios_context_software.h new file mode 100644 index 0000000000000..558f39a637f97 --- /dev/null +++ b/shell/platform/darwin/ios/ios_context_software.h @@ -0,0 +1,38 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_SOFTWARE_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_SOFTWARE_H_ + +#include "flutter/fml/macros.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" + +namespace flutter { + +class IOSContextSoftware final : public IOSContext { + public: + IOSContextSoftware(); + + // |IOSContext| + ~IOSContextSoftware(); + + // |IOSContext| + sk_sp CreateResourceContext() override; + + // |IOSContext| + bool MakeCurrent() override; + + // |IOSContext| + bool ResourceMakeCurrent() override; + + // |IOSContext| + bool ClearCurrent() override; + + private: + FML_DISALLOW_COPY_AND_ASSIGN(IOSContextSoftware); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_CONTEXT_SOFTWARE_H_ diff --git a/shell/platform/darwin/ios/ios_context_software.mm b/shell/platform/darwin/ios/ios_context_software.mm new file mode 100644 index 0000000000000..8bb029d5792d3 --- /dev/null +++ b/shell/platform/darwin/ios/ios_context_software.mm @@ -0,0 +1,34 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/platform/darwin/ios/ios_context_software.h" + +namespace flutter { + +IOSContextSoftware::IOSContextSoftware() = default; + +// |IOSContext| +IOSContextSoftware::~IOSContextSoftware() = default; + +// |IOSContext| +sk_sp IOSContextSoftware::CreateResourceContext() { + return nullptr; +} + +// |IOSContext| +bool IOSContextSoftware::MakeCurrent() { + return false; +} + +// |IOSContext| +bool IOSContextSoftware::ResourceMakeCurrent() { + return false; +} + +// |IOSContext| +bool IOSContextSoftware::ClearCurrent() { + return false; +} + +} // namespace flutter diff --git a/shell/platform/darwin/ios/ios_external_texture_gl.h b/shell/platform/darwin/ios/ios_external_texture_gl.h index 30c138af76584..46033ecb7ac50 100644 --- a/shell/platform/darwin/ios/ios_external_texture_gl.h +++ b/shell/platform/darwin/ios/ios_external_texture_gl.h @@ -12,34 +12,41 @@ namespace flutter { -class IOSExternalTextureGL : public flutter::Texture { +class IOSExternalTextureGL final : public Texture { public: IOSExternalTextureGL(int64_t textureId, NSObject* externalTexture); + // |Texture| ~IOSExternalTextureGL() override; - // Called from GPU thread. + private: + bool new_frame_ready_ = false; + fml::scoped_nsobject> external_texture_; + fml::CFRef cache_ref_; + fml::CFRef texture_ref_; + fml::CFRef buffer_ref_; + + // |Texture| void Paint(SkCanvas& canvas, const SkRect& bounds, bool freeze, GrContext* context) override; + // |Texture| void OnGrContextCreated() override; + // |Texture| void OnGrContextDestroyed() override; + // |Texture| void MarkNewFrameAvailable() override; + // |Texture| void OnTextureUnregistered() override; - private: void CreateTextureFromPixelBuffer(); void EnsureTextureCacheExists(); + bool NeedUpdateTexture(bool freeze); - bool new_frame_ready_ = false; - fml::scoped_nsobject> external_texture_; - fml::CFRef cache_ref_; - fml::CFRef texture_ref_; - fml::CFRef buffer_ref_; FML_DISALLOW_COPY_AND_ASSIGN(IOSExternalTextureGL); }; diff --git a/shell/platform/darwin/ios/ios_gl_context.mm b/shell/platform/darwin/ios/ios_gl_context.mm deleted file mode 100644 index 52fb85f8f19a9..0000000000000 --- a/shell/platform/darwin/ios/ios_gl_context.mm +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "flutter/shell/platform/darwin/ios/ios_gl_context.h" - -#include - -#include "flutter/fml/trace_event.h" -#include "third_party/skia/include/gpu/GrContextOptions.h" -#include "third_party/skia/include/gpu/gl/GrGLInterface.h" - -namespace flutter { - -IOSGLContext::IOSGLContext() { - resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]); - if (resource_context_ != nullptr) { - context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3 - sharegroup:resource_context_.get().sharegroup]); - } else { - resource_context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]); - context_.reset([[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 - sharegroup:resource_context_.get().sharegroup]); - } - - // TODO: - // iOS displays are more variable than just P3 or sRGB. Reading the display - // gamut just tells us what color space it makes sense to render into. We - // should use iOS APIs to perform the final correction step based on the - // device properties. Ex: We can indicate that we have rendered in P3, and - // the framework will do the final adjustment for us. - color_space_ = SkColorSpace::MakeSRGB(); - if (@available(iOS 10, *)) { - UIDisplayGamut displayGamut = [UIScreen mainScreen].traitCollection.displayGamut; - switch (displayGamut) { - case UIDisplayGamutP3: - // Should we consider using more than 8-bits of precision given that - // P3 specifies a wider range of colors? - color_space_ = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kDCIP3); - break; - default: - break; - } - } -} - -IOSGLContext::~IOSGLContext() = default; - -std::unique_ptr IOSGLContext::CreateRenderTarget( - fml::scoped_nsobject layer) { - return std::make_unique(std::move(layer), context_.get(), - resource_context_.get()); -} - -bool IOSGLContext::MakeCurrent() { - return [EAGLContext setCurrentContext:context_.get()]; -} - -bool IOSGLContext::ResourceMakeCurrent() { - return [EAGLContext setCurrentContext:resource_context_.get()]; -} - -} // namespace flutter diff --git a/shell/platform/darwin/ios/ios_gl_render_target.h b/shell/platform/darwin/ios/ios_gl_render_target.h deleted file mode 100644 index b2eafe16e0950..0000000000000 --- a/shell/platform/darwin/ios/ios_gl_render_target.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_GL_RENDER_TARGET_H_ -#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_GL_RENDER_TARGET_H_ - -#import -#import -#import -#import - -#include "flutter/fml/macros.h" -#include "flutter/fml/platform/darwin/scoped_nsobject.h" -#include "flutter/shell/common/platform_view.h" - -namespace flutter { - -class IOSGLRenderTarget { - public: - IOSGLRenderTarget(fml::scoped_nsobject layer, - EAGLContext* context, - EAGLContext* resource_context); - - ~IOSGLRenderTarget(); - - bool IsValid() const; - - bool PresentRenderBuffer() const; - - GLuint framebuffer() const { return framebuffer_; } - - bool UpdateStorageSizeIfNecessary(); - - bool MakeCurrent(); - - bool ResourceMakeCurrent(); - - sk_sp ColorSpace() const { return color_space_; } - - private: - fml::scoped_nsobject layer_; - fml::scoped_nsobject context_; - fml::scoped_nsobject resource_context_; - GLuint framebuffer_; - GLuint colorbuffer_; - GLint storage_size_width_; - GLint storage_size_height_; - sk_sp color_space_; - bool valid_; - - FML_DISALLOW_COPY_AND_ASSIGN(IOSGLRenderTarget); -}; - -} // namespace flutter - -#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_GL_RENDER_TARGET_H_ diff --git a/shell/platform/darwin/ios/ios_render_target_gl.h b/shell/platform/darwin/ios/ios_render_target_gl.h new file mode 100644 index 0000000000000..f83679f29bcf1 --- /dev/null +++ b/shell/platform/darwin/ios/ios_render_target_gl.h @@ -0,0 +1,50 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_ + +#import +#import +#import +#import + +#include "flutter/fml/macros.h" +#include "flutter/fml/platform/darwin/scoped_nsobject.h" +#include "flutter/shell/common/platform_view.h" + +namespace flutter { + +class IOSRenderTargetGL { + public: + IOSRenderTargetGL(fml::scoped_nsobject layer, + fml::scoped_nsobject context, + fml::scoped_nsobject resource_context); + + ~IOSRenderTargetGL(); + + bool IsValid() const; + + bool PresentRenderBuffer() const; + + intptr_t GetFramebuffer() const; + + bool UpdateStorageSizeIfNecessary(); + + private: + fml::scoped_nsobject layer_; + fml::scoped_nsobject context_; + fml::scoped_nsobject resource_context_; + GLuint framebuffer_ = GL_NONE; + GLuint colorbuffer_ = GL_NONE; + GLint storage_size_width_ = GL_NONE; + GLint storage_size_height_ = GL_NONE; + bool valid_ = false; + + FML_DISALLOW_COPY_AND_ASSIGN(IOSRenderTargetGL); +}; + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_ diff --git a/shell/platform/darwin/ios/ios_gl_render_target.mm b/shell/platform/darwin/ios/ios_render_target_gl.mm similarity index 75% rename from shell/platform/darwin/ios/ios_gl_render_target.mm rename to shell/platform/darwin/ios/ios_render_target_gl.mm index a57ba9c46b414..34b57a787d843 100644 --- a/shell/platform/darwin/ios/ios_gl_render_target.mm +++ b/shell/platform/darwin/ios/ios_render_target_gl.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/darwin/ios/ios_gl_render_target.h" +#include "flutter/shell/platform/darwin/ios/ios_render_target_gl.h" #include @@ -12,21 +12,20 @@ namespace flutter { -IOSGLRenderTarget::IOSGLRenderTarget(fml::scoped_nsobject layer, - EAGLContext* context, - EAGLContext* resource_context) +IOSRenderTargetGL::IOSRenderTargetGL(fml::scoped_nsobject layer, + fml::scoped_nsobject context, + fml::scoped_nsobject resource_context) : layer_(std::move(layer)), - context_([context retain]), - resource_context_([resource_context retain]), - framebuffer_(GL_NONE), - colorbuffer_(GL_NONE), - storage_size_width_(0), - storage_size_height_(0), - valid_(false) { + context_(std::move(context)), + resource_context_(std::move(resource_context)) { FML_DCHECK(layer_ != nullptr); FML_DCHECK(context_ != nullptr); FML_DCHECK(resource_context_ != nullptr); + if (@available(iOS 9.0, *)) { + [layer_ setPresentsWithTransaction:YES]; + } + bool context_current = [EAGLContext setCurrentContext:context_]; FML_DCHECK(context_current); @@ -61,7 +60,7 @@ valid_ = true; } -IOSGLRenderTarget::~IOSGLRenderTarget() { +IOSRenderTargetGL::~IOSRenderTargetGL() { EAGLContext* context = EAGLContext.currentContext; [EAGLContext setCurrentContext:context_]; FML_DCHECK(glGetError() == GL_NO_ERROR); @@ -74,11 +73,18 @@ [EAGLContext setCurrentContext:context]; } -bool IOSGLRenderTarget::IsValid() const { +// |IOSRenderTarget| +bool IOSRenderTargetGL::IsValid() const { return valid_; } -bool IOSGLRenderTarget::PresentRenderBuffer() const { +// |IOSRenderTarget| +intptr_t IOSRenderTargetGL::GetFramebuffer() const { + return framebuffer_; +} + +// |IOSRenderTarget| +bool IOSRenderTargetGL::PresentRenderBuffer() const { const GLenum discards[] = { GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT, @@ -87,20 +93,23 @@ glDiscardFramebufferEXT(GL_FRAMEBUFFER, sizeof(discards) / sizeof(GLenum), discards); glBindRenderbuffer(GL_RENDERBUFFER, colorbuffer_); - return [[EAGLContext currentContext] presentRenderbuffer:GL_RENDERBUFFER]; + auto current_context = [EAGLContext currentContext]; + FML_DCHECK(current_context != nullptr); + return [current_context presentRenderbuffer:GL_RENDERBUFFER]; } -bool IOSGLRenderTarget::UpdateStorageSizeIfNecessary() { +// |IOSRenderTarget| +bool IOSRenderTargetGL::UpdateStorageSizeIfNecessary() { const CGSize layer_size = [layer_.get() bounds].size; const CGFloat contents_scale = layer_.get().contentsScale; const GLint size_width = layer_size.width * contents_scale; const GLint size_height = layer_size.height * contents_scale; if (size_width == storage_size_width_ && size_height == storage_size_height_) { - // Nothing to since the stoage size is already consistent with the layer. + // Nothing to do since the storage size is already consistent with the layer. return true; } - TRACE_EVENT_INSTANT0("flutter", "IOSGLRenderTarget::UpdateStorageSizeIfNecessary"); + TRACE_EVENT_INSTANT0("flutter", "IOSRenderTargetGL::UpdateStorageSizeIfNecessary"); FML_DLOG(INFO) << "Updating render buffer storage size."; FML_DCHECK(glGetError() == GL_NO_ERROR); @@ -132,12 +141,4 @@ return true; } -bool IOSGLRenderTarget::MakeCurrent() { - return UpdateStorageSizeIfNecessary() && [EAGLContext setCurrentContext:context_.get()]; -} - -bool IOSGLRenderTarget::ResourceMakeCurrent() { - return [EAGLContext setCurrentContext:resource_context_.get()]; -} - } // namespace flutter diff --git a/shell/platform/darwin/ios/ios_surface.h b/shell/platform/darwin/ios/ios_surface.h index 49f40f9eec76a..43049d6c367b8 100644 --- a/shell/platform/darwin/ios/ios_surface.h +++ b/shell/platform/darwin/ios/ios_surface.h @@ -9,25 +9,36 @@ #include +#include "flutter/flow/embedded_views.h" #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/common/surface.h" +@class CALayer; + namespace flutter { // Returns true if the app explicitly specified to use the iOS view embedding // mechanism which is still in a release preview. bool IsIosEmbeddedViewsPreviewEnabled(); -class IOSSurface { +class IOSSurface : public ExternalViewEmbedder { public: - IOSSurface(FlutterPlatformViewsController* platform_views_controller); + static std::unique_ptr Create( + std::shared_ptr context, + fml::scoped_nsobject layer, + FlutterPlatformViewsController* platform_views_controller); + // |ExternalViewEmbedder| virtual ~IOSSurface(); - virtual bool IsValid() const = 0; + std::shared_ptr GetContext() const; + + ExternalViewEmbedder* GetExternalViewEmbedderIfEnabled(); - virtual bool ResourceContextMakeCurrent() = 0; + bool ResourceContextMakeCurrent(); + + virtual bool IsValid() const = 0; virtual void UpdateStorageSizeIfNecessary() = 0; @@ -36,15 +47,40 @@ class IOSSurface { // will be used. // // If a GrContext is supplied, creates a secondary surface. - virtual std::unique_ptr CreateGPUSurface( - GrContext* gr_context = nullptr) = 0; + virtual std::unique_ptr CreateGPUSurface(GrContext* gr_context = nullptr) = 0; protected: - FlutterPlatformViewsController* GetPlatformViewsController(); + IOSSurface(std::shared_ptr ios_context, + FlutterPlatformViewsController* platform_views_controller); private: + std::shared_ptr ios_context_; FlutterPlatformViewsController* platform_views_controller_; + // |ExternalViewEmbedder| + SkCanvas* GetRootCanvas() override; + + // |ExternalViewEmbedder| + void CancelFrame() override; + + // |ExternalViewEmbedder| + void BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) override; + // |ExternalViewEmbedder| + void PrerollCompositeEmbeddedView(int view_id, + std::unique_ptr params) override; + + // |ExternalViewEmbedder| + PostPrerollResult PostPrerollAction(fml::RefPtr gpu_thread_merger) override; + + // |ExternalViewEmbedder| + std::vector GetCurrentCanvases() override; + + // |ExternalViewEmbedder| + SkCanvas* CompositeEmbeddedView(int view_id) override; + + // |ExternalViewEmbedder| + bool SubmitFrame(GrContext* context) override; + public: FML_DISALLOW_COPY_AND_ASSIGN(IOSSurface); }; diff --git a/shell/platform/darwin/ios/ios_surface.mm b/shell/platform/darwin/ios/ios_surface.mm index 4c2b4efd85fa4..d0a931f7b1f46 100644 --- a/shell/platform/darwin/ios/ios_surface.mm +++ b/shell/platform/darwin/ios/ios_surface.mm @@ -4,26 +4,144 @@ #include "flutter/shell/platform/darwin/ios/ios_surface.h" -#include - #include "flutter/shell/platform/darwin/ios/ios_surface_gl.h" #include "flutter/shell/platform/darwin/ios/ios_surface_software.h" +#if FLUTTER_SHELL_ENABLE_METAL +#include "flutter/shell/platform/darwin/ios/ios_surface_metal.h" +#endif // FLUTTER_SHELL_ENABLE_METAL + namespace flutter { // The name of the Info.plist flag to enable the embedded iOS views preview. -const char* const kEmbeddedViewsPreview = "io.flutter.embedded_views_preview"; +constexpr const char* kEmbeddedViewsPreview = "io.flutter.embedded_views_preview"; bool IsIosEmbeddedViewsPreviewEnabled() { - return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@(kEmbeddedViewsPreview)] boolValue]; + static bool preview_enabled = + [[[NSBundle mainBundle] objectForInfoDictionaryKey:@(kEmbeddedViewsPreview)] boolValue]; + return preview_enabled; +} + +std::unique_ptr IOSSurface::Create( + std::shared_ptr context, + fml::scoped_nsobject layer, + FlutterPlatformViewsController* platform_views_controller) { + FML_DCHECK(layer); + FML_DCHECK(context); + + if ([layer.get() isKindOfClass:[CAEAGLLayer class]]) { + return std::make_unique( + fml::scoped_nsobject( + reinterpret_cast([layer.get() retain])), // EAGL layer + std::move(context), // context + platform_views_controller // platform views controller + ); + } + +#if FLUTTER_SHELL_ENABLE_METAL + if ([layer.get() isKindOfClass:[CAMetalLayer class]]) { + return std::make_unique( + fml::scoped_nsobject( + reinterpret_cast([layer.get() retain])), // Metal layer + std::move(context), // context + platform_views_controller // platform views controller + ); + } +#endif // FLUTTER_SHELL_ENABLE_METAL + + return std::make_unique( + std::move(layer), // layer + std::move(context), // context + platform_views_controller // platform views controller + ); } -IOSSurface::IOSSurface(FlutterPlatformViewsController* platform_views_controller) - : platform_views_controller_(platform_views_controller) {} +IOSSurface::IOSSurface(std::shared_ptr ios_context, + FlutterPlatformViewsController* platform_views_controller) + : ios_context_(std::move(ios_context)), platform_views_controller_(platform_views_controller) { + FML_DCHECK(ios_context_); +} IOSSurface::~IOSSurface() = default; -FlutterPlatformViewsController* IOSSurface::GetPlatformViewsController() { - return platform_views_controller_; +bool IOSSurface::ResourceContextMakeCurrent() { + return GetContext()->ResourceMakeCurrent(); +} + +std::shared_ptr IOSSurface::GetContext() const { + return ios_context_; +} + +// |ExternalViewEmbedder| +SkCanvas* IOSSurface::GetRootCanvas() { + // On iOS, the root surface is created from the on-screen render target. Only the surfaces for the + // various overlays are controlled by this class. + return nullptr; +} + +ExternalViewEmbedder* IOSSurface::GetExternalViewEmbedderIfEnabled() { + if (IsIosEmbeddedViewsPreviewEnabled()) { + return this; + } else { + return nullptr; + } +} + +// |ExternalViewEmbedder| +void IOSSurface::CancelFrame() { + TRACE_EVENT0("flutter", "IOSSurface::CancelFrame"); + FML_CHECK(platform_views_controller_ != nullptr); + platform_views_controller_->CancelFrame(); + // Committing the current transaction as |BeginFrame| will create a nested + // CATransaction otherwise. + [CATransaction commit]; +} + +// |ExternalViewEmbedder| +void IOSSurface::BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) { + TRACE_EVENT0("flutter", "IOSSurface::BeginFrame"); + FML_CHECK(platform_views_controller_ != nullptr); + platform_views_controller_->SetFrameSize(frame_size); + [CATransaction begin]; +} + +// |ExternalViewEmbedder| +void IOSSurface::PrerollCompositeEmbeddedView(int view_id, + std::unique_ptr params) { + TRACE_EVENT0("flutter", "IOSSurface::PrerollCompositeEmbeddedView"); + + FML_CHECK(platform_views_controller_ != nullptr); + platform_views_controller_->PrerollCompositeEmbeddedView(view_id, std::move(params)); +} + +// |ExternalViewEmbedder| +PostPrerollResult IOSSurface::PostPrerollAction( + fml::RefPtr gpu_thread_merger) { + TRACE_EVENT0("flutter", "IOSSurface::PostPrerollAction"); + FML_CHECK(platform_views_controller_ != nullptr); + return platform_views_controller_->PostPrerollAction(gpu_thread_merger); } + +// |ExternalViewEmbedder| +std::vector IOSSurface::GetCurrentCanvases() { + FML_CHECK(platform_views_controller_ != nullptr); + return platform_views_controller_->GetCurrentCanvases(); +} + +// |ExternalViewEmbedder| +SkCanvas* IOSSurface::CompositeEmbeddedView(int view_id) { + TRACE_EVENT0("flutter", "IOSSurface::CompositeEmbeddedView"); + FML_CHECK(platform_views_controller_ != nullptr); + return platform_views_controller_->CompositeEmbeddedView(view_id); +} + +// |ExternalViewEmbedder| +bool IOSSurface::SubmitFrame(GrContext* context) { + TRACE_EVENT0("flutter", "IOSSurface::SubmitFrame"); + FML_CHECK(platform_views_controller_ != nullptr); + bool submitted = platform_views_controller_->SubmitFrame(std::move(context), ios_context_); + [CATransaction commit]; + return submitted; +} + } // namespace flutter diff --git a/shell/platform/darwin/ios/ios_surface_gl.h b/shell/platform/darwin/ios/ios_surface_gl.h index 906f3be92b2d8..3cbc6ebd047ad 100644 --- a/shell/platform/darwin/ios/ios_surface_gl.h +++ b/shell/platform/darwin/ios/ios_surface_gl.h @@ -8,79 +8,51 @@ #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/gpu/gpu_surface_gl.h" -#include "flutter/shell/platform/darwin/ios/ios_gl_context.h" -#include "flutter/shell/platform/darwin/ios/ios_gl_render_target.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" +#include "flutter/shell/platform/darwin/ios/ios_render_target_gl.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" @class CAEAGLLayer; namespace flutter { -class IOSSurfaceGL final : public IOSSurface, - public GPUSurfaceGLDelegate, - public ExternalViewEmbedder { +class IOSSurfaceGL final : public IOSSurface, public GPUSurfaceGLDelegate { public: - IOSSurfaceGL(std::shared_ptr context, - fml::scoped_nsobject layer, - FlutterPlatformViewsController* platform_views_controller); - - IOSSurfaceGL(fml::scoped_nsobject layer, std::shared_ptr context); + IOSSurfaceGL(fml::scoped_nsobject layer, + std::shared_ptr context, + FlutterPlatformViewsController* platform_views_controller = nullptr); ~IOSSurfaceGL() override; // |IOSSurface| bool IsValid() const override; - // |IOSSurface| - bool ResourceContextMakeCurrent() override; - // |IOSSurface| void UpdateStorageSizeIfNecessary() override; // |IOSSurface| - std::unique_ptr CreateGPUSurface(GrContext* gr_context = nullptr) override; + std::unique_ptr CreateGPUSurface(GrContext* gr_context) override; + // |GPUSurfaceGLDelegate| bool GLContextMakeCurrent() override; + // |GPUSurfaceGLDelegate| bool GLContextClearCurrent() override; + // |GPUSurfaceGLDelegate| bool GLContextPresent() override; + // |GPUSurfaceGLDelegate| intptr_t GLContextFBO() const override; + // |GPUSurfaceGLDelegate| bool SurfaceSupportsReadback() const override; // |GPUSurfaceGLDelegate| ExternalViewEmbedder* GetExternalViewEmbedder() override; - // |ExternalViewEmbedder| - SkCanvas* GetRootCanvas() override; - - // |ExternalViewEmbedder| - void CancelFrame() override; - - // |ExternalViewEmbedder| - void BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) override; - - // |ExternalViewEmbedder| - void PrerollCompositeEmbeddedView(int view_id, - std::unique_ptr params) override; - - // |ExternalViewEmbedder| - PostPrerollResult PostPrerollAction(fml::RefPtr gpu_thread_merger) override; - - // |ExternalViewEmbedder| - std::vector GetCurrentCanvases() override; - - // |ExternalViewEmbedder| - SkCanvas* CompositeEmbeddedView(int view_id) override; - - // |ExternalViewEmbedder| - bool SubmitFrame(GrContext* context) override; - private: - std::shared_ptr context_; - std::unique_ptr render_target_; + std::unique_ptr render_target_; FML_DISALLOW_COPY_AND_ASSIGN(IOSSurfaceGL); }; diff --git a/shell/platform/darwin/ios/ios_surface_gl.mm b/shell/platform/darwin/ios/ios_surface_gl.mm index 4f1da5a593a02..b3aa25a4e66cd 100644 --- a/shell/platform/darwin/ios/ios_surface_gl.mm +++ b/shell/platform/darwin/ios/ios_surface_gl.mm @@ -6,38 +6,36 @@ #include "flutter/fml/trace_event.h" #include "flutter/shell/gpu/gpu_surface_gl.h" +#include "flutter/shell/platform/darwin/ios/ios_context_gl.h" namespace flutter { -IOSSurfaceGL::IOSSurfaceGL(std::shared_ptr context, - fml::scoped_nsobject layer, - FlutterPlatformViewsController* platform_views_controller) - : IOSSurface(platform_views_controller), context_(context) { - render_target_ = context_->CreateRenderTarget(std::move(layer)); +static IOSContextGL* CastToGLContext(const std::shared_ptr& context) { + return reinterpret_cast(context.get()); } IOSSurfaceGL::IOSSurfaceGL(fml::scoped_nsobject layer, - std::shared_ptr context) - : IOSSurface(nullptr), context_(context) { - render_target_ = context_->CreateRenderTarget(std::move(layer)); + std::shared_ptr context, + FlutterPlatformViewsController* platform_views_controller) + : IOSSurface(context, platform_views_controller) { + render_target_ = CastToGLContext(context)->CreateRenderTarget(std::move(layer)); } IOSSurfaceGL::~IOSSurfaceGL() = default; +// |IOSSurface| bool IOSSurfaceGL::IsValid() const { return render_target_->IsValid(); } -bool IOSSurfaceGL::ResourceContextMakeCurrent() { - return context_->ResourceMakeCurrent(); -} - +// |IOSSurface| void IOSSurfaceGL::UpdateStorageSizeIfNecessary() { if (IsValid()) { render_target_->UpdateStorageSizeIfNecessary(); } } +// |IOSSurface| std::unique_ptr IOSSurfaceGL::CreateGPUSurface(GrContext* gr_context) { if (gr_context) { return std::make_unique(sk_ref_sp(gr_context), this, true); @@ -45,10 +43,12 @@ return std::make_unique(this, true); } +// |GPUSurfaceGLDelegate| intptr_t IOSSurfaceGL::GLContextFBO() const { - return IsValid() ? render_target_->framebuffer() : GL_NONE; + return IsValid() ? render_target_->GetFramebuffer() : GL_NONE; } +// |GPUSurfaceGLDelegate| bool IOSSurfaceGL::SurfaceSupportsReadback() const { // The onscreen surface wraps a GL renderbuffer, which is extremely slow to read on iOS. // Certain filter effects, in particular BackdropFilter, require making a copy of @@ -58,98 +58,29 @@ return false; } +// |GPUSurfaceGLDelegate| bool IOSSurfaceGL::GLContextMakeCurrent() { if (!IsValid()) { return false; } - return render_target_->UpdateStorageSizeIfNecessary() && context_->MakeCurrent(); + return render_target_->UpdateStorageSizeIfNecessary() && GetContext()->MakeCurrent(); } +// |GPUSurfaceGLDelegate| bool IOSSurfaceGL::GLContextClearCurrent() { [EAGLContext setCurrentContext:nil]; return true; } +// |GPUSurfaceGLDelegate| bool IOSSurfaceGL::GLContextPresent() { TRACE_EVENT0("flutter", "IOSSurfaceGL::GLContextPresent"); return IsValid() && render_target_->PresentRenderBuffer(); } -// |ExternalViewEmbedder| -SkCanvas* IOSSurfaceGL::GetRootCanvas() { - // On iOS, the root surface is created from the on-screen render target. Only the surfaces for the - // various overlays are controlled by this class. - return nullptr; -} - -// |ExternalViewEmbedder| -flutter::ExternalViewEmbedder* IOSSurfaceGL::GetExternalViewEmbedder() { - if (IsIosEmbeddedViewsPreviewEnabled()) { - return this; - } else { - return nullptr; - } -} - -// |ExternalViewEmbedder| -void IOSSurfaceGL::CancelFrame() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->CancelFrame(); - // Committing the current transaction as |BeginFrame| will create a nested - // CATransaction otherwise. - [CATransaction commit]; -} - -// |ExternalViewEmbedder| -void IOSSurfaceGL::BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->SetFrameSize(frame_size); - [CATransaction begin]; -} - -// |ExternalViewEmbedder| -void IOSSurfaceGL::PrerollCompositeEmbeddedView( - int view_id, - std::unique_ptr params) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->PrerollCompositeEmbeddedView(view_id, std::move(params)); -} - -// |ExternalViewEmbedder| -PostPrerollResult IOSSurfaceGL::PostPrerollAction( - fml::RefPtr gpu_thread_merger) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->PostPrerollAction(gpu_thread_merger); -} - -// |ExternalViewEmbedder| -std::vector IOSSurfaceGL::GetCurrentCanvases() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->GetCurrentCanvases(); -} - -// |ExternalViewEmbedder| -SkCanvas* IOSSurfaceGL::CompositeEmbeddedView(int view_id) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->CompositeEmbeddedView(view_id); -} - -// |ExternalViewEmbedder| -bool IOSSurfaceGL::SubmitFrame(GrContext* context) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - if (platform_views_controller == nullptr) { - return true; - } - - bool submitted = platform_views_controller->SubmitFrame(std::move(context), context_); - [CATransaction commit]; - return submitted; +// |GPUSurfaceGLDelegate| +ExternalViewEmbedder* IOSSurfaceGL::GetExternalViewEmbedder() { + return GetExternalViewEmbedderIfEnabled(); } } // namespace flutter diff --git a/shell/platform/darwin/ios/ios_surface_metal.h b/shell/platform/darwin/ios/ios_surface_metal.h index 2b001ea2b692d..e700bc02a3eb2 100644 --- a/shell/platform/darwin/ios/ios_surface_metal.h +++ b/shell/platform/darwin/ios/ios_surface_metal.h @@ -6,68 +6,37 @@ #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_H_ #include "flutter/fml/macros.h" -#include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" -#include "flutter/shell/gpu/gpu_surface_metal.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" @class CAMetalLayer; namespace flutter { -class IOSSurfaceMetal final : public IOSSurface, - public GPUSurfaceDelegate, - public ExternalViewEmbedder { +class IOSSurfaceMetal final : public IOSSurface, public GPUSurfaceDelegate { public: IOSSurfaceMetal(fml::scoped_nsobject layer, + std::shared_ptr context, FlutterPlatformViewsController* platform_views_controller); - IOSSurfaceMetal(fml::scoped_nsobject layer); - + // |IOSSurface| ~IOSSurfaceMetal() override; - // |IOSSurface| - bool IsValid() const override; + private: + fml::scoped_nsobject layer_; + bool is_valid_ = false; // |IOSSurface| - bool ResourceContextMakeCurrent() override; + bool IsValid() const override; // |IOSSurface| void UpdateStorageSizeIfNecessary() override; // |IOSSurface| - std::unique_ptr CreateGPUSurface(GrContext* gr_context = nullptr) override; + std::unique_ptr CreateGPUSurface(GrContext* gr_context) override; // |GPUSurfaceDelegate| - flutter::ExternalViewEmbedder* GetExternalViewEmbedder() override; - - // |ExternalViewEmbedder| - SkCanvas* GetRootCanvas() override; - - // |ExternalViewEmbedder| - void CancelFrame() override; - - // |ExternalViewEmbedder| - void BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) override; - - // |ExternalViewEmbedder| - void PrerollCompositeEmbeddedView(int view_id, - std::unique_ptr params) override; - - // |ExternalViewEmbedder| - PostPrerollResult PostPrerollAction(fml::RefPtr gpu_thread_merger) override; - - // |ExternalViewEmbedder| - std::vector GetCurrentCanvases() override; - - // |ExternalViewEmbedder| - SkCanvas* CompositeEmbeddedView(int view_id) override; - - // |ExternalViewEmbedder| - bool SubmitFrame(GrContext* context) override; - - private: - fml::scoped_nsobject layer_; + ExternalViewEmbedder* GetExternalViewEmbedder() override; FML_DISALLOW_COPY_AND_ASSIGN(IOSSurfaceMetal); }; diff --git a/shell/platform/darwin/ios/ios_surface_metal.mm b/shell/platform/darwin/ios/ios_surface_metal.mm index 58a5fc328647b..db345b383ef7b 100644 --- a/shell/platform/darwin/ios/ios_surface_metal.mm +++ b/shell/platform/darwin/ios/ios_surface_metal.mm @@ -3,110 +3,59 @@ // found in the LICENSE file. #include "flutter/shell/platform/darwin/ios/ios_surface_metal.h" + #include "flutter/shell/gpu/gpu_surface_metal.h" +#include "flutter/shell/platform/darwin/ios/ios_context_metal.h" namespace flutter { +static IOSContextMetal* CastToMetalContext(const std::shared_ptr& context) { + return reinterpret_cast(context.get()); +} + IOSSurfaceMetal::IOSSurfaceMetal(fml::scoped_nsobject layer, + std::shared_ptr context, FlutterPlatformViewsController* platform_views_controller) - : IOSSurface(platform_views_controller), layer_(std::move(layer)) {} + : IOSSurface(std::move(context), platform_views_controller), layer_(std::move(layer)) { + if (!layer_) { + return; + } -IOSSurfaceMetal::IOSSurfaceMetal(fml::scoped_nsobject layer) - : IOSSurface(nullptr), layer_(std::move(layer)) {} + auto metal_context = CastToMetalContext(GetContext()); -IOSSurfaceMetal::~IOSSurfaceMetal() = default; + layer_.get().device = metal_context->GetDevice().get(); + layer_.get().presentsWithTransaction = YES; -// |IOSSurface| -bool IOSSurfaceMetal::IsValid() const { - return layer_; + is_valid_ = true; } // |IOSSurface| -bool IOSSurfaceMetal::ResourceContextMakeCurrent() { - return false; -} - -// |IOSSurface| -void IOSSurfaceMetal::UpdateStorageSizeIfNecessary() {} +IOSSurfaceMetal::~IOSSurfaceMetal() = default; // |IOSSurface| -std::unique_ptr IOSSurfaceMetal::CreateGPUSurface(GrContext* gr_context) { - if (gr_context) { - return std::make_unique(this, sk_ref_sp(gr_context), layer_); - } - return std::make_unique(this, layer_); -} - -// |ExternalViewEmbedder| -SkCanvas* IOSSurfaceMetal::GetRootCanvas() { - // On iOS, the root surface is created from the on-screen render target. Only the surfaces for the - // various overlays are controlled by this class. - return nullptr; -} - -flutter::ExternalViewEmbedder* IOSSurfaceMetal::GetExternalViewEmbedder() { - if (IsIosEmbeddedViewsPreviewEnabled()) { - return this; - } else { - return nullptr; - } -} - -void IOSSurfaceMetal::CancelFrame() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->CancelFrame(); - // Committing the current transaction as |BeginFrame| will create a nested - // CATransaction otherwise. - [CATransaction commit]; -} - -void IOSSurfaceMetal::BeginFrame(SkISize frame_size, - GrContext* context, - double device_pixel_ratio) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->SetFrameSize(frame_size); - [CATransaction begin]; -} - -void IOSSurfaceMetal::PrerollCompositeEmbeddedView( - int view_id, - std::unique_ptr params) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->PrerollCompositeEmbeddedView(view_id, std::move(params)); +bool IOSSurfaceMetal::IsValid() const { + return is_valid_; } -// |ExternalViewEmbedder| -PostPrerollResult IOSSurfaceMetal::PostPrerollAction( - fml::RefPtr gpu_thread_merger) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->PostPrerollAction(gpu_thread_merger); +// |IOSSurface| +void IOSSurfaceMetal::UpdateStorageSizeIfNecessary() { + // Nothing to do. } -std::vector IOSSurfaceMetal::GetCurrentCanvases() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->GetCurrentCanvases(); -} +// |IOSSurface| +std::unique_ptr IOSSurfaceMetal::CreateGPUSurface(GrContext* /* unused */) { + auto metal_context = CastToMetalContext(GetContext()); -SkCanvas* IOSSurfaceMetal::CompositeEmbeddedView(int view_id) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->CompositeEmbeddedView(view_id); + return std::make_unique(this, // Metal surface delegate + layer_, // layer + metal_context->GetMainContext(), // context + metal_context->GetMainCommandQueue() // command queue + ); } -bool IOSSurfaceMetal::SubmitFrame(GrContext* context) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - if (platform_views_controller == nullptr) { - return true; - } - - bool submitted = platform_views_controller->SubmitFrame(context, nullptr); - [CATransaction commit]; - return submitted; +// |GPUSurfaceDelegate| +ExternalViewEmbedder* IOSSurfaceMetal::GetExternalViewEmbedder() { + return GetExternalViewEmbedderIfEnabled(); } } // namespace flutter diff --git a/shell/platform/darwin/ios/ios_surface_software.h b/shell/platform/darwin/ios/ios_surface_software.h index daac2ffc77231..86e6b6b209785 100644 --- a/shell/platform/darwin/ios/ios_surface_software.h +++ b/shell/platform/darwin/ios/ios_surface_software.h @@ -9,17 +9,17 @@ #include "flutter/fml/macros.h" #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/gpu/gpu_surface_software.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" @class CALayer; namespace flutter { -class IOSSurfaceSoftware final : public IOSSurface, - public GPUSurfaceSoftwareDelegate, - public ExternalViewEmbedder { +class IOSSurfaceSoftware final : public IOSSurface, public GPUSurfaceSoftwareDelegate { public: IOSSurfaceSoftware(fml::scoped_nsobject layer, + std::shared_ptr context, FlutterPlatformViewsController* platform_views_controller); ~IOSSurfaceSoftware() override; @@ -27,9 +27,6 @@ class IOSSurfaceSoftware final : public IOSSurface, // |IOSSurface| bool IsValid() const override; - // |IOSSurface| - bool ResourceContextMakeCurrent() override; - // |IOSSurface| void UpdateStorageSizeIfNecessary() override; @@ -45,28 +42,6 @@ class IOSSurfaceSoftware final : public IOSSurface, // |GPUSurfaceSoftwareDelegate| ExternalViewEmbedder* GetExternalViewEmbedder() override; - // |ExternalViewEmbedder| - SkCanvas* GetRootCanvas() override; - - // |ExternalViewEmbedder| - void CancelFrame() override; - - // |ExternalViewEmbedder| - void BeginFrame(SkISize frame_size, GrContext* context, double device_pixel_ratio) override; - - // |ExternalViewEmbedder| - void PrerollCompositeEmbeddedView(int view_id, - std::unique_ptr params) override; - - // |ExternalViewEmbedder| - std::vector GetCurrentCanvases() override; - - // |ExternalViewEmbedder| - SkCanvas* CompositeEmbeddedView(int view_id) override; - - // |ExternalViewEmbedder| - bool SubmitFrame(GrContext* context) override; - private: fml::scoped_nsobject layer_; sk_sp sk_surface_; diff --git a/shell/platform/darwin/ios/ios_surface_software.mm b/shell/platform/darwin/ios/ios_surface_software.mm index ab5490cf25140..06abe29c661e8 100644 --- a/shell/platform/darwin/ios/ios_surface_software.mm +++ b/shell/platform/darwin/ios/ios_surface_software.mm @@ -16,10 +16,9 @@ namespace flutter { IOSSurfaceSoftware::IOSSurfaceSoftware(fml::scoped_nsobject layer, + std::shared_ptr context, FlutterPlatformViewsController* platform_views_controller) - : IOSSurface(platform_views_controller), layer_(std::move(layer)) { - UpdateStorageSizeIfNecessary(); -} + : IOSSurface(std::move(context), platform_views_controller), layer_(std::move(layer)) {} IOSSurfaceSoftware::~IOSSurfaceSoftware() = default; @@ -27,10 +26,6 @@ return layer_; } -bool IOSSurfaceSoftware::ResourceContextMakeCurrent() { - return false; -} - void IOSSurfaceSoftware::UpdateStorageSizeIfNecessary() { // Nothing to do here. We don't need an external entity to tell us when our // backing store needs to be updated. Instead, we let the frame tell us its @@ -127,66 +122,9 @@ return true; } +// |GPUSurfaceSoftwareDelegate| ExternalViewEmbedder* IOSSurfaceSoftware::GetExternalViewEmbedder() { - if (IsIosEmbeddedViewsPreviewEnabled()) { - return this; - } else { - return nullptr; - } -} - -// |ExternalViewEmbedder| -SkCanvas* IOSSurfaceSoftware::GetRootCanvas() { - // On iOS, the root surface is created using a managed allocation that is submitted to the - // platform. Only the surfaces for the various overlays are controlled by this class. - return nullptr; -} - -// |ExternalViewEmbedder| -void IOSSurfaceSoftware::CancelFrame() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->CancelFrame(); -} - -// |ExternalViewEmbedder| -void IOSSurfaceSoftware::BeginFrame(SkISize frame_size, - GrContext* context, - double device_pixel_ratio) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->SetFrameSize(frame_size); -} - -// |ExternalViewEmbedder| -void IOSSurfaceSoftware::PrerollCompositeEmbeddedView(int view_id, - std::unique_ptr params) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - platform_views_controller->PrerollCompositeEmbeddedView(view_id, std::move(params)); -} - -// |ExternalViewEmbedder| -std::vector IOSSurfaceSoftware::GetCurrentCanvases() { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->GetCurrentCanvases(); -} - -// |ExternalViewEmbedder| -SkCanvas* IOSSurfaceSoftware::CompositeEmbeddedView(int view_id) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - FML_CHECK(platform_views_controller != nullptr); - return platform_views_controller->CompositeEmbeddedView(view_id); -} - -// |ExternalViewEmbedder| -bool IOSSurfaceSoftware::SubmitFrame(GrContext* context) { - FlutterPlatformViewsController* platform_views_controller = GetPlatformViewsController(); - if (platform_views_controller == nullptr) { - return true; - } - return platform_views_controller->SubmitFrame(nullptr, nullptr); + return GetExternalViewEmbedderIfEnabled(); } } // namespace flutter diff --git a/shell/platform/darwin/ios/platform_view_ios.h b/shell/platform/darwin/ios/platform_view_ios.h index 00e9130f70142..4bd76980f8879 100644 --- a/shell/platform/darwin/ios/platform_view_ios.h +++ b/shell/platform/darwin/ios/platform_view_ios.h @@ -17,8 +17,9 @@ #include "flutter/shell/platform/darwin/ios/framework/Source/FlutterView.h" #include "flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge.h" #include "flutter/shell/platform/darwin/ios/framework/Source/platform_message_router.h" -#include "flutter/shell/platform/darwin/ios/ios_gl_context.h" +#include "flutter/shell/platform/darwin/ios/ios_context.h" #include "flutter/shell/platform/darwin/ios/ios_surface.h" +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" @class FlutterViewController; @@ -26,7 +27,9 @@ namespace flutter { class PlatformViewIOS final : public PlatformView { public: - explicit PlatformViewIOS(PlatformView::Delegate& delegate, flutter::TaskRunners task_runners); + explicit PlatformViewIOS(PlatformView::Delegate& delegate, + IOSRenderingAPI rendering_api, + flutter::TaskRunners task_runners); ~PlatformViewIOS() override; @@ -68,7 +71,7 @@ class PlatformViewIOS final : public PlatformView { // used on the GPU thread we need to protect it with a mutex. std::mutex ios_surface_mutex_; std::unique_ptr ios_surface_; - std::shared_ptr gl_context_; + std::shared_ptr ios_context_; PlatformMessageRouter platform_message_router_; std::unique_ptr accessibility_bridge_; fml::scoped_nsprotocol text_input_plugin_; diff --git a/shell/platform/darwin/ios/platform_view_ios.mm b/shell/platform/darwin/ios/platform_view_ios.mm index 3207744c3438d..09d19b4e61699 100644 --- a/shell/platform/darwin/ios/platform_view_ios.mm +++ b/shell/platform/darwin/ios/platform_view_ios.mm @@ -20,12 +20,10 @@ namespace flutter { PlatformViewIOS::PlatformViewIOS(PlatformView::Delegate& delegate, + IOSRenderingAPI rendering_api, flutter::TaskRunners task_runners) - : PlatformView(delegate, std::move(task_runners)) { -#if !TARGET_IPHONE_SIMULATOR - gl_context_ = std::make_shared(); -#endif // !TARGET_IPHONE_SIMULATOR -} + : PlatformView(delegate, std::move(task_runners)), + ios_context_(IOSContext::Create(rendering_api)) {} PlatformViewIOS::~PlatformViewIOS() = default; @@ -76,7 +74,7 @@ void PlatformViewIOS::attachView() { FML_DCHECK(owner_controller_); ios_surface_ = - [static_cast(owner_controller_.get().view) createSurface:gl_context_]; + [static_cast(owner_controller_.get().view) createSurface:ios_context_]; FML_DCHECK(ios_surface_ != nullptr); if (accessibility_bridge_) { @@ -111,16 +109,7 @@ new AccessibilityBridge(static_cast(owner_controller_.get().view), // |PlatformView| sk_sp PlatformViewIOS::CreateResourceContext() const { - FML_DCHECK(task_runners_.GetIOTaskRunner()->RunsTasksOnCurrentThread()); - if (!gl_context_ || !gl_context_->ResourceMakeCurrent()) { - FML_DLOG(INFO) << "Could not make resource context current on IO thread. " - "Async texture uploads will be disabled. On Simulators, " - "this is expected."; - return nullptr; - } - - return ShellIOManager::CreateCompatibleResourceLoadingContext( - GrBackend::kOpenGL_GrBackend, GPUSurfaceGLDelegate::GetDefaultPlatformGLInterface()); + return ios_context_->CreateResourceContext(); } // |PlatformView| diff --git a/shell/platform/darwin/ios/rendering_api_selection.h b/shell/platform/darwin/ios/rendering_api_selection.h new file mode 100644 index 0000000000000..f30a49a091e21 --- /dev/null +++ b/shell/platform/darwin/ios/rendering_api_selection.h @@ -0,0 +1,27 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_ + +#include + +#include "flutter/fml/macros.h" + +namespace flutter { + +enum class IOSRenderingAPI { + kSoftware, + kOpenGLES, + kMetal, +}; + +IOSRenderingAPI GetRenderingAPIForProcess(); + +Class GetCoreAnimationLayerClassForRenderingAPI( + IOSRenderingAPI rendering_api = GetRenderingAPIForProcess()); + +} // namespace flutter + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_ diff --git a/shell/platform/darwin/ios/rendering_api_selection.mm b/shell/platform/darwin/ios/rendering_api_selection.mm new file mode 100644 index 0000000000000..c6ef89c47cc24 --- /dev/null +++ b/shell/platform/darwin/ios/rendering_api_selection.mm @@ -0,0 +1,83 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" + +#include +#include +#include + +#include "flutter/fml/logging.h" + +namespace flutter { + +bool ShouldUseSoftwareRenderer() { + return [[[NSProcessInfo processInfo] arguments] containsObject:@"--force-software"]; +} + +bool ShouldUseMetalRenderer() { + // If there is a command line argument that says Metal should not be used, that takes precedence + // over everything else. This allows disabling Metal on a per run basis to check for regressions + // on an application that has otherwise opted into Metal on an iOS version that supports it. + if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--disable-metal"]) { + return false; + } + + // If the application wants to use metal on a per run basis with disregard for version checks or + // plist based opt ins, respect that opinion. This allows selectively testing features on older + // version of iOS than those explicitly stated as being supported. + if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--force-metal"]) { + return true; + } + + // This is just a version we picked that is easy to support and has all necessary Metal features. + bool ios_version_supports_metal = false; + // TODO(52356): Update this to be the version selected for release. + if (@available(iOS 11.0, *)) { + ios_version_supports_metal = true; + } + + // The application must opt-in by default to use Metal without command line flags. + bool application_opts_into_metal = + [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"io.flutter.metal_preview"] boolValue]; + + return ios_version_supports_metal && application_opts_into_metal; +} + +IOSRenderingAPI GetRenderingAPIForProcess() { +#if TARGET_IPHONE_SIMULATOR + return IOSRenderingAPI::kSoftware; +#endif // TARGET_IPHONE_SIMULATOR + +#if FLUTTER_SHELL_ENABLE_METAL + static bool should_use_software = ShouldUseSoftwareRenderer(); + if (should_use_software) { + return IOSRenderingAPI::kSoftware; + } + static bool should_use_metal = ShouldUseMetalRenderer(); + if (should_use_metal) { + return IOSRenderingAPI::kMetal; + } +#endif // FLUTTER_SHELL_ENABLE_METAL + return IOSRenderingAPI::kOpenGLES; +} + +Class GetCoreAnimationLayerClassForRenderingAPI(IOSRenderingAPI rendering_api) { + switch (rendering_api) { + case IOSRenderingAPI::kSoftware: + return [CALayer class]; + case IOSRenderingAPI::kOpenGLES: + return [CAEAGLLayer class]; +#if !TARGET_IPHONE_SIMULATOR + case IOSRenderingAPI::kMetal: + return [CAMetalLayer class]; +#endif // !TARGET_IPHONE_SIMULATOR + default: + break; + } + FML_CHECK(false) << "Unknown client rendering API"; + return [CALayer class]; +} + +} // namespace flutter From 7c2d975b5556c0739f98448c994f05d53e6e9c41 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 16:31:06 -0700 Subject: [PATCH 08/58] Gather demangled stack traces and report the same to console on crashes. (#16450) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These should only be used on host binaries for more detailed crash reports. Installing the handler on targets (iOS/Android) may cause use to break existing crash reporting mechanisms users may have installed themselves in the process. This should work on Darwin & Linux for now. Doing something like int* a = nullptr; *a = 12; or abort or tripping an assertion should print something the following before program termination. We can tweak the report further if necessary. ``` [ERROR:flutter/fml/backtrace.cc(110)] Caught signal SIGSEGV during program execution. Frame 0: 0x10658342c void testing::internal::HandleSehExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const*) Frame 1: 0x106555070 void testing::internal::HandleExceptionsInMethodIfSupported(testing::Test*, void (testing::Test::*)(), char const*) Frame 2: 0x106554f81 testing::Test::Run() Frame 3: 0x106555dc3 testing::TestInfo::Run() Frame 4: 0x1065570a1 testing::TestSuite::Run() Frame 5: 0x106562a55 testing::internal::UnitTestImpl::RunAllTests() Frame 6: 0x10658c22c bool testing::internal::HandleSehExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) Frame 7: 0x1065625c3 bool testing::internal::HandleExceptionsInMethodIfSupported(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) Frame 8: 0x106562445 testing::UnitTest::Run() Frame 9: 0x105c8dc33 RUN_ALL_TESTS() Frame 10: 0x105c8dbe6 main Frame 11: 0x7fff7c2dc3d5 start ``` Known issue: This routines that generate the stack trace are not signal safe. But since we only use the same before the process is terminating, this ought to be fine. I’ll work in a separate patch to convert all the internals to be signal safe. In the meantime, this will help us better identify the causes of flakes on our bots. Fixes https://github.com/flutter/flutter/issues/50244 --- benchmarking/benchmarking.cc | 2 + ci/licenses_golden/licenses_flutter | 4 + fml/BUILD.gn | 8 ++ fml/backtrace.cc | 136 ++++++++++++++++++++++++++++ fml/backtrace.h | 22 +++++ fml/backtrace_stub.cc | 23 +++++ fml/backtrace_unittests.cc | 37 ++++++++ testing/run_all_unittests.cc | 2 + 8 files changed, 234 insertions(+) create mode 100644 fml/backtrace.cc create mode 100644 fml/backtrace.h create mode 100644 fml/backtrace_stub.cc create mode 100644 fml/backtrace_unittests.cc diff --git a/benchmarking/benchmarking.cc b/benchmarking/benchmarking.cc index c8e5af7ea3dd5..97b7f868e335a 100644 --- a/benchmarking/benchmarking.cc +++ b/benchmarking/benchmarking.cc @@ -4,11 +4,13 @@ #include "benchmarking.h" +#include "flutter/fml/backtrace.h" #include "flutter/fml/icu_util.h" namespace benchmarking { int Main(int argc, char** argv) { + fml::InstallCrashHandler(); benchmark::Initialize(&argc, argv); fml::icu::InitializeICU("icudtl.dat"); ::benchmark::RunSpecifiedBenchmarks(); diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 2f6c5c31fccef..ef7478a6914a0 100644 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -107,6 +107,10 @@ FILE: ../../../flutter/flow/view_holder.cc FILE: ../../../flutter/flow/view_holder.h FILE: ../../../flutter/flutter_frontend_server/bin/starter.dart FILE: ../../../flutter/flutter_frontend_server/lib/server.dart +FILE: ../../../flutter/fml/backtrace.cc +FILE: ../../../flutter/fml/backtrace.h +FILE: ../../../flutter/fml/backtrace_stub.cc +FILE: ../../../flutter/fml/backtrace_unittests.cc FILE: ../../../flutter/fml/base32.cc FILE: ../../../flutter/fml/base32.h FILE: ../../../flutter/fml/base32_unittest.cc diff --git a/fml/BUILD.gn b/fml/BUILD.gn index d8c7a95d682ef..356b8e2baa79d 100644 --- a/fml/BUILD.gn +++ b/fml/BUILD.gn @@ -10,6 +10,7 @@ import("//flutter/testing/testing.gni") source_set("fml") { sources = [ + "backtrace.h", "base32.cc", "base32.h", "build_config.h", @@ -86,6 +87,12 @@ source_set("fml") { "wakeable.h", ] + if (is_mac || is_ios || is_linux) { + sources += [ "backtrace.cc" ] + } else { + sources += [ "backtrace_stub.cc" ] + } + public_deps = [] deps = [ @@ -229,6 +236,7 @@ executable("fml_unittests") { testonly = true sources = [ + "backtrace_unittests.cc", "base32_unittest.cc", "command_line_unittest.cc", "file_unittest.cc", diff --git a/fml/backtrace.cc b/fml/backtrace.cc new file mode 100644 index 0000000000000..66dd0d5e01584 --- /dev/null +++ b/fml/backtrace.cc @@ -0,0 +1,136 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/fml/backtrace.h" + +#include +#include + +#include +#include +#include + +#include "flutter/fml/logging.h" + +namespace fml { + +static std::string kKUnknownFrameName = "Unknown"; + +static std::string DemangleSymbolName(const std::string& mangled) { + if (mangled == kKUnknownFrameName) { + return kKUnknownFrameName; + } + + int status = 0; + size_t length = 0; + char* demangled = __cxxabiv1::__cxa_demangle( + mangled.data(), // mangled name + nullptr, // output buffer (malloc-ed if nullptr) + &length, // demangled length + &status); + + if (demangled == nullptr || status != 0) { + return mangled; + } + + auto demangled_string = std::string{demangled, length}; + free(demangled); + return demangled_string; +} + +static std::string GetSymbolName(void* symbol) { + Dl_info info = {}; + + if (::dladdr(symbol, &info) == 0) { + return kKUnknownFrameName; + } + + return DemangleSymbolName({info.dli_sname}); +} + +std::string BacktraceHere(size_t offset) { + constexpr size_t kMaxFrames = 256; + void* symbols[kMaxFrames]; + const auto available_frames = ::backtrace(symbols, kMaxFrames); + if (available_frames <= 0) { + return ""; + } + + std::stringstream stream; + for (int i = 1 + offset; i < available_frames; ++i) { + stream << "Frame " << i - 1 - offset << ": " << symbols[i] << " " + << GetSymbolName(symbols[i]) << std::endl; + } + return stream.str(); +} + +static size_t kKnownSignalHandlers[] = { + SIGABRT, // abort program + SIGFPE, // floating-point exception + SIGBUS, // bus error + SIGSEGV, // segmentation violation + SIGSYS, // non-existent system call invoked + SIGPIPE, // write on a pipe with no reader + SIGALRM, // real-time timer expired + SIGTERM, // software termination signal +}; + +static std::string SignalNameToString(int signal) { + switch (signal) { + case SIGABRT: + return "SIGABRT"; + case SIGFPE: + return "SIGFPE"; + case SIGBUS: + return "SIGBUS"; + case SIGSEGV: + return "SIGSEGV"; + case SIGSYS: + return "SIGSYS"; + case SIGPIPE: + return "SIGPIPE"; + case SIGALRM: + return "SIGALRM"; + case SIGTERM: + return "SIGTERM"; + }; + return std::to_string(signal); +} + +static void ToggleSignalHandlers(bool set); + +static void SignalHandler(int signal) { + // We are a crash signal handler. This can only happen once. Since we don't + // want to catch crashes while we are generating the crash reports, disable + // all set signal handlers to their default values before reporting the crash + // and re-raising the signal. + ToggleSignalHandlers(false); + + FML_LOG(ERROR) << "Caught signal " << SignalNameToString(signal) + << " during program execution." << std::endl + << BacktraceHere(3); + + ::raise(signal); +} + +static void ToggleSignalHandlers(bool set) { + for (size_t i = 0; i < sizeof(kKnownSignalHandlers) / sizeof(size_t); ++i) { + auto signal_name = kKnownSignalHandlers[i]; + auto handler = set ? &SignalHandler : SIG_DFL; + + if (::signal(signal_name, handler) == SIG_ERR) { + FML_LOG(ERROR) << "Could not attach signal handler for " << signal_name; + } + } +} + +void InstallCrashHandler() { + ToggleSignalHandlers(true); +} + +bool IsCrashHandlingSupported() { + return true; +} + +} // namespace fml diff --git a/fml/backtrace.h b/fml/backtrace.h new file mode 100644 index 0000000000000..18f17933b355b --- /dev/null +++ b/fml/backtrace.h @@ -0,0 +1,22 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef FLUTTER_FML_BACKTRACE_H_ +#define FLUTTER_FML_BACKTRACE_H_ + +#include + +#include "flutter/fml/macros.h" + +namespace fml { + +std::string BacktraceHere(size_t offset = 0); + +void InstallCrashHandler(); + +bool IsCrashHandlingSupported(); + +} // namespace fml + +#endif // FLUTTER_FML_BACKTRACE_H_ diff --git a/fml/backtrace_stub.cc b/fml/backtrace_stub.cc new file mode 100644 index 0000000000000..2328ec45aa2a9 --- /dev/null +++ b/fml/backtrace_stub.cc @@ -0,0 +1,23 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "flutter/fml/backtrace.h" + +namespace fml { + +static std::string kKUnknownFrameName = "Unknown"; + +std::string BacktraceHere(size_t offset) { + return ""; +} + +void InstallCrashHandler() { + // Not supported. +} + +bool IsCrashHandlingSupported() { + return false; +} + +} // namespace fml diff --git a/fml/backtrace_unittests.cc b/fml/backtrace_unittests.cc new file mode 100644 index 0000000000000..574fced91c662 --- /dev/null +++ b/fml/backtrace_unittests.cc @@ -0,0 +1,37 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "backtrace.h" +#include "gtest/gtest.h" +#include "logging.h" + +namespace fml { +namespace testing { + +TEST(BacktraceTest, CanGatherBacktrace) { + if (!IsCrashHandlingSupported()) { + GTEST_SKIP(); + return; + } + { + auto trace = BacktraceHere(0); + ASSERT_GT(trace.size(), 0u); + ASSERT_NE(trace.find("Frame 0"), std::string::npos); + } + + { + auto trace = BacktraceHere(1); + ASSERT_GT(trace.size(), 0u); + ASSERT_NE(trace.find("Frame 0"), std::string::npos); + } + + { + auto trace = BacktraceHere(2); + ASSERT_GT(trace.size(), 0u); + ASSERT_NE(trace.find("Frame 0"), std::string::npos); + } +} + +} // namespace testing +} // namespace fml diff --git a/testing/run_all_unittests.cc b/testing/run_all_unittests.cc index 8e579246eb639..eb1ae28256bc3 100644 --- a/testing/run_all_unittests.cc +++ b/testing/run_all_unittests.cc @@ -6,6 +6,7 @@ #include #include +#include "flutter/fml/backtrace.h" #include "flutter/fml/build_config.h" #include "flutter/fml/command_line.h" #include "flutter/testing/debugger_detection.h" @@ -35,6 +36,7 @@ std::optional GetTestTimeoutFromArgs(int argc, char** argv) { } int main(int argc, char** argv) { + fml::InstallCrashHandler(); #ifdef OS_IOS asl_log_descriptor(NULL, NULL, ASL_LEVEL_NOTICE, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); From a0010512df4c192a1a4541ca5103b0718b932f81 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 18:48:23 -0700 Subject: [PATCH 09/58] Disable Embedder11yTest::A11yTreeIsConsistent to unblock LUCI. (#17081) See https://github.com/flutter/flutter/issues/52372 --- shell/platform/embedder/tests/embedder_a11y_unittests.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/platform/embedder/tests/embedder_a11y_unittests.cc b/shell/platform/embedder/tests/embedder_a11y_unittests.cc index e00cd4b5ea70b..0f27ea7ac64d0 100644 --- a/shell/platform/embedder/tests/embedder_a11y_unittests.cc +++ b/shell/platform/embedder/tests/embedder_a11y_unittests.cc @@ -21,7 +21,8 @@ namespace testing { using Embedder11yTest = testing::EmbedderTest; -TEST_F(Embedder11yTest, A11yTreeIsConsistent) { +// TODO(52372): De-flake and re-enable. +TEST_F(Embedder11yTest, DISABLED_A11yTreeIsConsistent) { auto& context = GetEmbedderContext(); fml::AutoResetWaitableEvent latch; From 0e8a2f33a83ce59772d3c4c54541754b14e493d4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Mar 2020 22:26:02 -0400 Subject: [PATCH 10/58] Roll src/third_party/skia d3f67dbf9f36..bf355123ae3b (9 commits) (#17079) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 934af220aa663..b35eb0f8f75a4 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'd3f67dbf9f36471a30c144022d9f788701de9bd8', + 'skia_revision': 'bf355123ae3b5015db46130ce0c6635428c15b02', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 48f98cc122fd7..4b109417a0a9b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1f7d1b2013ba1cac9a0046909cbe8969 +Signature: fa5f1c44b7a7aec7c3ed020bed4b476b UNUSED LICENSES: From e8e0e0b51b47017c950cdc2465ef92e66194c7a7 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 19:31:02 -0700 Subject: [PATCH 11/58] Add support for the Metal backend on all iOS builds. (#17080) --- tools/gn | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/gn b/tools/gn index b7cb71763da95..c921aba8b3fb3 100755 --- a/tools/gn +++ b/tools/gn @@ -44,9 +44,6 @@ def get_out_dir(args): if args.enable_vulkan: target_dir.append('vulkan') - if args.enable_metal and args.target_os == 'ios': - target_dir.append('metal') - return os.path.join(args.out_dir, 'out', '_'.join(target_dir)) def to_command_line(gn_args): @@ -219,17 +216,18 @@ def to_gn_args(args): gn_args['use_goma'] = False gn_args['goma_dir'] = None - if args.enable_metal: - gn_args['skia_use_metal'] = True - gn_args['shell_enable_metal'] = True - gn_args['allow_deprecated_api_calls'] = True - if args.enable_vulkan: # Enable vulkan in the Flutter shell. gn_args['shell_enable_vulkan'] = True # Configure Skia for Vulkan support. gn_args['skia_use_vulkan'] = True + # Enable Metal on non-simulator iOS builds. + if args.target_os == 'ios': + gn_args['skia_use_metal'] = not args.simulator + gn_args['shell_enable_metal'] = not args.simulator + gn_args['allow_deprecated_api_calls'] = not args.simulator + # The buildroot currently isn't set up to support Vulkan in the # Windows ANGLE build, so disable it regardless of enable_vulkan's value. if sys.platform.startswith(('cygwin', 'win')): From c6aa4d26e7194dddb424e6e655762917aef8e4aa Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Tue, 10 Mar 2020 23:41:03 -0400 Subject: [PATCH 12/58] Roll src/third_party/dart ace1d9b9213a..4093d08271f6 (12 commits) (#17082) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b35eb0f8f75a4..62ecf032fa165 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': 'ace1d9b9213a119474e95d93dbc5fabfe1b1affa', + 'dart_revision': '4093d08271f6838974a28d718b1efb7d81b673ef', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 5c056131edde0..64dcf2ebea772 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: d9b2961d0b78a2c057b042fa47abc1f5 +Signature: ea5605ea858125f266c9dc26964a6d80 UNUSED LICENSES: From ec2c624f952d21c1b47ff6ba29456d59c4413c72 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 23:32:18 -0700 Subject: [PATCH 13/58] Revert "Add support for the Metal backend on all iOS builds. (#17080)" (#17088) This reverts commit e8e0e0b51b47017c950cdc2465ef92e66194c7a7. --- tools/gn | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/gn b/tools/gn index c921aba8b3fb3..b7cb71763da95 100755 --- a/tools/gn +++ b/tools/gn @@ -44,6 +44,9 @@ def get_out_dir(args): if args.enable_vulkan: target_dir.append('vulkan') + if args.enable_metal and args.target_os == 'ios': + target_dir.append('metal') + return os.path.join(args.out_dir, 'out', '_'.join(target_dir)) def to_command_line(gn_args): @@ -216,18 +219,17 @@ def to_gn_args(args): gn_args['use_goma'] = False gn_args['goma_dir'] = None + if args.enable_metal: + gn_args['skia_use_metal'] = True + gn_args['shell_enable_metal'] = True + gn_args['allow_deprecated_api_calls'] = True + if args.enable_vulkan: # Enable vulkan in the Flutter shell. gn_args['shell_enable_vulkan'] = True # Configure Skia for Vulkan support. gn_args['skia_use_vulkan'] = True - # Enable Metal on non-simulator iOS builds. - if args.target_os == 'ios': - gn_args['skia_use_metal'] = not args.simulator - gn_args['shell_enable_metal'] = not args.simulator - gn_args['allow_deprecated_api_calls'] = not args.simulator - # The buildroot currently isn't set up to support Vulkan in the # Windows ANGLE build, so disable it regardless of enable_vulkan's value. if sys.platform.startswith(('cygwin', 'win')): From 3f287ab58e495c52125ac663153196990d0bd4b5 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 11 Mar 2020 00:46:02 -0700 Subject: [PATCH 14/58] Remove the unused method on iOS surface to make the resource context current. (#17084) --- shell/platform/darwin/ios/ios_surface.h | 2 -- shell/platform/darwin/ios/ios_surface.mm | 4 ---- 2 files changed, 6 deletions(-) diff --git a/shell/platform/darwin/ios/ios_surface.h b/shell/platform/darwin/ios/ios_surface.h index 43049d6c367b8..58233d8a2f656 100644 --- a/shell/platform/darwin/ios/ios_surface.h +++ b/shell/platform/darwin/ios/ios_surface.h @@ -36,8 +36,6 @@ class IOSSurface : public ExternalViewEmbedder { ExternalViewEmbedder* GetExternalViewEmbedderIfEnabled(); - bool ResourceContextMakeCurrent(); - virtual bool IsValid() const = 0; virtual void UpdateStorageSizeIfNecessary() = 0; diff --git a/shell/platform/darwin/ios/ios_surface.mm b/shell/platform/darwin/ios/ios_surface.mm index d0a931f7b1f46..fe85c77f12c2d 100644 --- a/shell/platform/darwin/ios/ios_surface.mm +++ b/shell/platform/darwin/ios/ios_surface.mm @@ -64,10 +64,6 @@ bool IsIosEmbeddedViewsPreviewEnabled() { IOSSurface::~IOSSurface() = default; -bool IOSSurface::ResourceContextMakeCurrent() { - return GetContext()->ResourceMakeCurrent(); -} - std::shared_ptr IOSSurface::GetContext() const { return ios_context_; } From 11b2f787f18f65f3fbcbd98c18b99f8d2d2b25e2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 03:51:01 -0400 Subject: [PATCH 15/58] Roll fuchsia/sdk/core/linux-amd64 from v32mJ... to X3Xm2... (#17086) --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++++-------------- 3 files changed, 126 insertions(+), 122 deletions(-) diff --git a/DEPS b/DEPS index 62ecf032fa165..3522ec14c5b51 100644 --- a/DEPS +++ b/DEPS @@ -556,7 +556,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'v32mJWB9n4UYKqJoJTd6ASYrptBC8r25yRRBlumR3KAC' + 'version': 'X3Xm2czRkurpHi7WzysWlVYZlpywgV1tBK_yw1qfpNUC' } ], 'condition': 'host_os == "linux"', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 300fac48203d0..634753e47532b 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 2028a4b04bc2471461bd711e9e9b83ce +Signature: 826a383a3420287bfd23366f29545798 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17d812e9a5e1f..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,66 +5142,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5233,66 +5173,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5689,6 +5569,130 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 2572eff9a6f32d5be0cf4fc88d2d7d80aff47d83 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 03:51:04 -0400 Subject: [PATCH 16/58] Roll src/third_party/skia bf355123ae3b..0340292972b9 (9 commits) (#17089) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DEPS b/DEPS index 3522ec14c5b51..72da3a45b81a5 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bf355123ae3b5015db46130ce0c6635428c15b02', + 'skia_revision': '0340292972b9719ac8eec5ddccff2805b9045d42', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 4b109417a0a9b..57f57970ce043 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: fa5f1c44b7a7aec7c3ed020bed4b476b +Signature: febcf996f3ac20d7902940b6212b454e UNUSED LICENSES: @@ -2441,6 +2441,7 @@ FILE: ../../../third_party/skia/src/gpu/GrDrawingManager.cpp FILE: ../../../third_party/skia/src/gpu/GrDrawingManager.h FILE: ../../../third_party/skia/src/gpu/GrFragmentProcessor.cpp FILE: ../../../third_party/skia/src/gpu/GrGpuResourcePriv.h +FILE: ../../../third_party/skia/src/gpu/GrManagedResource.h FILE: ../../../third_party/skia/src/gpu/GrMesh.h FILE: ../../../third_party/skia/src/gpu/GrNonAtomicRef.h FILE: ../../../third_party/skia/src/gpu/GrOpFlushState.cpp @@ -2540,7 +2541,6 @@ FILE: ../../../third_party/skia/src/gpu/vk/GrVkRenderPass.cpp FILE: ../../../third_party/skia/src/gpu/vk/GrVkRenderPass.h FILE: ../../../third_party/skia/src/gpu/vk/GrVkRenderTarget.cpp FILE: ../../../third_party/skia/src/gpu/vk/GrVkRenderTarget.h -FILE: ../../../third_party/skia/src/gpu/vk/GrVkResource.h FILE: ../../../third_party/skia/src/gpu/vk/GrVkStencilAttachment.cpp FILE: ../../../third_party/skia/src/gpu/vk/GrVkStencilAttachment.h FILE: ../../../third_party/skia/src/gpu/vk/GrVkTexture.cpp @@ -3905,6 +3905,7 @@ FILE: ../../../third_party/skia/include/gpu/d3d/GrD3DBackendContext.h FILE: ../../../third_party/skia/include/private/SkIDChangeListener.h FILE: ../../../third_party/skia/src/core/SkIDChangeListener.cpp FILE: ../../../third_party/skia/src/core/SkVM_fwd.h +FILE: ../../../third_party/skia/src/gpu/GrManagedResource.cpp FILE: ../../../third_party/skia/src/gpu/d3d/GrD3DCaps.cpp FILE: ../../../third_party/skia/src/gpu/d3d/GrD3DCaps.h FILE: ../../../third_party/skia/src/gpu/d3d/GrD3DGpu.cpp From 498e1ec3cc037e3f80acaf305a0e2e45165d38c9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 03:56:02 -0400 Subject: [PATCH 17/58] Roll fuchsia/sdk/core/mac-amd64 from r_oCI... to 0Z8VF... (#17087) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 72da3a45b81a5..10c261df1f731 100644 --- a/DEPS +++ b/DEPS @@ -536,7 +536,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'r_oCIi4f4p_CI6qo9yAgBEsa85ebjaJshJI_bW3aEjQC' + 'version': '0Z8VFYja5HLTJXVItjqbtphdvf-wX_b9d-OeSTjLmrQC' } ], 'condition': 'host_os == "mac"', From 6d8611d0bd93c234bfd7e17ec2f5cba1630c0181 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 04:31:01 -0400 Subject: [PATCH 18/58] Roll src/third_party/dart 4093d08271f6..37530145ff53 (4 commits) (#17090) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 10c261df1f731..b880556676861 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '4093d08271f6838974a28d718b1efb7d81b673ef', + 'dart_revision': '37530145ff534e5909293e8565247559ff2f6a93', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 64dcf2ebea772..645ad28c5aa49 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: ea5605ea858125f266c9dc26964a6d80 +Signature: db08ba31aa78467c18b499a9ca636c67 UNUSED LICENSES: From c1111bba84173fc038669ce60e35666af12fc005 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 12:16:03 -0400 Subject: [PATCH 19/58] Roll src/third_party/skia 0340292972b9..6dc0f63a509c (4 commits) (#17095) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index b880556676861..9146d44d98a90 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0340292972b9719ac8eec5ddccff2805b9045d42', + 'skia_revision': '6dc0f63a509cc111cbda2a419cc835bd65272bb0', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 57f57970ce043..3e3c81a35ebff 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: febcf996f3ac20d7902940b6212b454e +Signature: 5b6ee2b86e42679c7b0e18a91feddf27 UNUSED LICENSES: @@ -397,7 +397,6 @@ ORIGIN: ../../../third_party/skia/bench/AndroidCodecBench.cpp + ../../../third_p TYPE: LicenseType.bsd FILE: ../../../third_party/skia/bench/AndroidCodecBench.cpp FILE: ../../../third_party/skia/bench/AndroidCodecBench.h -FILE: ../../../third_party/skia/bench/DrawLatticeBench.cpp FILE: ../../../third_party/skia/bench/EncodeBench.cpp FILE: ../../../third_party/skia/bench/GrMipMapBench.cpp FILE: ../../../third_party/skia/bench/HardStopGradientBench_ScaleNumColors.cpp @@ -4088,8 +4087,6 @@ FILE: ../../../third_party/skia/docs/examples/Canvas_drawAtlas_2.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawAtlas_3.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawAtlas_4.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmap.cpp -FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmapLattice.cpp -FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmapNine.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmapRect.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmapRect_2.cpp FILE: ../../../third_party/skia/docs/examples/Canvas_drawBitmapRect_3.cpp From f2843b97baa4849f52fecbf9310b89322a413742 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 13:26:04 -0400 Subject: [PATCH 20/58] Roll src/third_party/dart 37530145ff53..684c53a6f174 (16 commits) (#17096) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 5 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 125 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index 9146d44d98a90..822f1dd078584 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '37530145ff534e5909293e8565247559ff2f6a93', + 'dart_revision': '684c53a6f174bcefd4e8202391a1a761abccead8', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 645ad28c5aa49..32f323dba6284 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: db08ba31aa78467c18b499a9ca636c67 +Signature: 1dc1482fb66414d239105f52ecd04a49 UNUSED LICENSES: @@ -7769,6 +7769,9 @@ FILE: ../../../third_party/dart/runtime/vm/compiler/ffi/native_type.cc FILE: ../../../third_party/dart/runtime/vm/compiler/ffi/native_type.h FILE: ../../../third_party/dart/runtime/vm/compiler/ffi/recognized_method.cc FILE: ../../../third_party/dart/runtime/vm/compiler/ffi/recognized_method.h +FILE: ../../../third_party/dart/runtime/vm/compiler/write_barrier_elimination.cc +FILE: ../../../third_party/dart/runtime/vm/compiler/write_barrier_elimination.h +FILE: ../../../third_party/dart/runtime/vm/compiler/write_barrier_elimination_test.cc FILE: ../../../third_party/dart/runtime/vm/constants_base.h FILE: ../../../third_party/dart/runtime/vm/dispatch_table.cc FILE: ../../../third_party/dart/runtime/vm/dispatch_table.h diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 9a3016fbed9adfd689cb39f577f5b7b1e4b4bdf0 Mon Sep 17 00:00:00 2001 From: Nurhan Turgut Date: Wed, 11 Mar 2020 12:15:47 -0700 Subject: [PATCH 21/58] increasing user limits for macos (#17097) --- lib/web_ui/dev/felt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web_ui/dev/felt b/lib/web_ui/dev/felt index 89365e463965f..07a71f37e8211 100755 --- a/lib/web_ui/dev/felt +++ b/lib/web_ui/dev/felt @@ -57,8 +57,8 @@ KERNEL_NAME=`uname` if [[ $KERNEL_NAME == *"Darwin"* ]] then echo "Running on MacOS. Increase the user limits" - ulimit -n 10000 - ulimit -u 2048 + ulimit -n 50000 + ulimit -u 4096 fi if [[ "$FELT_USE_SNAPSHOT" == "false" || "$FELT_USE_SNAPSHOT" == "0" ]]; then From 8c8b3e1d42bc2bc2b846ccbfd6789cdc76d6b908 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 16:06:02 -0400 Subject: [PATCH 22/58] Roll src/third_party/skia 6dc0f63a509c..dafbf121a8b1 (1 commits) (#17098) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++++++--------------- 3 files changed, 126 insertions(+), 122 deletions(-) diff --git a/DEPS b/DEPS index 822f1dd078584..b74f673e436d2 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '6dc0f63a509cc111cbda2a419cc835bd65272bb0', + 'skia_revision': 'dafbf121a8b185b9a68f363badd21e44e52275ef', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 3e3c81a35ebff..e0f7c3e0fb97b 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 5b6ee2b86e42679c7b0e18a91feddf27 +Signature: b0442b101ed659aa3f067c23c86fd1c6 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17d812e9a5e1f..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,66 +5142,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5233,66 +5173,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5689,6 +5569,130 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From a37560a07447befc74e5c418f00cac0cad4e1404 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 11 Mar 2020 13:36:01 -0700 Subject: [PATCH 23/58] Use the standard [[nodiscard]] attribute instead of an FML macro. (#17100) --- assets/asset_resolver.h | 3 +- flow/layers/layer.h | 11 ++++--- flow/scene_update_context.h | 5 ++-- fml/compiler_specific.h | 10 ------- fml/message.h | 24 +++++++-------- fml/platform/darwin/scoped_block.h | 2 +- fml/platform/darwin/scoped_nsobject.h | 2 +- fml/synchronization/semaphore.h | 3 +- fml/unique_object.h | 2 +- runtime/dart_isolate.cc | 32 +++++++++----------- runtime/dart_isolate.h | 42 +++++++++++---------------- runtime/dart_service_isolate.h | 3 +- runtime/dart_vm_lifecycle.h | 8 ++--- runtime/service_protocol.cc | 3 +- runtime/service_protocol.h | 35 ++++++++++------------ shell/common/engine.h | 6 ++-- shell/common/pipeline.h | 3 +- testing/dart_isolate_runner.cc | 4 +-- testing/dart_isolate_runner.h | 3 +- vulkan/vulkan_backbuffer.h | 6 ++-- vulkan/vulkan_command_buffer.h | 9 ++---- vulkan/vulkan_device.h | 40 ++++++++++++------------- vulkan/vulkan_image.h | 12 ++++---- vulkan/vulkan_swapchain.h | 3 +- vulkan/vulkan_window.h | 3 +- 25 files changed, 112 insertions(+), 162 deletions(-) diff --git a/assets/asset_resolver.h b/assets/asset_resolver.h index cbfadd2ada455..b6cdb88b84ac0 100644 --- a/assets/asset_resolver.h +++ b/assets/asset_resolver.h @@ -21,8 +21,7 @@ class AssetResolver { virtual bool IsValid() const = 0; - FML_WARN_UNUSED_RESULT - virtual std::unique_ptr GetAsMapping( + [[nodiscard]] virtual std::unique_ptr GetAsMapping( const std::string& asset_name) const = 0; private: diff --git a/flow/layers/layer.h b/flow/layers/layer.h index 63c7cdb316d7e..50e2b0f7e68cf 100644 --- a/flow/layers/layer.h +++ b/flow/layers/layer.h @@ -84,7 +84,7 @@ class Layer { // destruction. class AutoPrerollSaveLayerState { public: - FML_WARN_UNUSED_RESULT static AutoPrerollSaveLayerState Create( + [[nodiscard]] static AutoPrerollSaveLayerState Create( PrerollContext* preroll_context, bool save_layer_is_active = true, bool layer_itself_performs_readback = false); @@ -133,12 +133,11 @@ class Layer { // draws a checkerboard over the layer if that is enabled in the PaintContext. class AutoSaveLayer { public: - FML_WARN_UNUSED_RESULT static AutoSaveLayer Create( - const PaintContext& paint_context, - const SkRect& bounds, - const SkPaint* paint); + [[nodiscard]] static AutoSaveLayer Create(const PaintContext& paint_context, + const SkRect& bounds, + const SkPaint* paint); - FML_WARN_UNUSED_RESULT static AutoSaveLayer Create( + [[nodiscard]] static AutoSaveLayer Create( const PaintContext& paint_context, const SkCanvas::SaveLayerRec& layer_rec); diff --git a/flow/scene_update_context.h b/flow/scene_update_context.h index 31bcb1bd57253..77b0925cc6503 100644 --- a/flow/scene_update_context.h +++ b/flow/scene_update_context.h @@ -162,9 +162,8 @@ class SceneUpdateContext { // CPU wait. Once Vulkan semaphores are available, this method must return // void and the implementation must submit surfaces on its own as soon as the // specific canvas operations are done. - FML_WARN_UNUSED_RESULT - std::vector> ExecutePaintTasks( - CompositorContext::ScopedFrame& frame); + [[nodiscard]] std::vector> + ExecutePaintTasks(CompositorContext::ScopedFrame& frame); float ScaleX() const { return metrics_->scale_x * top_scale_x_; } float ScaleY() const { return metrics_->scale_y * top_scale_y_; } diff --git a/fml/compiler_specific.h b/fml/compiler_specific.h index ac367f2e70213..fd7410934cf06 100644 --- a/fml/compiler_specific.h +++ b/fml/compiler_specific.h @@ -54,16 +54,6 @@ #define FML_ALIGNOF(type) __alignof(type) #endif -// Annotate a function indicating the caller must examine the return value. -// Use like: -// int foo() FML_WARN_UNUSED_RESULT; -// To explicitly ignore a result, see |ignore_result()| in base/macros.h. -#if defined(__GNUC__) || defined(__clang__) -#define FML_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -#define FML_WARN_UNUSED_RESULT -#endif - // Tell the compiler a function is using a printf-style format string. // |format_param| is the one-based index of the format string parameter; // |dots_param| is the one-based index of the "..." parameter. diff --git a/fml/message.h b/fml/message.h index f9d6bf804ed85..4b3b725d4c6e9 100644 --- a/fml/message.h +++ b/fml/message.h @@ -87,7 +87,7 @@ class Message { template ::value>> - FML_WARN_UNUSED_RESULT bool Encode(const T& value) { + [[nodiscard]] bool Encode(const T& value) { if (auto* buffer = PrepareEncode(sizeof(T))) { ::memcpy(buffer, &value, sizeof(T)); return true; @@ -95,7 +95,7 @@ class Message { return false; } - FML_WARN_UNUSED_RESULT bool Encode(const MessageSerializable& value) { + [[nodiscard]] bool Encode(const MessageSerializable& value) { return value.Serialize(*this); } @@ -103,7 +103,7 @@ class Message { typename T, typename = std::enable_if_t< std::is_base_of::value>> - FML_WARN_UNUSED_RESULT bool Encode(const std::unique_ptr& value) { + [[nodiscard]] bool Encode(const std::unique_ptr& value) { // Encode if null. if (!Encode(static_cast(value))) { return false; @@ -130,7 +130,7 @@ class Message { template ::value>> - FML_WARN_UNUSED_RESULT bool Decode(T& value) { + [[nodiscard]] bool Decode(T& value) { if (auto* buffer = PrepareDecode(sizeof(T))) { ::memcpy(&value, buffer, sizeof(T)); return true; @@ -138,7 +138,7 @@ class Message { return false; } - FML_WARN_UNUSED_RESULT bool Decode(MessageSerializable& value) { + [[nodiscard]] bool Decode(MessageSerializable& value) { return value.Deserialize(*this); } @@ -146,7 +146,7 @@ class Message { typename T, typename = std::enable_if_t< std::is_base_of::value>> - FML_WARN_UNUSED_RESULT bool Decode(std::unique_ptr& value) { + [[nodiscard]] bool Decode(std::unique_ptr& value) { // Decode if null. bool is_null = false; if (!Decode(is_null)) { @@ -184,17 +184,13 @@ class Message { size_t data_length_ = 0; size_t size_read_ = 0; - FML_WARN_UNUSED_RESULT - bool Reserve(size_t size); + [[nodiscard]] bool Reserve(size_t size); - FML_WARN_UNUSED_RESULT - bool Resize(size_t size); + [[nodiscard]] bool Resize(size_t size); - FML_WARN_UNUSED_RESULT - uint8_t* PrepareEncode(size_t size); + [[nodiscard]] uint8_t* PrepareEncode(size_t size); - FML_WARN_UNUSED_RESULT - uint8_t* PrepareDecode(size_t size); + [[nodiscard]] uint8_t* PrepareDecode(size_t size); FML_DISALLOW_COPY_AND_ASSIGN(Message); }; diff --git a/fml/platform/darwin/scoped_block.h b/fml/platform/darwin/scoped_block.h index ff7d8d692ca39..783767aaa5f40 100644 --- a/fml/platform/darwin/scoped_block.h +++ b/fml/platform/darwin/scoped_block.h @@ -72,7 +72,7 @@ class ScopedBlock { block_ = temp; } - B release() FML_WARN_UNUSED_RESULT { + [[nodiscard]] B release() { B temp = block_; block_ = nullptr; return temp; diff --git a/fml/platform/darwin/scoped_nsobject.h b/fml/platform/darwin/scoped_nsobject.h index c2580f22b7724..50b08ebb3603d 100644 --- a/fml/platform/darwin/scoped_nsobject.h +++ b/fml/platform/darwin/scoped_nsobject.h @@ -79,7 +79,7 @@ class scoped_nsprotocol { // scoped_nsprotocol<>::release() is like scoped_ptr<>::release. It is NOT a // wrapper for [object_ release]. To force a scoped_nsprotocol<> to call // [object_ release], use scoped_nsprotocol<>::reset(). - NST release() FML_WARN_UNUSED_RESULT { + [[nodiscard]] NST release() { NST temp = object_; object_ = nil; return temp; diff --git a/fml/synchronization/semaphore.h b/fml/synchronization/semaphore.h index b5871017b1330..0b0dda5cfed4b 100644 --- a/fml/synchronization/semaphore.h +++ b/fml/synchronization/semaphore.h @@ -22,8 +22,7 @@ class Semaphore { bool IsValid() const; - FML_WARN_UNUSED_RESULT - bool TryWait(); + [[nodiscard]] bool TryWait(); void Signal(); diff --git a/fml/unique_object.h b/fml/unique_object.h index 407502a0703b8..8e119699f5390 100644 --- a/fml/unique_object.h +++ b/fml/unique_object.h @@ -78,7 +78,7 @@ class UniqueObject { // Release the object. The return value is the current object held by this // object. After this operation, this object will hold an invalid value, and // will not own the object any more. - T release() FML_WARN_UNUSED_RESULT { + [[nodiscard]] T release() { T old_generic = data_.generic; data_.generic = Traits::InvalidValue(); return old_generic; diff --git a/runtime/dart_isolate.cc b/runtime/dart_isolate.cc index aeb0b0d5d8ab0..055d049c2640b 100644 --- a/runtime/dart_isolate.cc +++ b/runtime/dart_isolate.cc @@ -338,8 +338,7 @@ bool DartIsolate::LoadKernel(std::shared_ptr mapping, return true; } -FML_WARN_UNUSED_RESULT -bool DartIsolate::PrepareForRunningFromKernel( +[[nodiscard]] bool DartIsolate::PrepareForRunningFromKernel( std::shared_ptr mapping, bool last_piece) { TRACE_EVENT0("flutter", "DartIsolate::PrepareForRunningFromKernel"); @@ -405,8 +404,7 @@ bool DartIsolate::PrepareForRunningFromKernel( return true; } -FML_WARN_UNUSED_RESULT -bool DartIsolate::PrepareForRunningFromKernels( +[[nodiscard]] bool DartIsolate::PrepareForRunningFromKernels( std::vector> kernels) { const auto count = kernels.size(); if (count == 0) { @@ -423,8 +421,7 @@ bool DartIsolate::PrepareForRunningFromKernels( return true; } -FML_WARN_UNUSED_RESULT -bool DartIsolate::PrepareForRunningFromKernels( +[[nodiscard]] bool DartIsolate::PrepareForRunningFromKernels( std::vector> kernels) { std::vector> shared_kernels; for (auto& kernel : kernels) { @@ -460,9 +457,9 @@ bool DartIsolate::MarkIsolateRunnable() { return true; } -FML_WARN_UNUSED_RESULT -static bool InvokeMainEntrypoint(Dart_Handle user_entrypoint_function, - Dart_Handle args) { +[[nodiscard]] static bool InvokeMainEntrypoint( + Dart_Handle user_entrypoint_function, + Dart_Handle args) { if (tonic::LogIfError(user_entrypoint_function)) { FML_LOG(ERROR) << "Could not resolve main entrypoint function."; return false; @@ -488,10 +485,9 @@ static bool InvokeMainEntrypoint(Dart_Handle user_entrypoint_function, } /// @note Procedure doesn't copy all closures. -FML_WARN_UNUSED_RESULT -bool DartIsolate::Run(const std::string& entrypoint_name, - const std::vector& args, - const fml::closure& on_run) { +[[nodiscard]] bool DartIsolate::Run(const std::string& entrypoint_name, + const std::vector& args, + const fml::closure& on_run) { TRACE_EVENT0("flutter", "DartIsolate::Run"); if (phase_ != Phase::Ready) { return false; @@ -517,11 +513,11 @@ bool DartIsolate::Run(const std::string& entrypoint_name, } /// @note Procedure doesn't copy all closures. -FML_WARN_UNUSED_RESULT -bool DartIsolate::RunFromLibrary(const std::string& library_name, - const std::string& entrypoint_name, - const std::vector& args, - const fml::closure& on_run) { +[[nodiscard]] bool DartIsolate::RunFromLibrary( + const std::string& library_name, + const std::string& entrypoint_name, + const std::vector& args, + const fml::closure& on_run) { TRACE_EVENT0("flutter", "DartIsolate::RunFromLibrary"); if (phase_ != Phase::Ready) { return false; diff --git a/runtime/dart_isolate.h b/runtime/dart_isolate.h index efbc6bde21755..22f6ea5b98bd0 100644 --- a/runtime/dart_isolate.h +++ b/runtime/dart_isolate.h @@ -241,8 +241,7 @@ class DartIsolate : public UIDartState { /// @return Whether the isolate was prepared and the described phase /// transition made. /// - FML_WARN_UNUSED_RESULT - bool PrepareForRunningFromPrecompiledCode(); + [[nodiscard]] bool PrepareForRunningFromPrecompiledCode(); //---------------------------------------------------------------------------- /// @brief Prepare the isolate for running for a a list of kernel files. @@ -265,9 +264,9 @@ class DartIsolate : public UIDartState { /// @return If the kernel mapping supplied was successfully used to /// prepare the isolate. /// - FML_WARN_UNUSED_RESULT - bool PrepareForRunningFromKernel(std::shared_ptr kernel, - bool last_piece = true); + [[nodiscard]] bool PrepareForRunningFromKernel( + std::shared_ptr kernel, + bool last_piece = true); //---------------------------------------------------------------------------- /// @brief Prepare the isolate for running for a a list of kernel files. @@ -284,8 +283,7 @@ class DartIsolate : public UIDartState { /// @return If the kernel mappings supplied were successfully used to /// prepare the isolate. /// - FML_WARN_UNUSED_RESULT - bool PrepareForRunningFromKernels( + [[nodiscard]] bool PrepareForRunningFromKernels( std::vector> kernels); //---------------------------------------------------------------------------- @@ -303,8 +301,7 @@ class DartIsolate : public UIDartState { /// @return If the kernel mappings supplied were successfully used to /// prepare the isolate. /// - FML_WARN_UNUSED_RESULT - bool PrepareForRunningFromKernels( + [[nodiscard]] bool PrepareForRunningFromKernels( std::vector> kernels); //---------------------------------------------------------------------------- @@ -323,10 +320,9 @@ class DartIsolate : public UIDartState { /// @return If the isolate successfully transitioned to the running phase /// and the main entrypoint was invoked. /// - FML_WARN_UNUSED_RESULT - bool Run(const std::string& entrypoint, - const std::vector& args, - const fml::closure& on_run = nullptr); + [[nodiscard]] bool Run(const std::string& entrypoint, + const std::vector& args, + const fml::closure& on_run = nullptr); //---------------------------------------------------------------------------- /// @brief Transition the root isolate to the `Phase::Running` phase and @@ -346,11 +342,10 @@ class DartIsolate : public UIDartState { /// @return If the isolate successfully transitioned to the running phase /// and the main entrypoint was invoked. /// - FML_WARN_UNUSED_RESULT - bool RunFromLibrary(const std::string& library_name, - const std::string& entrypoint, - const std::vector& args, - const fml::closure& on_run = nullptr); + [[nodiscard]] bool RunFromLibrary(const std::string& library_name, + const std::string& entrypoint, + const std::vector& args, + const fml::closure& on_run = nullptr); //---------------------------------------------------------------------------- /// @brief Transition the isolate to the `Phase::Shutdown` phase. The @@ -358,8 +353,7 @@ class DartIsolate : public UIDartState { /// /// @return If the isolate succesfully transitioned to the shutdown phase. /// - FML_WARN_UNUSED_RESULT - bool Shutdown(); + [[nodiscard]] bool Shutdown(); //---------------------------------------------------------------------------- /// @brief Registers a callback that will be invoked in isolate scope @@ -418,19 +412,17 @@ class DartIsolate : public UIDartState { std::string advisory_script_uri, std::string advisory_script_entrypoint, bool is_root_isolate); - FML_WARN_UNUSED_RESULT bool Initialize(Dart_Isolate isolate); + [[nodiscard]] bool Initialize(Dart_Isolate isolate); void SetMessageHandlingTaskRunner(fml::RefPtr runner); bool LoadKernel(std::shared_ptr mapping, bool last_piece); - FML_WARN_UNUSED_RESULT - bool LoadLibraries(); + [[nodiscard]] bool LoadLibraries(); bool UpdateThreadPoolNames() const; - FML_WARN_UNUSED_RESULT - bool MarkIsolateRunnable(); + [[nodiscard]] bool MarkIsolateRunnable(); void OnShutdownCallback(); diff --git a/runtime/dart_service_isolate.h b/runtime/dart_service_isolate.h index 52a18b24580c6..5bd9b5beb3f65 100644 --- a/runtime/dart_service_isolate.h +++ b/runtime/dart_service_isolate.h @@ -33,8 +33,7 @@ class DartServiceIsolate { // Returns a handle for the callback that can be used in // RemoveServerStatusCallback - FML_WARN_UNUSED_RESULT - static CallbackHandle AddServerStatusCallback( + [[nodiscard]] static CallbackHandle AddServerStatusCallback( const ObservatoryServerStateCallback& callback); // Accepts the handle returned by AddServerStatusCallback diff --git a/runtime/dart_vm_lifecycle.h b/runtime/dart_vm_lifecycle.h index d89b6d7cb43df..5c355abe9bbc6 100644 --- a/runtime/dart_vm_lifecycle.h +++ b/runtime/dart_vm_lifecycle.h @@ -26,10 +26,10 @@ namespace flutter { // DartVMRef instances may be created on any thread. class DartVMRef { public: - FML_WARN_UNUSED_RESULT - static DartVMRef Create(Settings settings, - fml::RefPtr vm_snapshot = nullptr, - fml::RefPtr isolate_snapshot = nullptr); + [[nodiscard]] static DartVMRef Create( + Settings settings, + fml::RefPtr vm_snapshot = nullptr, + fml::RefPtr isolate_snapshot = nullptr); DartVMRef(DartVMRef&&); diff --git a/runtime/service_protocol.cc b/runtime/service_protocol.cc index 3e199273599e2..16d574de8f8c3 100644 --- a/runtime/service_protocol.cc +++ b/runtime/service_protocol.cc @@ -146,8 +146,7 @@ bool ServiceProtocol::HandleMessage(std::string_view method, return service_protocol->HandleMessage(method, params, response); } -FML_WARN_UNUSED_RESULT -static bool HandleMessageOnHandler( +[[nodiscard]] static bool HandleMessageOnHandler( ServiceProtocol::Handler* handler, std::string_view method, const ServiceProtocol::Handler::ServiceProtocolMap& params, diff --git a/runtime/service_protocol.h b/runtime/service_protocol.h index e0ecc2e1db51e..ce2a6845c24b4 100644 --- a/runtime/service_protocol.h +++ b/runtime/service_protocol.h @@ -76,25 +76,22 @@ class ServiceProtocol { std::unique_ptr handlers_mutex_; std::map> handlers_; - FML_WARN_UNUSED_RESULT - static bool HandleMessage(const char* method, - const char** param_keys, - const char** param_values, - intptr_t num_params, - void* user_data, - const char** json_object); - FML_WARN_UNUSED_RESULT - static bool HandleMessage(std::string_view method, - const Handler::ServiceProtocolMap& params, - ServiceProtocol* service_protocol, - rapidjson::Document& response); - FML_WARN_UNUSED_RESULT - bool HandleMessage(std::string_view method, - const Handler::ServiceProtocolMap& params, - rapidjson::Document& response) const; - - FML_WARN_UNUSED_RESULT - bool HandleListViewsMethod(rapidjson::Document& response) const; + [[nodiscard]] static bool HandleMessage(const char* method, + const char** param_keys, + const char** param_values, + intptr_t num_params, + void* user_data, + const char** json_object); + [[nodiscard]] static bool HandleMessage( + std::string_view method, + const Handler::ServiceProtocolMap& params, + ServiceProtocol* service_protocol, + rapidjson::Document& response); + [[nodiscard]] bool HandleMessage(std::string_view method, + const Handler::ServiceProtocolMap& params, + rapidjson::Document& response) const; + + [[nodiscard]] bool HandleListViewsMethod(rapidjson::Document& response) const; FML_DISALLOW_COPY_AND_ASSIGN(ServiceProtocol); }; diff --git a/shell/common/engine.h b/shell/common/engine.h index ee8efe8857bd2..b44e2fae78525 100644 --- a/shell/common/engine.h +++ b/shell/common/engine.h @@ -342,8 +342,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// /// @return The result of the call to run the root isolate. /// - FML_WARN_UNUSED_RESULT - RunStatus Run(RunConfiguration configuration); + [[nodiscard]] RunStatus Run(RunConfiguration configuration); //---------------------------------------------------------------------------- /// @brief Tears down an existing root isolate, reuses the components of @@ -362,8 +361,7 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { /// @return Whether the restart was successful. If not, the engine and its /// shell must be discarded. /// - FML_WARN_UNUSED_RESULT - bool Restart(RunConfiguration configuration); + [[nodiscard]] bool Restart(RunConfiguration configuration); //---------------------------------------------------------------------------- /// @brief Updates the asset manager referenced by the root isolate of a diff --git a/shell/common/pipeline.h b/shell/common/pipeline.h index 2bf3b19c4b06f..587c81ff6fbc2 100644 --- a/shell/common/pipeline.h +++ b/shell/common/pipeline.h @@ -128,8 +128,7 @@ class Pipeline : public fml::RefCountedThreadSafe> { using Consumer = std::function; /// @note Procedure doesn't copy all closures. - FML_WARN_UNUSED_RESULT - PipelineConsumeResult Consume(const Consumer& consumer) { + [[nodiscard]] PipelineConsumeResult Consume(const Consumer& consumer) { if (consumer == nullptr) { return PipelineConsumeResult::NoneAvailable; } diff --git a/testing/dart_isolate_runner.cc b/testing/dart_isolate_runner.cc index 6e744ab3fcce7..7212879d18407 100644 --- a/testing/dart_isolate_runner.cc +++ b/testing/dart_isolate_runner.cc @@ -26,8 +26,8 @@ AutoIsolateShutdown::~AutoIsolateShutdown() { latch.Wait(); } -FML_WARN_UNUSED_RESULT -bool AutoIsolateShutdown::RunInIsolateScope(std::function closure) { +[[nodiscard]] bool AutoIsolateShutdown::RunInIsolateScope( + std::function closure) { if (!IsValid()) { return false; } diff --git a/testing/dart_isolate_runner.h b/testing/dart_isolate_runner.h index f7a3db1fb6a59..83c91a1e5c3a8 100644 --- a/testing/dart_isolate_runner.h +++ b/testing/dart_isolate_runner.h @@ -28,8 +28,7 @@ class AutoIsolateShutdown { bool IsValid() const { return isolate_ != nullptr && runner_; } - FML_WARN_UNUSED_RESULT - bool RunInIsolateScope(std::function closure); + [[nodiscard]] bool RunInIsolateScope(std::function closure); DartIsolate* get() { FML_CHECK(isolate_); diff --git a/vulkan/vulkan_backbuffer.h b/vulkan/vulkan_backbuffer.h index b6cdac62b89b3..1e5f6c0d60849 100644 --- a/vulkan/vulkan_backbuffer.h +++ b/vulkan/vulkan_backbuffer.h @@ -26,11 +26,9 @@ class VulkanBackbuffer { bool IsValid() const; - FML_WARN_UNUSED_RESULT - bool WaitFences(); + [[nodiscard]] bool WaitFences(); - FML_WARN_UNUSED_RESULT - bool ResetFences(); + [[nodiscard]] bool ResetFences(); const VulkanHandle& GetUsageFence() const; diff --git a/vulkan/vulkan_command_buffer.h b/vulkan/vulkan_command_buffer.h index bad0be185cfbf..da51e69586964 100644 --- a/vulkan/vulkan_command_buffer.h +++ b/vulkan/vulkan_command_buffer.h @@ -25,14 +25,11 @@ class VulkanCommandBuffer { VkCommandBuffer Handle() const; - FML_WARN_UNUSED_RESULT - bool Begin() const; + [[nodiscard]] bool Begin() const; - FML_WARN_UNUSED_RESULT - bool End() const; + [[nodiscard]] bool End() const; - FML_WARN_UNUSED_RESULT - bool InsertPipelineBarrier( + [[nodiscard]] bool InsertPipelineBarrier( VkPipelineStageFlagBits src_stage_flags, VkPipelineStageFlagBits dest_stage_flags, uint32_t /* mask of VkDependencyFlagBits */ dependency_flags, diff --git a/vulkan/vulkan_device.h b/vulkan/vulkan_device.h index f050fb889c7a7..211e5801f4e75 100644 --- a/vulkan/vulkan_device.h +++ b/vulkan/vulkan_device.h @@ -37,35 +37,31 @@ class VulkanDevice { void ReleaseDeviceOwnership(); - FML_WARN_UNUSED_RESULT - bool GetSurfaceCapabilities(const VulkanSurface& surface, - VkSurfaceCapabilitiesKHR* capabilities) const; + [[nodiscard]] bool GetSurfaceCapabilities( + const VulkanSurface& surface, + VkSurfaceCapabilitiesKHR* capabilities) const; - FML_WARN_UNUSED_RESULT - bool GetPhysicalDeviceFeatures(VkPhysicalDeviceFeatures* features) const; + [[nodiscard]] bool GetPhysicalDeviceFeatures( + VkPhysicalDeviceFeatures* features) const; - FML_WARN_UNUSED_RESULT - bool GetPhysicalDeviceFeaturesSkia( + [[nodiscard]] bool GetPhysicalDeviceFeaturesSkia( uint32_t* /* mask of GrVkFeatureFlags */ features) const; - FML_WARN_UNUSED_RESULT - int ChooseSurfaceFormat(const VulkanSurface& surface, - std::vector desired_formats, - VkSurfaceFormatKHR* format) const; + [[nodiscard]] int ChooseSurfaceFormat(const VulkanSurface& surface, + std::vector desired_formats, + VkSurfaceFormatKHR* format) const; - FML_WARN_UNUSED_RESULT - bool ChoosePresentMode(const VulkanSurface& surface, - VkPresentModeKHR* present_mode) const; + [[nodiscard]] bool ChoosePresentMode(const VulkanSurface& surface, + VkPresentModeKHR* present_mode) const; - FML_WARN_UNUSED_RESULT - bool QueueSubmit(std::vector wait_dest_pipeline_stages, - const std::vector& wait_semaphores, - const std::vector& signal_semaphores, - const std::vector& command_buffers, - const VulkanHandle& fence) const; + [[nodiscard]] bool QueueSubmit( + std::vector wait_dest_pipeline_stages, + const std::vector& wait_semaphores, + const std::vector& signal_semaphores, + const std::vector& command_buffers, + const VulkanHandle& fence) const; - FML_WARN_UNUSED_RESULT - bool WaitIdle() const; + [[nodiscard]] bool WaitIdle() const; private: VulkanProcTable& vk; diff --git a/vulkan/vulkan_image.h b/vulkan/vulkan_image.h index ac4690b8ca589..6b347a96ef595 100644 --- a/vulkan/vulkan_image.h +++ b/vulkan/vulkan_image.h @@ -22,12 +22,12 @@ class VulkanImage { bool IsValid() const; - FML_WARN_UNUSED_RESULT - bool InsertImageMemoryBarrier(const VulkanCommandBuffer& command_buffer, - VkPipelineStageFlagBits src_pipline_bits, - VkPipelineStageFlagBits dest_pipline_bits, - VkAccessFlagBits dest_access_flags, - VkImageLayout dest_layout); + [[nodiscard]] bool InsertImageMemoryBarrier( + const VulkanCommandBuffer& command_buffer, + VkPipelineStageFlagBits src_pipline_bits, + VkPipelineStageFlagBits dest_pipline_bits, + VkAccessFlagBits dest_access_flags, + VkImageLayout dest_layout); private: VulkanHandle handle_; diff --git a/vulkan/vulkan_swapchain.h b/vulkan/vulkan_swapchain.h index 047b27ca6b157..b59b7c90d9a99 100644 --- a/vulkan/vulkan_swapchain.h +++ b/vulkan/vulkan_swapchain.h @@ -56,8 +56,7 @@ class VulkanSwapchain { /// Submit a previously acquired. There must not be consecutive calls to /// |Submit| without and interleaving |AcquireFrame|. - FML_WARN_UNUSED_RESULT - bool Submit(); + [[nodiscard]] bool Submit(); SkISize GetSize() const; diff --git a/vulkan/vulkan_window.h b/vulkan/vulkan_window.h index 30c10e28e4748..1ea5236b388fe 100644 --- a/vulkan/vulkan_window.h +++ b/vulkan/vulkan_window.h @@ -58,8 +58,7 @@ class VulkanWindow { bool CreateSkiaBackendContext(GrVkBackendContext* context); - FML_WARN_UNUSED_RESULT - bool RecreateSwapchain(); + [[nodiscard]] bool RecreateSwapchain(); FML_DISALLOW_COPY_AND_ASSIGN(VulkanWindow); }; From d640569b6fb23bc5af735c7ff6c3b2b36f3e29c4 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 17:26:03 -0400 Subject: [PATCH 24/58] Roll fuchsia/sdk/core/linux-amd64 from X3Xm2... to Yk03L... (#17103) --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b74f673e436d2..07e400afe3ae8 100644 --- a/DEPS +++ b/DEPS @@ -556,7 +556,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'X3Xm2czRkurpHi7WzysWlVYZlpywgV1tBK_yw1qfpNUC' + 'version': 'Yk03LLV_GxmnI5BB-_eL73ZNPR_JccGEcxv8VI-Z60MC' } ], 'condition': 'host_os == "linux"', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 634753e47532b..8504173e3f84c 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 826a383a3420287bfd23366f29545798 +Signature: 7cc76eb71f196838eeeb1a1cc7ec2cd2 UNUSED LICENSES: From a94d3e0f249b15b96d305acfaa3e8c63ba54099a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 17:41:05 -0400 Subject: [PATCH 25/58] Roll src/third_party/skia dafbf121a8b1..f0140ee00f95 (6 commits) (#17104) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 07e400afe3ae8..4ecd9f21a39ed 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'dafbf121a8b185b9a68f363badd21e44e52275ef', + 'skia_revision': 'f0140ee00f955ed2a2c0637159e04b45a0fc9ca9', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index e0f7c3e0fb97b..a6ee5f56e3098 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: b0442b101ed659aa3f067c23c86fd1c6 +Signature: 37f7a024ef554b5f4888813c05efb1b7 UNUSED LICENSES: From 18962926012965f815c273e58409cda3144998f5 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Wed, 11 Mar 2020 18:26:05 -0400 Subject: [PATCH 26/58] Roll src/third_party/dart 684c53a6f174..17eec5bcde78 (6 commits) (#17105) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 122 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index 4ecd9f21a39ed..9fdad598cf56a 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '684c53a6f174bcefd4e8202391a1a761abccead8', + 'dart_revision': '17eec5bcde785ff2721d918bf08bd59ce043e856', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 32f323dba6284..144a594bb5a6b 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 1dc1482fb66414d239105f52ecd04a49 +Signature: 26b0faba53b61458d79ebd30e160240c UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 2844d4480b0ed9bc523a42563b672a214c39fd79 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Wed, 11 Mar 2020 16:31:50 -0700 Subject: [PATCH 27/58] Remove unused or unnecessary compiler specific marcos in FML. (#17101) Macros to control inlining are not used and we explicitly recommending against playing with compiler inlining. The macros for alignment became part of the standard in C++11 and we already use the standard variants over these macros (see `PointerData`). The formatters are unused as well and we use the stream based variants for formatting. --- fml/compiler_specific.h | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/fml/compiler_specific.h b/fml/compiler_specific.h index fd7410934cf06..52c9e6c9a4d9f 100644 --- a/fml/compiler_specific.h +++ b/fml/compiler_specific.h @@ -26,44 +26,4 @@ #define FML_ALLOW_UNUSED_TYPE #endif -// Annotate a function indicating it should not be inlined. -// Use like: -// NOINLINE void DoStuff() { ... } -#if defined(__GNUC__) || defined(__clang__) -#define FML_NOINLINE __attribute__((noinline)) -#elif defined(_MSC_VER) -#define FML_NOINLINE __declspec(noinline) -#endif - -// Specify memory alignment for structs, classes, etc. -// Use like: -// class FML_ALIGNAS(16) MyClass { ... } -// FML_ALIGNAS(16) int array[4]; -#if defined(__GNUC__) || defined(__clang__) -#define FML_ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) -#elif defined(_MSC_VER) -#define FML_ALIGNAS(byte_alignment) __declspec(align(byte_alignment)) -#endif - -// Return the byte alignment of the given type (available at compile time). -// Use like: -// FML_ALIGNOF(int32) // this would be 4 -#if defined(__GNUC__) || defined(__clang__) -#define FML_ALIGNOF(type) __alignof__(type) -#elif defined(_MSC_VER) -#define FML_ALIGNOF(type) __alignof(type) -#endif - -// Tell the compiler a function is using a printf-style format string. -// |format_param| is the one-based index of the format string parameter; -// |dots_param| is the one-based index of the "..." parameter. -// For v*printf functions (which take a va_list), pass 0 for dots_param. -// (This is undocumented but matches what the system C headers do.) -#if defined(__GNUC__) || defined(__clang__) -#define FML_PRINTF_FORMAT(format_param, dots_param) \ - __attribute__((format(printf, format_param, dots_param))) -#else -#define FML_PRINTF_FORMAT(format_param, dots_param) -#endif - #endif // FLUTTER_FML_COMPILER_SPECIFIC_H_ From 1aaf1698826c9a1fad3799a2214f6bdae13d8e0e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 09:20:15 -0400 Subject: [PATCH 28/58] Roll src/third_party/skia f0140ee00f95..1743144ab839 (2 commits) (#17111) https://skia.googlesource.com/skia.git/+log/f0140ee00f95..1743144ab839 git log f0140ee00f95..1743144ab839 --date=short --first-parent --format='%ad %ae %s' 2020-03-12 skia-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/externals/swiftshader 16ae92a4ee52..7e857092052e (6 commits) 2020-03-11 jvanverth@google.com Remove need for gpu when unrefing managed resources. Created with: gclient setdep -r src/third_party/skia@1743144ab839 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md Bug: None Tbr: brianosman@google.com --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 3 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++++++--------------- 3 files changed, 127 insertions(+), 122 deletions(-) diff --git a/DEPS b/DEPS index 9fdad598cf56a..331af45ea2deb 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f0140ee00f955ed2a2c0637159e04b45a0fc9ca9', + 'skia_revision': '1743144ab839c38c071a304d4d018993e8b8f355', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a6ee5f56e3098..9567d969af6b2 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 37f7a024ef554b5f4888813c05efb1b7 +Signature: 634226151abe294232e6dc743855ac33 UNUSED LICENSES: @@ -3921,6 +3921,7 @@ FILE: ../../../third_party/skia/src/gpu/d3d/GrD3DUtil.h FILE: ../../../third_party/skia/src/gpu/effects/GrDeviceSpaceEffect.fp FILE: ../../../third_party/skia/src/gpu/effects/generated/GrDeviceSpaceEffect.cpp FILE: ../../../third_party/skia/src/gpu/effects/generated/GrDeviceSpaceEffect.h +FILE: ../../../third_party/skia/src/gpu/vk/GrVkManagedResource.h FILE: ../../../third_party/skia/src/sksl/SkSLInterpreter.h FILE: ../../../third_party/skia/src/sksl/SkSLSPIRVtoHLSL.cpp FILE: ../../../third_party/skia/src/sksl/SkSLSPIRVtoHLSL.h diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17d812e9a5e1f..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,66 +5142,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5233,66 +5173,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5689,6 +5569,130 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From ea76589159273459615df8221c526ae8a555f804 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 15:46:02 -0400 Subject: [PATCH 29/58] Roll fuchsia/sdk/core/mac-amd64 from 0Z8VF... to lbDph... (#17107) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 331af45ea2deb..47ac2ec3018c9 100644 --- a/DEPS +++ b/DEPS @@ -536,7 +536,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': '0Z8VFYja5HLTJXVItjqbtphdvf-wX_b9d-OeSTjLmrQC' + 'version': 'lbDphe6fwzSy_UkGn1QzPBk880Wt_zytqn1Y_UNzhTUC' } ], 'condition': 'host_os == "mac"', From c30fd2daa8c30adc124680b32ca61604df5d2739 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 15:51:01 -0400 Subject: [PATCH 30/58] Roll src/third_party/dart 17eec5bcde78..33349076ee7f (11 commits) (#17110) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 47ac2ec3018c9..b4ddcfed6dc59 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '17eec5bcde785ff2721d918bf08bd59ce043e856', + 'dart_revision': '33349076ee7f54594ddce79bc9012cca1b969401', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 144a594bb5a6b..864d07e26600c 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 26b0faba53b61458d79ebd30e160240c +Signature: 97daf653c9cb0ff8cbbe5b9d1d9bbecb UNUSED LICENSES: From c28d23068fc3ec294298539cb9ac1904ffbd8c19 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 15:56:01 -0400 Subject: [PATCH 31/58] Roll fuchsia/sdk/core/linux-amd64 from Yk03L... to _k1WT... (#17112) --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index b4ddcfed6dc59..d336339c39790 100644 --- a/DEPS +++ b/DEPS @@ -556,7 +556,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'Yk03LLV_GxmnI5BB-_eL73ZNPR_JccGEcxv8VI-Z60MC' + 'version': '_k1WTHeM30_S5dWsoHq7Sr6pFXXrNNWTNR2jiV0dtd4C' } ], 'condition': 'host_os == "linux"', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 8504173e3f84c..9795261290023 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 7cc76eb71f196838eeeb1a1cc7ec2cd2 +Signature: 85d90f04f17057452129480aa98ca47a UNUSED LICENSES: @@ -3112,6 +3112,7 @@ FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.castsetup/server.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/constants.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/error.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component/types.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.feedback/data_register.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.input/keys.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.legacymetrics/event.fidl FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.legacymetrics/metrics_recorder.fidl From e62333510907ce0218144c91561aeb7cb83a9e5e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 16:01:01 -0400 Subject: [PATCH 32/58] Roll src/third_party/skia 1743144ab839..9b449b73d367 (5 commits) (#17113) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index d336339c39790..b7ebfa1125acc 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '1743144ab839c38c071a304d4d018993e8b8f355', + 'skia_revision': '9b449b73d3679816df860de1e902419d8bc9715d', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 9567d969af6b2..1ad2506d6b600 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 634226151abe294232e6dc743855ac33 +Signature: 0dd6b317e4b88e03504eb1fd3ac02432 UNUSED LICENSES: From cbc8713fdd0aa29f7c2519f0fe8a663b4e9a4bcc Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Thu, 12 Mar 2020 13:49:46 -0700 Subject: [PATCH 33/58] Define embedding dependencies in Gradle (#17116) --- .../android/embedding_bundle/README.md | 54 +++++++++ .../android/embedding_bundle/build.gradle | 104 ++++++++++++++++++ .../android/embedding_bundle/cipd.yaml | 4 + shell/platform/android/test/README.md | 68 +----------- shell/platform/android/test/cipd.yaml | 4 - 5 files changed, 164 insertions(+), 70 deletions(-) create mode 100644 shell/platform/android/embedding_bundle/README.md create mode 100644 shell/platform/android/embedding_bundle/build.gradle create mode 100644 shell/platform/android/embedding_bundle/cipd.yaml delete mode 100644 shell/platform/android/test/cipd.yaml diff --git a/shell/platform/android/embedding_bundle/README.md b/shell/platform/android/embedding_bundle/README.md new file mode 100644 index 0000000000000..043c3366e0d3f --- /dev/null +++ b/shell/platform/android/embedding_bundle/README.md @@ -0,0 +1,54 @@ +# Updating the Embedding Dependencies + +## Requirements + +1. Gradle. If you don't have Gradle installed, you can get it on [https://gradle.org/install/#manually](https://gradle.org/install/#manually). +2. [Depot tools](http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up). + +## Steps + +To update the embedding dependencies, just `cd` into this directory, +modify the dependencies in `build.gradle` and run `gradle updateDependencies`. + +Once you have updated the dependencies, you can upload a new version by running +`cipd create --pkg-def cipd.yaml`. For more, see the Chromium instructions on ["Updating a CIPD +dependency"](https://chromium.googlesource.com/chromium/src/+/master/docs/cipd.md#Updating-a-CIPD-dependency) for how to upload a package update to CIPD. + +Once you've uploaded the new version, also make sure to tag it with the updated +timestamp and robolectric version (most likely still 3.8, unless you've migrated +all the packages to 4+). + + $ cipd set-tag flutter/android/embedding_bundle --version= -tag=last_updated: + +Example of a last-updated timestamp: 2019-07-29T15:27:42-0700 + +You can generate the same date format with `date +%Y-%m-%dT%T%z`. + +You can run `cipd describe flutter/android/embedding_bundle +--version=` to verify. You should see: + +``` +Package: flutter/android/embedding_bundle +Instance ID: +... +Tags: + last_updated: +``` + +Then update the `DEPS` file (located at /src/flutter/DEPS) to use the new version by pointing to +your new `last_updated_at` tag. + +``` + 'src/third_party/android_embedding_dependencies': { + 'packages': [ + { + 'package': 'flutter/android/embedding_bundle', + 'version': 'last_updated:' + } + ], + 'condition': 'download_android_deps', + 'dep_type': 'cipd', + }, +``` + +You can now re-run `gclient sync` to fetch the latest package version. diff --git a/shell/platform/android/embedding_bundle/build.gradle b/shell/platform/android/embedding_bundle/build.gradle new file mode 100644 index 0000000000000..073937ddc3c40 --- /dev/null +++ b/shell/platform/android/embedding_bundle/build.gradle @@ -0,0 +1,104 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// To use, run: +// $ gradle updateDependencies +// +// This script downloads the embedding dependencies into a lib/ directory, +// extract jar files from AARs, so they can be used in gn. +def destinationDir = "lib" + +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath "com.android.tools.build:gradle:3.5.0" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +apply plugin: "com.android.application" + +configurations { + // Use this configuration for dependencies required by the embedding. + embedding + // Use any of these configurations for dependencies required for testing the embedding. + embeddingTesting + embeddingTesting_duplicated +} + +android { + compileSdkVersion 28 + + dependencies { + embedding "androidx.annotation:annotation:1.1.0" + embedding "androidx.fragment:fragment:1.1.0" + + def lifecycle_version = "2.2.0" + embedding "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-service:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-process:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version" + + // Testing + embeddingTesting "androidx.arch.core:core-testing:2.1.0" + embeddingTesting "org.robolectric:android-all:8.1.0-robolectric-4611349" + // This is required by the robolectric test. + embeddingTesting_duplicated "org.robolectric:android-all:4.1.2_r1-robolectric-r1" + embeddingTesting "org.robolectric:robolectric:3.8" + embeddingTesting "org.robolectric:junit:3.8" + embeddingTesting "org.robolectric:shadows-framework:3.8" + embeddingTesting "org.robolectric:resources:3.8" + embeddingTesting "org.mockito:mockito-all:1.10.19" + embeddingTesting "junit:junit:4.13-beta-3" + } +} + +task updateDependencies() { + delete destinationDir + // Copy the dependencies from the compileOnly configuration into + // the destination directory. + copy { + from configurations.embedding + from configurations.embeddingTesting + from configurations.embeddingTesting_duplicated + into destinationDir + } + doLast { + // Extract classes.jar from aar and rename it as the dependency name .jar + // since javac doesn't support AARs. + fileTree(destinationDir) + .filter { it.name.endsWith(".aar") } + .collect { aarDependency -> + def dependencyName = "${aarDependency.name.take(aarDependency.name.lastIndexOf('.'))}"; + copy { + into destinationDir + from(zipTree(aarDependency)) { + include "classes.jar" + } + rename "classes.jar", "${dependencyName}.jar" + } + delete aarDependency + } + } + doLast { + fileTree(destinationDir) + .collect { dependency -> + println "\"//third_party/robolectric/lib/${dependency.name}\"," + } + } +} diff --git a/shell/platform/android/embedding_bundle/cipd.yaml b/shell/platform/android/embedding_bundle/cipd.yaml new file mode 100644 index 0000000000000..62654514c9742 --- /dev/null +++ b/shell/platform/android/embedding_bundle/cipd.yaml @@ -0,0 +1,4 @@ +package: flutter/android/embedding_bundle +description: Dependencies used by the Android embedding. +data: + - dir: lib diff --git a/shell/platform/android/test/README.md b/shell/platform/android/test/README.md index f17c2fd5b42c4..65182026d82de 100644 --- a/shell/platform/android/test/README.md +++ b/shell/platform/android/test/README.md @@ -32,72 +32,8 @@ the tests, but it would add an extra point of failure. ### My new test won't run. There's a "ClassNotFoundException". -Your test is probably using a dependency that we haven't needed yet. You -probably need to find the dependency you need, add it to the -`flutter/android/robolectric_bundle` CIPD package, and then re-run `gclient -sync`. See ["Updating a CIPD dependency"](#Updating-a-CIPD-dependency) below. +See [shell/platform/android/embedding_bundle](Updating Embedding Dependencies). ### My new test won't compile. It can't find one of my imports. -You could be using a brand new dependency. If so, you'll need to add it to the -CIPD package for the robolectric tests. See ["Updating a CIPD -dependency"](#Updating-a-CIPD-dependency) below. - -Then you'll also need to add the jar to the `robolectric_tests` build target. -Add `//third_party/robolectric/lib/` to -`robolectric_tests._jar_dependencies` in `/shell/platform/android/BUILD.gn`. - -There's also a chance that you're using a dependency that we're relying on at -runtime, but not compile time. If so you'll just need to update -`_jar_dependencies` in `BUILD.gn`. - -### Updating a CIPD dependency - -See the Chromium instructions on ["Updating a CIPD -dependency"](https://chromium.googlesource.com/chromium/src/+/master/docs/cipd.md#Updating-a-CIPD-dependency) -for how to upload a package update to CIPD. Download and extract the latest -package from CIPD and then copy -[shell/platform/android/test/cipd.yaml](cipd.yaml) into the extracted directory -to use as the base for the pre-existing package. Add new dependencies to `lib/`. - -Once you've uploaded the new version, also make sure to tag it with the updated -timestamp and robolectric version (most likely still 3.8, unless you've migrated -all the packages to 4+). - - $ cipd set-tag flutter/android/robolectric_bundle --version= -tag=last_updated: - -Example of a last-updated timestamp: 2019-07-29T15:27:42-0700 - -You can generate the same date format with `date +%Y-%m-%dT%T%z`. - - $ cipd set-tag flutter/android/robolectric_bundle --version= -tag=robolectric_version: - -You can run `cipd describe flutter/android/robolectric_bundle ---version=` to verify. You should see: - -``` -Package: flutter/android/robolectric_bundle -Instance ID: -... -Tags: - last_updated: - robolectric_version: -``` - -Then update the `DEPS` file (located at /src/flutter/DEPS) to use the new version by pointing to -your new `last_updated_at` tag. - -``` - 'src/third_party/robolectric': { - 'packages': [ - { - 'package': 'flutter/android/robolectric_bundle', - 'version': 'last_updated:' - } - ], - 'condition': 'download_android_deps', - 'dep_type': 'cipd', - }, -``` - -You can now re-run `gclient sync` to fetch the latest package version. +See [shell/platform/android/embedding_bundle](Updating Embedding Dependencies). diff --git a/shell/platform/android/test/cipd.yaml b/shell/platform/android/test/cipd.yaml deleted file mode 100644 index ebb96128625ad..0000000000000 --- a/shell/platform/android/test/cipd.yaml +++ /dev/null @@ -1,4 +0,0 @@ -package: flutter/android/robolectric_bundle -description: Robolectric 3.8 and associated runtime dependencies. -data: - - dir: lib From 25cded57421bf03622ec6e43a914ad949c32b9bb Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Thu, 12 Mar 2020 13:59:31 -0700 Subject: [PATCH 34/58] Fix link in readme (#17119) --- shell/platform/android/test/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/android/test/README.md b/shell/platform/android/test/README.md index 65182026d82de..b5e8b7a894e63 100644 --- a/shell/platform/android/test/README.md +++ b/shell/platform/android/test/README.md @@ -32,8 +32,8 @@ the tests, but it would add an extra point of failure. ### My new test won't run. There's a "ClassNotFoundException". -See [shell/platform/android/embedding_bundle](Updating Embedding Dependencies). +See [Updating Embedding Dependencies](../embedding_bundle). ### My new test won't compile. It can't find one of my imports. -See [shell/platform/android/embedding_bundle](Updating Embedding Dependencies). +See [Updating Embedding Dependencies](../embedding_bundle). From f97454f77635747db3db71a3160d81523c856486 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 12 Mar 2020 14:50:22 -0700 Subject: [PATCH 35/58] build a precompiled SDK with canvas kit enabled (#17115) --- web_sdk/BUILD.gn | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/web_sdk/BUILD.gn b/web_sdk/BUILD.gn index dbf416c1813d9..7ddb146b12079 100644 --- a/web_sdk/BUILD.gn +++ b/web_sdk/BUILD.gn @@ -28,6 +28,7 @@ web_engine_sources += [ "//flutter/lib/web_ui/lib/src/engine.dart" ] group("web_sdk") { deps = [ + ":flutter_dartdevc_canvaskit_kernel_sdk", ":flutter_dartdevc_kernel_sdk", ":flutter_dartdevc_kernel_sdk_outline", ":web_engine_sources", @@ -186,3 +187,57 @@ prebuilt_dart_action("flutter_dartdevc_kernel_sdk") { rebase_path("$root_out_dir/flutter_web_sdk/kernel/legacy/dart_sdk.js"), ] } + +# Compiles the DDC CanvasKit SDK's JS code. +prebuilt_dart_action("flutter_dartdevc_canvaskit_kernel_sdk") { + deps = [ + "//third_party/dart:create_sdk", + "//third_party/dart/pkg:pkg_files_stamp", + "//third_party/dart/utils/dartdevc:dartdevc_files_stamp", + "//third_party/dart/utils/dartdevc:dartdevc_sdk_patch_stamp", + ] + + inputs = [ "sdk_rewriter.dart" ] + web_ui_sources + web_engine_sources + + packages = "//third_party/dart/.packages" + + script = "//third_party/dart/pkg/dev_compiler/bin/dartdevc.dart" + + outputs = [ + "$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit/dart_sdk.js", + "$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit/dart_sdk.js.map", + ] + + args = [ + "-k", + "--compile-sdk", + "dart:core", + + # Additional Flutter web dart libraries + "dart:ui", + "dart:_engine", + "--no-summarize", + "--packages", + "file:///" + rebase_path("//third_party/dart/.packages"), + "--multi-root-scheme", + "org-dartlang-sdk", + "--multi-root", + "file:///" + rebase_path("$root_out_dir"), + "--multi-root-output-path", + rebase_path("$root_out_dir/"), + "--libraries-file", + "org-dartlang-sdk:///flutter_web_sdk/libraries.json", + "--inline-source-map", + "-DFLUTTER_WEB_USE_SKIA=true", + "--modules", + "amd", + "-o", + rebase_path( + "$root_out_dir/flutter_web_sdk/kernel/amd-canvaskit/dart_sdk.js"), + "--modules", + "legacy", + "-o", + rebase_path( + "$root_out_dir/flutter_web_sdk/kernel/legacy-canvaskit/dart_sdk.js"), + ] +} From ef38760d95bb31230b29d87a7778c2f8895d3fcc Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 17:51:03 -0400 Subject: [PATCH 36/58] Roll src/third_party/skia 9b449b73d367..bb7684276afd (12 commits) (#17117) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/DEPS b/DEPS index b7ebfa1125acc..4bb772c20c8a0 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '9b449b73d3679816df860de1e902419d8bc9715d', + 'skia_revision': 'bb7684276afd2c420be1fc4c321cc05986618bbb', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 1ad2506d6b600..21160c36e0e83 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0dd6b317e4b88e03504eb1fd3ac02432 +Signature: 81ad19fabe38ad403178717a330d4cf3 UNUSED LICENSES: @@ -5061,11 +5061,8 @@ FILE: ../../../third_party/skia/src/gpu/ccpr/GrSampleMaskProcessor.cpp FILE: ../../../third_party/skia/src/gpu/ccpr/GrSampleMaskProcessor.h FILE: ../../../third_party/skia/src/gpu/ccpr/GrStencilAtlasOp.h FILE: ../../../third_party/skia/src/gpu/effects/GrComposeLerpEffect.fp -FILE: ../../../third_party/skia/src/gpu/effects/GrComposeLerpRedEffect.fp FILE: ../../../third_party/skia/src/gpu/effects/generated/GrComposeLerpEffect.cpp FILE: ../../../third_party/skia/src/gpu/effects/generated/GrComposeLerpEffect.h -FILE: ../../../third_party/skia/src/gpu/effects/generated/GrComposeLerpRedEffect.cpp -FILE: ../../../third_party/skia/src/gpu/effects/generated/GrComposeLerpRedEffect.h FILE: ../../../third_party/skia/src/gpu/tessellate/GrGpuTessellationPathRenderer.cpp FILE: ../../../third_party/skia/src/gpu/tessellate/GrGpuTessellationPathRenderer.h FILE: ../../../third_party/skia/src/gpu/tessellate/GrStencilPathShader.cpp From 29b455d85047779fa8c71aed055b1ba41b478439 Mon Sep 17 00:00:00 2001 From: Nathan Rogers Date: Thu, 12 Mar 2020 14:57:50 -0700 Subject: [PATCH 37/58] [fuchsia] Change vsync trace name back to "vsync callback" on Fuchsia (#17118) Fuchsia benchmarks depend the name being precisely "vsync callback". Since this is causing immediate build issues, change it back to "vsync callback" on Fuchsia. Stronger testing for this in the long run is currently under discussion. b/150902962 --- shell/common/vsync_waiter.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/shell/common/vsync_waiter.cc b/shell/common/vsync_waiter.cc index 49978a18e2246..ae86fc547ea3b 100644 --- a/shell/common/vsync_waiter.cc +++ b/shell/common/vsync_waiter.cc @@ -11,6 +11,24 @@ namespace flutter { static constexpr const char* kVsyncFlowName = "VsyncFlow"; +#if defined(OS_FUCHSIA) +// ________ _________ ________ ________ +// |\ ____\|\___ ___\\ __ \|\ __ \ +// \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ +// \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ +// \|____|\ \ \ \ \ \ \ \\\ \ \ \___| +// ____\_\ \ \ \__\ \ \_______\ \__\ +// |\_________\ \|__| \|_______|\|__| +// \|_________| +// +// Fuchsia benchmarks depend on this trace event's name. Please do not change +// it without checking that the changes are compatible with Fuchsia benchmarks +// first! +static constexpr const char* kVsyncTraceName = "vsync callback"; +#else +static constexpr const char* kVsyncTraceName = "VsyncProcessCallback"; +#endif + VsyncWaiter::VsyncWaiter(TaskRunners task_runners) : task_runners_(std::move(task_runners)) {} @@ -102,7 +120,7 @@ void VsyncWaiter::FireCallback(fml::TimePoint frame_start_time, task_runners_.GetUITaskRunner()->PostTaskForTime( [callback, flow_identifier, frame_start_time, frame_target_time]() { - FML_TRACE_EVENT("flutter", "VsyncProcessCallback", "StartTime", + FML_TRACE_EVENT("flutter", kVsyncTraceName, "StartTime", frame_start_time, "TargetTime", frame_target_time); fml::tracing::TraceEventAsyncComplete( "flutter", "VsyncSchedulingOverhead", fml::TimePoint::Now(), From 85e6b01ae263027029c3e747e532fda723c4bb44 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 18:36:02 -0400 Subject: [PATCH 38/58] Roll src/third_party/dart 33349076ee7f..7c2f62406bef (23 commits) (#17120) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 122 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index 4bb772c20c8a0..6d8734489bff4 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '33349076ee7f54594ddce79bc9012cca1b969401', + 'dart_revision': '7c2f62406befdf7c7617adae528c34af555ce28b', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 864d07e26600c..537d0aa7635f9 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 97daf653c9cb0ff8cbbe5b9d1d9bbecb +Signature: c2eb95900c9aba2c31dc8e801e8a1e50 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From d7a00b8b09b09d299f12ff0709438896153082a6 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Thu, 12 Mar 2020 23:06:01 -0400 Subject: [PATCH 39/58] Roll src/third_party/dart 7c2f62406bef..eb9c26bd378f (15 commits) (#17124) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6d8734489bff4..0838dac70474f 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': '7c2f62406befdf7c7617adae528c34af555ce28b', + 'dart_revision': 'eb9c26bd378fbe3a0ebd00ce91973b49814d32be', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From f746b01c402ebf9fc66a3940a70081073f660291 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 04:51:01 -0400 Subject: [PATCH 40/58] Roll fuchsia/sdk/core/mac-amd64 from lbDph... to eGWV8... (#17126) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 0838dac70474f..8abab8f7de9ca 100644 --- a/DEPS +++ b/DEPS @@ -536,7 +536,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/mac-amd64', - 'version': 'lbDphe6fwzSy_UkGn1QzPBk880Wt_zytqn1Y_UNzhTUC' + 'version': 'eGWV8Up-Giv-15K1FBRnkFQompVx2GpVBNomG09my_wC' } ], 'condition': 'host_os == "mac"', From af426986b337df4d981ac1afbffd5bd361375eae Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 05:31:01 -0400 Subject: [PATCH 41/58] Roll fuchsia/sdk/core/linux-amd64 from _k1WT... to Fjow3... (#17127) --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++++-------------- 3 files changed, 126 insertions(+), 122 deletions(-) diff --git a/DEPS b/DEPS index 8abab8f7de9ca..d5514e2d9acea 100644 --- a/DEPS +++ b/DEPS @@ -556,7 +556,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': '_k1WTHeM30_S5dWsoHq7Sr6pFXXrNNWTNR2jiV0dtd4C' + 'version': 'Fjow3Jhott4ECGpxwFRzF2xbhlF8rAucSM80ebqEo_YC' } ], 'condition': 'host_os == "linux"', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 9795261290023..33976ef1b1079 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 85d90f04f17057452129480aa98ca47a +Signature: 7eddb9ce2a1c65700a052042fa1fa722 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17d812e9a5e1f..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,66 +5142,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5233,66 +5173,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5689,6 +5569,130 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 8e64d3c401fdf86f7b49b03999b41013857ee03a Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 09:26:01 -0400 Subject: [PATCH 42/58] Roll src/third_party/dart eb9c26bd378f..a303769fad9b (4 commits) (#17132) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index d5514e2d9acea..c50a427650bf1 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': 'eb9c26bd378fbe3a0ebd00ce91973b49814d32be', + 'dart_revision': 'a303769fad9b9d7459f3d1b7dd4dad43dfd18926', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py From 1bc65e30591020d45769461b2a2683fc9cf3b0a3 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 09:46:02 -0400 Subject: [PATCH 43/58] Roll src/third_party/skia bb7684276afd..ba96256581c2 (7 commits) (#17133) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index c50a427650bf1..a4df354ab26e9 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'bb7684276afd2c420be1fc4c321cc05986618bbb', + 'skia_revision': 'ba96256581c23b1c794bddbb33e818118871de83', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 21160c36e0e83..a9d64328d0385 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 81ad19fabe38ad403178717a330d4cf3 +Signature: 1d8a4b70195e146218984edd33dc01b4 UNUSED LICENSES: From ecebfb89cace069dc7bf4c9c13e23894666a4903 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 11:43:58 -0400 Subject: [PATCH 44/58] Roll src/third_party/skia ba96256581c2..75e29072e7d6 (2 commits) (#17134) https://skia.googlesource.com/skia.git/+log/ba96256581c2..75e29072e7d6 git log ba96256581c2..75e29072e7d6 --date=short --first-parent --format='%ad %ae %s' 2020-03-13 bryct@amazon.com Implement support for path effects in SkSVGDevice backend. 2020-03-13 robertphillips@google.com Make AAFlatteningConvexPathOp surface its programInfos at record time Created with: gclient setdep -r src/third_party/skia@75e29072e7d6 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md Bug: None Tbr: brianosman@google.com --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index a4df354ab26e9..7eed6d451b726 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'ba96256581c23b1c794bddbb33e818118871de83', + 'skia_revision': '75e29072e7d66944127cc038452cfbf582786c58', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index a9d64328d0385..65daae1d6816c 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 1d8a4b70195e146218984edd33dc01b4 +Signature: 4e705a6f1b3079aa7c683402dd699557 UNUSED LICENSES: From 57e69fe1765b12051e6ea3a3beccbc6f582ff7ef Mon Sep 17 00:00:00 2001 From: MennaFadali <46900400+MennaFadali@users.noreply.github.com> Date: Fri, 13 Mar 2020 16:57:53 +0100 Subject: [PATCH 45/58] Implementing Locale.toLanguageTag in flutter web. (#17131) --- lib/web_ui/lib/src/ui/window.dart | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/web_ui/lib/src/ui/window.dart b/lib/web_ui/lib/src/ui/window.dart index d143c504696c4..f19432c4e0832 100644 --- a/lib/web_ui/lib/src/ui/window.dart +++ b/lib/web_ui/lib/src/ui/window.dart @@ -478,19 +478,17 @@ class Locale { int get hashCode => hashValues(languageCode, scriptCode, countryCode); @override - String toString() { + String toString() => _rawToString('_'); + + // TODO(yjbanov): implement to match flutter native. + String toLanguageTag() => _rawToString('-'); + + String _rawToString(String separator) { final StringBuffer out = StringBuffer(languageCode); - if (scriptCode != null) { - out.write('_$scriptCode'); - } - if (_countryCode != null) { - out.write('_$countryCode'); - } + if (scriptCode != null) out.write('$separator$scriptCode'); + if (_countryCode != null) out.write('$separator$countryCode'); return out.toString(); } - - // TODO(yjbanov): implement to match flutter native. - String toLanguageTag() => '_'; } /// The most basic interface to the host operating system's user interface. From 9226a3881e395b7a7a868a58aca30a06cac0ba1d Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 13:05:06 -0400 Subject: [PATCH 46/58] Roll src/third_party/skia 75e29072e7d6..f9329afa27a0 (4 commits) (#17136) https://skia.googlesource.com/skia.git/+log/75e29072e7d6..f9329afa27a0 git log 75e29072e7d6..f9329afa27a0 --date=short --first-parent --format='%ad %ae %s' 2020-03-13 jvanverth@google.com Revert "Clear out atlases if they haven't been used in a while." 2020-03-13 csmartdalton@google.com Remove instanced draws and simplify GrMesh 2020-03-13 reed@google.com remove legacy virtual from enforcer 2020-03-13 jvanverth@google.com Clear out atlases if they haven't been used in a while. Created with: gclient setdep -r src/third_party/skia@f9329afa27a0 If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/skia-flutter-autoroll Please CC brianosman@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md Bug: None Tbr: brianosman@google.com --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 7eed6d451b726..e6c5beaa0bf3d 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '75e29072e7d66944127cc038452cfbf582786c58', + 'skia_revision': 'f9329afa27a0f27b8a9ec70ca12c8508fad2ad4d', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 65daae1d6816c..99fb68f825324 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 4e705a6f1b3079aa7c683402dd699557 +Signature: 0899d757b42caaaa0708c6649916055a UNUSED LICENSES: From 5e8650316e107b3b0b05135aace26237aaab5af9 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 14:26:02 -0400 Subject: [PATCH 47/58] Roll src/third_party/dart a303769fad9b..c3a0bb086a5a (14 commits) (#17137) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 122 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index e6c5beaa0bf3d..0b523d5c2e6f3 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': 'a303769fad9b9d7459f3d1b7dd4dad43dfd18926', + 'dart_revision': 'c3a0bb086a5a0961b378d974010a795816b8fbf5', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 537d0aa7635f9..3770368fc7017 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: c2eb95900c9aba2c31dc8e801e8a1e50 +Signature: 670060e1656637e100a2c65f4ca63f49 UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 8a6d99f8c5f32781d5a8e85f2660962dcc9d65b2 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 14:41:04 -0400 Subject: [PATCH 48/58] Roll src/third_party/skia f9329afa27a0..e05b1b7229ca (1 commits) (#17138) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index 0b523d5c2e6f3..8ec3b0a0dd340 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'f9329afa27a0f27b8a9ec70ca12c8508fad2ad4d', + 'skia_revision': 'e05b1b7229cab638a91d86700d20ac383ab66462', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 99fb68f825324..28bec6fac8a92 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 0899d757b42caaaa0708c6649916055a +Signature: 8cf885d463a52b94e70ef88d411438ff UNUSED LICENSES: From cf2424bbd289c3322b459b03f0d2b3ffae5e8192 Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Fri, 13 Mar 2020 15:25:01 -0400 Subject: [PATCH 49/58] Canvas: Remove some unused virtuals, and prepare for signature change (#17135) * Canvas: Remove some unused virtuals, and prepare for signature change * Better vertices fix * Add empty placeholders for old signature --- shell/common/canvas_spy.cc | 16 ---------------- shell/common/canvas_spy.h | 21 +++++++-------------- testing/mock_canvas.cc | 16 ---------------- testing/mock_canvas.h | 13 +++++-------- 4 files changed, 12 insertions(+), 54 deletions(-) diff --git a/shell/common/canvas_spy.cc b/shell/common/canvas_spy.cc index 77d9a2f83ad19..d31a86f18d158 100644 --- a/shell/common/canvas_spy.cc +++ b/shell/common/canvas_spy.cc @@ -139,20 +139,6 @@ void DidDrawCanvas::onDrawBitmapRect(const SkBitmap& bitmap, did_draw_ = true; } -void DidDrawCanvas::onDrawBitmapNine(const SkBitmap& bitmap, - const SkIRect& center, - const SkRect& dst, - const SkPaint* paint) { - did_draw_ = true; -} - -void DidDrawCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, - const Lattice& lattice, - const SkRect& dst, - const SkPaint* paint) { - did_draw_ = true; -} - void DidDrawCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top, @@ -201,8 +187,6 @@ void DidDrawCanvas::onDrawDrawable(SkDrawable* drawable, } void DidDrawCanvas::onDrawVerticesObject(const SkVertices* vertices, - const SkVertices::Bone bones[], - int boneCount, SkBlendMode bmode, const SkPaint& paint) { MarkDrawIfNonTransparentPaint(paint); diff --git a/shell/common/canvas_spy.h b/shell/common/canvas_spy.h index bc9da2bd72ae2..0fc466bb05938 100644 --- a/shell/common/canvas_spy.h +++ b/shell/common/canvas_spy.h @@ -153,12 +153,6 @@ class DidDrawCanvas final : public SkCanvasVirtualEnforcer { const SkPaint*, SrcRectConstraint) override; - // |SkCanvasVirtualEnforcer| - void onDrawBitmapLattice(const SkBitmap&, - const Lattice&, - const SkRect&, - const SkPaint*) override; - // |SkCanvasVirtualEnforcer| void onDrawImageLattice(const SkImage*, const Lattice&, @@ -172,15 +166,14 @@ class DidDrawCanvas final : public SkCanvasVirtualEnforcer { const SkPaint*) override; // |SkCanvasVirtualEnforcer| - void onDrawBitmapNine(const SkBitmap&, - const SkIRect& center, - const SkRect& dst, - const SkPaint*) override; - - // |SkCanvasVirtualEnforcer| +#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL + void onDrawVerticesObject(const SkVertices*, + const SkVertices::Bone[], + int, + SkBlendMode, + const SkPaint&) override {} +#endif void onDrawVerticesObject(const SkVertices*, - const SkVertices::Bone bones[], - int boneCount, SkBlendMode, const SkPaint&) override; diff --git a/testing/mock_canvas.cc b/testing/mock_canvas.cc index 581abb8591dae..c1c766b0b610f 100644 --- a/testing/mock_canvas.cc +++ b/testing/mock_canvas.cc @@ -262,13 +262,6 @@ void MockCanvas::onDrawImageNine(const SkImage*, FML_DCHECK(false); } -void MockCanvas::onDrawBitmapNine(const SkBitmap&, - const SkIRect&, - const SkRect&, - const SkPaint*) { - FML_DCHECK(false); -} - void MockCanvas::onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&, @@ -276,16 +269,7 @@ void MockCanvas::onDrawImageLattice(const SkImage*, FML_DCHECK(false); } -void MockCanvas::onDrawBitmapLattice(const SkBitmap&, - const Lattice&, - const SkRect&, - const SkPaint*) { - FML_DCHECK(false); -} - void MockCanvas::onDrawVerticesObject(const SkVertices*, - const SkVertices::Bone[], - int, SkBlendMode, const SkPaint&) { FML_DCHECK(false); diff --git a/testing/mock_canvas.h b/testing/mock_canvas.h index 206fa1eefbcc8..17ef16bfa660e 100644 --- a/testing/mock_canvas.h +++ b/testing/mock_canvas.h @@ -217,21 +217,18 @@ class MockCanvas : public SkCanvasVirtualEnforcer { SkScalar x, SkScalar y, const SkPaint* paint) override; - void onDrawBitmapNine(const SkBitmap&, - const SkIRect&, - const SkRect&, - const SkPaint*) override; void onDrawImageLattice(const SkImage*, const Lattice&, const SkRect&, const SkPaint*) override; - void onDrawBitmapLattice(const SkBitmap&, - const Lattice&, - const SkRect&, - const SkPaint*) override; +#ifdef SK_SUPPORT_LEGACY_DRAWVERTS_VIRTUAL void onDrawVerticesObject(const SkVertices*, const SkVertices::Bone[], int, + SkBlendMode, + const SkPaint&) override {} +#endif + void onDrawVerticesObject(const SkVertices*, SkBlendMode, const SkPaint&) override; void onDrawAtlas(const SkImage*, From 4808acc546b93ed7476add37cff305752b6748ac Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 16:16:02 -0400 Subject: [PATCH 50/58] Roll src/third_party/skia e05b1b7229ca..0bd00f438e97 (2 commits) (#17140) --- DEPS | 2 +- ci/licenses_golden/licenses_skia | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++++++--------------- 3 files changed, 126 insertions(+), 122 deletions(-) diff --git a/DEPS b/DEPS index 8ec3b0a0dd340..6896d35a7781f 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': 'e05b1b7229cab638a91d86700d20ac383ab66462', + 'skia_revision': '0bd00f438e97a26cab6f45375c401f9880945334', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the diff --git a/ci/licenses_golden/licenses_skia b/ci/licenses_golden/licenses_skia index 28bec6fac8a92..2020d0fbc8a06 100644 --- a/ci/licenses_golden/licenses_skia +++ b/ci/licenses_golden/licenses_skia @@ -1,4 +1,4 @@ -Signature: 8cf885d463a52b94e70ef88d411438ff +Signature: bc22be57e83e2768786b3add6df2436a UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 17d812e9a5e1f..1e9e4098040f3 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,66 +5142,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5233,66 +5173,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk - Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5689,6 +5569,130 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk +tonic + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 2f89d07d3f8bf63d1b3e9223851281f721dd30a3 Mon Sep 17 00:00:00 2001 From: George Wright Date: Fri, 13 Mar 2020 13:56:01 -0700 Subject: [PATCH 51/58] Disable flutter_runner_scenic_tests until the instability is resolved (#17141) --- testing/fuchsia/run_tests.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/fuchsia/run_tests.sh b/testing/fuchsia/run_tests.sh index 8026bc3e54849..8bbd5be91b990 100755 --- a/testing/fuchsia/run_tests.sh +++ b/testing/fuchsia/run_tests.sh @@ -49,10 +49,12 @@ done -f flutter_runner_tests-0.far \ -t flutter_runner_tests -./fuchsia_ctl -d $device_name test \ - -f flutter_aot_runner-0.far \ - -f flutter_runner_scenic_tests-0.far \ - -t flutter_runner_scenic_tests +# TODO(https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=47081) +# Re-enable once the crash is resolved +#./fuchsia_ctl -d $device_name test \ +# -f flutter_aot_runner-0.far \ +# -f flutter_runner_scenic_tests-0.far \ +# -t flutter_runner_scenic_tests # TODO(https://github.com/flutter/flutter/issues/50032) Enable after the # Fuchsia message loop migration is complete. From 822593c8bd9b8103c8bb2ad65d8952cef8259843 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 17:36:02 -0400 Subject: [PATCH 52/58] Roll src/third_party/skia 0bd00f438e97..320c32bfa306 (1 commits) (#17142) --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 6896d35a7781f..f0b5246f2022d 100644 --- a/DEPS +++ b/DEPS @@ -26,7 +26,7 @@ vars = { 'skia_git': 'https://skia.googlesource.com', # OCMock is for testing only so there is no google clone 'ocmock_git': 'https://github.com/erikdoe/ocmock.git', - 'skia_revision': '0bd00f438e97a26cab6f45375c401f9880945334', + 'skia_revision': '320c32bfa3062b0c67270667df5e4df1856f176e', # When updating the Dart revision, ensure that all entries that are # dependencies of Dart are also updated to match the entries in the From e48761e5bb05531fc2313351be5610b0c1452ed0 Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Fri, 13 Mar 2020 14:44:27 -0700 Subject: [PATCH 53/58] Reland ImageFiltered bounds fix (#17077) Fix for https://github.com/flutter/flutter/issues/51978 to use the bounds of the filtered result as the layer's paint bounds. --- flow/layers/image_filter_layer.cc | 21 +++++++- flow/layers/image_filter_layer.h | 1 + flow/layers/image_filter_layer_unittests.cc | 56 +++++++++++++++++++-- 3 files changed, 71 insertions(+), 7 deletions(-) diff --git a/flow/layers/image_filter_layer.cc b/flow/layers/image_filter_layer.cc index 119fddc181fb8..212c396b6efbf 100644 --- a/flow/layers/image_filter_layer.cc +++ b/flow/layers/image_filter_layer.cc @@ -11,9 +11,22 @@ ImageFilterLayer::ImageFilterLayer(sk_sp filter) void ImageFilterLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) { + TRACE_EVENT0("flutter", "ImageFilterLayer::Preroll"); + Layer::AutoPrerollSaveLayerState save = Layer::AutoPrerollSaveLayerState::Create(context); - ContainerLayer::Preroll(context, matrix); + + child_paint_bounds_ = SkRect::MakeEmpty(); + PrerollChildren(context, matrix, &child_paint_bounds_); + if (filter_) { + const SkIRect filter_input_bounds = child_paint_bounds_.roundOut(); + SkIRect filter_output_bounds = + filter_->filterBounds(filter_input_bounds, SkMatrix::I(), + SkImageFilter::kForward_MapDirection); + set_paint_bounds(SkRect::Make(filter_output_bounds)); + } else { + set_paint_bounds(child_paint_bounds_); + } if (!context->has_platform_view && context->raster_cache && SkRect::Intersects(context->cull_rect, paint_bounds())) { @@ -48,8 +61,12 @@ void ImageFilterLayer::Paint(PaintContext& context) const { SkPaint paint; paint.setImageFilter(filter_); + // Normally a save_layer is sized to the current layer bounds, but in this + // case the bounds of the child may not be the same as the filtered version + // so we use the child_paint_bounds_ which were snapshotted from the + // Preroll on the children before we adjusted them based on the filter. Layer::AutoSaveLayer save_layer = - Layer::AutoSaveLayer::Create(context, paint_bounds(), &paint); + Layer::AutoSaveLayer::Create(context, child_paint_bounds_, &paint); PaintChildren(context); } diff --git a/flow/layers/image_filter_layer.h b/flow/layers/image_filter_layer.h index 30ec99935ff0a..8e40a9ab339ba 100644 --- a/flow/layers/image_filter_layer.h +++ b/flow/layers/image_filter_layer.h @@ -21,6 +21,7 @@ class ImageFilterLayer : public ContainerLayer { private: sk_sp filter_; + SkRect child_paint_bounds_; FML_DISALLOW_COPY_AND_ASSIGN(ImageFilterLayer); }; diff --git a/flow/layers/image_filter_layer_unittests.cc b/flow/layers/image_filter_layer_unittests.cc index 63357fbd89ce8..f4f621a529a08 100644 --- a/flow/layers/image_filter_layer_unittests.cc +++ b/flow/layers/image_filter_layer_unittests.cc @@ -83,8 +83,47 @@ TEST_F(ImageFilterLayerTest, SimpleFilter) { auto layer = std::make_shared(layer_filter); layer->Add(mock_layer); + const SkRect child_rounded_bounds = + SkRect::MakeLTRB(5.0f, 6.0f, 21.0f, 22.0f); + layer->Preroll(preroll_context(), initial_transform); - EXPECT_EQ(layer->paint_bounds(), child_bounds); + EXPECT_EQ(layer->paint_bounds(), child_rounded_bounds); + EXPECT_TRUE(layer->needs_painting()); + EXPECT_EQ(mock_layer->parent_matrix(), initial_transform); + + SkPaint filter_paint; + filter_paint.setImageFilter(layer_filter); + layer->Paint(paint_context()); + EXPECT_EQ(mock_canvas().draw_calls(), + std::vector({ + MockCanvas::DrawCall{0, MockCanvas::SaveData{1}}, + MockCanvas::DrawCall{1, MockCanvas::SetMatrixData{SkMatrix()}}, + MockCanvas::DrawCall{ + 1, MockCanvas::SaveLayerData{child_bounds, filter_paint, + nullptr, 2}}, + MockCanvas::DrawCall{ + 2, MockCanvas::DrawPathData{child_path, child_paint}}, + MockCanvas::DrawCall{2, MockCanvas::RestoreData{1}}, + MockCanvas::DrawCall{1, MockCanvas::RestoreData{0}}, + })); +} + +TEST_F(ImageFilterLayerTest, SimpleFilterBounds) { + const SkMatrix initial_transform = SkMatrix::MakeTrans(0.5f, 1.0f); + const SkRect child_bounds = SkRect::MakeLTRB(5.0f, 6.0f, 20.5f, 21.5f); + const SkPath child_path = SkPath().addRect(child_bounds); + const SkPaint child_paint = SkPaint(SkColors::kYellow); + const SkMatrix filter_transform = SkMatrix::MakeScale(2.0, 2.0); + auto layer_filter = SkImageFilter::MakeMatrixFilter( + filter_transform, SkFilterQuality::kMedium_SkFilterQuality, nullptr); + auto mock_layer = std::make_shared(child_path, child_paint); + auto layer = std::make_shared(layer_filter); + layer->Add(mock_layer); + + const SkRect filter_bounds = SkRect::MakeLTRB(10.0f, 12.0f, 42.0f, 44.0f); + + layer->Preroll(preroll_context(), initial_transform); + EXPECT_EQ(layer->paint_bounds(), filter_bounds); EXPECT_TRUE(layer->needs_painting()); EXPECT_EQ(mock_layer->parent_matrix(), initial_transform); @@ -123,10 +162,12 @@ TEST_F(ImageFilterLayerTest, MultipleChildren) { SkRect children_bounds = child_path1.getBounds(); children_bounds.join(child_path2.getBounds()); + SkRect children_rounded_bounds = SkRect::Make(children_bounds.roundOut()); + layer->Preroll(preroll_context(), initial_transform); EXPECT_EQ(mock_layer1->paint_bounds(), child_path1.getBounds()); EXPECT_EQ(mock_layer2->paint_bounds(), child_path2.getBounds()); - EXPECT_EQ(layer->paint_bounds(), children_bounds); + EXPECT_EQ(layer->paint_bounds(), children_rounded_bounds); EXPECT_TRUE(mock_layer1->needs_painting()); EXPECT_TRUE(mock_layer2->needs_painting()); EXPECT_TRUE(layer->needs_painting()); @@ -172,12 +213,17 @@ TEST_F(ImageFilterLayerTest, Nested) { layer1->Add(layer2); SkRect children_bounds = child_path1.getBounds(); - children_bounds.join(child_path2.getBounds()); + children_bounds.join(SkRect::Make(child_path2.getBounds().roundOut())); + const SkRect children_rounded_bounds = + SkRect::Make(children_bounds.roundOut()); + const SkRect mock_layer2_rounded_bounds = + SkRect::Make(child_path2.getBounds().roundOut()); + layer1->Preroll(preroll_context(), initial_transform); EXPECT_EQ(mock_layer1->paint_bounds(), child_path1.getBounds()); EXPECT_EQ(mock_layer2->paint_bounds(), child_path2.getBounds()); - EXPECT_EQ(layer1->paint_bounds(), children_bounds); - EXPECT_EQ(layer2->paint_bounds(), mock_layer2->paint_bounds()); + EXPECT_EQ(layer1->paint_bounds(), children_rounded_bounds); + EXPECT_EQ(layer2->paint_bounds(), mock_layer2_rounded_bounds); EXPECT_TRUE(mock_layer1->needs_painting()); EXPECT_TRUE(mock_layer2->needs_painting()); EXPECT_TRUE(layer1->needs_painting()); From 516d84a94fdce8b8012a9b1cc446838e29375b74 Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 19:11:03 -0400 Subject: [PATCH 54/58] Roll fuchsia/sdk/core/linux-amd64 from Fjow3... to 6ds94... (#17144) --- DEPS | 2 +- ci/licenses_golden/licenses_fuchsia | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DEPS b/DEPS index f0b5246f2022d..f68906b94fd62 100644 --- a/DEPS +++ b/DEPS @@ -556,7 +556,7 @@ deps = { 'packages': [ { 'package': 'fuchsia/sdk/core/linux-amd64', - 'version': 'Fjow3Jhott4ECGpxwFRzF2xbhlF8rAucSM80ebqEo_YC' + 'version': '6ds94xRmD_5jjJ9jn1pngltBcWUyduH4JF-PxklsD50C' } ], 'condition': 'host_os == "linux"', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 33976ef1b1079..1505d52a98e43 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -1,4 +1,4 @@ -Signature: 7eddb9ce2a1c65700a052042fa1fa722 +Signature: 8f652d8bf0e8a2e1e3edcf50cf29c0e8 UNUSED LICENSES: From 5688a1a3267856ea7cc982f332dd096a0007853e Mon Sep 17 00:00:00 2001 From: skia-flutter-autoroll Date: Fri, 13 Mar 2020 19:26:02 -0400 Subject: [PATCH 55/58] Roll src/third_party/dart c3a0bb086a5a..7c5059f52881 (10 commits) (#17145) --- DEPS | 2 +- ci/licenses_golden/licenses_third_party | 2 +- sky/packages/sky_engine/LICENSE | 244 ++++++++++++------------ 3 files changed, 122 insertions(+), 126 deletions(-) diff --git a/DEPS b/DEPS index f68906b94fd62..4e409a0cf54a5 100644 --- a/DEPS +++ b/DEPS @@ -34,7 +34,7 @@ vars = { # 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': 'c3a0bb086a5a0961b378d974010a795816b8fbf5', + 'dart_revision': '7c5059f528814e14dc9ff29ee1629b922daf77a4', # WARNING: DO NOT EDIT MANUALLY # The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py diff --git a/ci/licenses_golden/licenses_third_party b/ci/licenses_golden/licenses_third_party index 3770368fc7017..623596773cb06 100644 --- a/ci/licenses_golden/licenses_third_party +++ b/ci/licenses_golden/licenses_third_party @@ -1,4 +1,4 @@ -Signature: 670060e1656637e100a2c65f4ca63f49 +Signature: b2a998d040384765d4bf2b5aa6e318ef UNUSED LICENSES: diff --git a/sky/packages/sky_engine/LICENSE b/sky/packages/sky_engine/LICENSE index 1e9e4098040f3..17d812e9a5e1f 100644 --- a/sky/packages/sky_engine/LICENSE +++ b/sky/packages/sky_engine/LICENSE @@ -5142,6 +5142,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2015 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2016 The Fuchsia Authors. All rights reserved. Copyright (c) 2009 Corey Tabaka @@ -5173,6 +5233,66 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- fuchsia_sdk +Copyright 2017 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + +Copyright 2018 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +fuchsia_sdk + Copyright 2020 The Fuchsia Authors. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -5569,130 +5689,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2015 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2017 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- -fuchsia_sdk -tonic - -Copyright 2018 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR From 1ff81bc11718aaab4265e7f4b9c839ec1acd1ae4 Mon Sep 17 00:00:00 2001 From: xster Date: Fri, 13 Mar 2020 16:34:34 -0700 Subject: [PATCH 56/58] Make a pass through all the embedding javadocs (#17109) --- .../io/flutter/app/FlutterActivity.java | 8 ++- .../io/flutter/app/FlutterApplication.java | 3 + .../io/flutter/app/FlutterPluginRegistry.java | 2 + .../embedding/android/FlutterActivity.java | 56 +++++++++++-------- .../embedding/engine/FlutterEngine.java | 3 +- .../embedding/engine/dart/DartExecutor.java | 3 +- .../flutter/plugin/common/PluginRegistry.java | 3 + .../android/io/flutter/view/FlutterMain.java | 6 +- .../android/io/flutter/view/FlutterView.java | 7 ++- 9 files changed, 61 insertions(+), 30 deletions(-) diff --git a/shell/platform/android/io/flutter/app/FlutterActivity.java b/shell/platform/android/io/flutter/app/FlutterActivity.java index 6f8c13f46218b..816b0c13e3684 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterActivity.java @@ -15,7 +15,13 @@ import io.flutter.view.FlutterNativeView; import io.flutter.view.FlutterView; -/** Base class for activities that use Flutter. */ +/** + * Deprecated base class for activities that use Flutter. + * + *

Deprecation: {@link io.flutter.embedding.android.FlutterActivity} is the new API that now + * replaces this class. See https://flutter.dev/go/android-project-migration for more migration + * details. + */ public class FlutterActivity extends Activity implements FlutterView.Provider, PluginRegistry, ViewFactory { private static final String TAG = "FlutterActivity"; diff --git a/shell/platform/android/io/flutter/app/FlutterApplication.java b/shell/platform/android/io/flutter/app/FlutterApplication.java index 1a5716d3c6d5b..1dc11e868c8d3 100644 --- a/shell/platform/android/io/flutter/app/FlutterApplication.java +++ b/shell/platform/android/io/flutter/app/FlutterApplication.java @@ -12,6 +12,9 @@ /** * Flutter implementation of {@link android.app.Application}, managing application-level global * initializations. + * + *

Using this {@link android.app.Application} is not required when using APIs in the package + * {@code io.flutter.embedding.android} since they self-initialize on first use. */ public class FlutterApplication extends Application { @Override diff --git a/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java b/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java index 54d9c801f4f80..b1979694cffdf 100644 --- a/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java +++ b/shell/platform/android/io/flutter/app/FlutterPluginRegistry.java @@ -21,6 +21,8 @@ import java.util.List; import java.util.Map; +/// This class is now deprecated. See https://flutter.dev/go/android-project-migration for +/// migration instructions. public class FlutterPluginRegistry implements PluginRegistry, PluginRegistry.RequestPermissionsResultListener, diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java index fa74bc53fd7d5..cb88fa4430e25 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java @@ -51,11 +51,27 @@ *

{@code FlutterActivity} is the simplest and most direct way to integrate Flutter within an * Android app. * + *

FlutterActivity responsibilities + * + *

{@code FlutterActivity} maintains the following responsibilities: + * + *

    + *
  • Displays an Android launch screen. + *
  • Displays a Flutter splash screen. + *
  • Configures the status bar appearance. + *
  • Chooses the Dart execution app bundle path and entrypoint. + *
  • Chooses Flutter's initial route. + *
  • Renders {@code Activity} transparently, if desired. + *
  • Offers hooks for subclasses to provide and configure a {@link FlutterEngine}. + *
+ * *

Dart entrypoint, initial route, and app bundle path * *

The Dart entrypoint executed within this {@code Activity} is "main()" by default. To change * the entrypoint that a {@code FlutterActivity} executes, subclass {@code FlutterActivity} and - * override {@link #getDartEntrypointFunctionName()}. + * override {@link #getDartEntrypointFunctionName()}. For non-main Dart entrypoints to not be + * tree-shaken away, you need to annotate those functions with {@code @pragma('vm:entry-point')} in + * Dart. * *

The Flutter route that is initially loaded within this {@code Activity} is "/". The initial * route may be specified explicitly by passing the name of the route as a {@code String} in {@link @@ -73,11 +89,8 @@ *

  • {@link #getInitialRoute()} * * - *

    The Dart entrypoint and app bundle path are not supported as {@code Intent} parameters due to - * security concerns. If such configurations were exposed via {@code Intent}, then a {@code - * FlutterActivity} that is {@code exported} from your Android app would allow other apps to invoke - * arbitrary Dart entrypoints in your app by specifying different Dart entrypoints for your {@code - * FlutterActivity}. Therefore, these configurations are not available via {@code Intent}. + *

    The Dart entrypoint and app bundle path are not supported as {@code Intent} parameters since + * your Dart library entrypoints are your private APIs and Intents are invocable by other processes. * *

    Using a cached FlutterEngine * @@ -85,8 +98,10 @@ * new one. Use {@link #withCachedEngine(String)} to build a {@code FlutterActivity} {@code Intent} * that is configured to use an existing, cached {@link FlutterEngine}. {@link * io.flutter.embedding.engine.FlutterEngineCache} is the cache that is used to obtain a given - * cached {@link FlutterEngine}. An {@code IllegalStateException} will be thrown if a cached engine - * is requested but does not exist in the cache. + * cached {@link FlutterEngine}. You must create and put a {@link FlutterEngine} into the {@link + * io.flutter.embedding.engine.FlutterEngineCache} yourself before using the {@link + * #withCachedEngine(String)} builder. An {@code IllegalStateException} will be thrown if a cached + * engine is requested but does not exist in the cache. * *

    When using a cached {@link FlutterEngine}, that {@link FlutterEngine} should already be * executing Dart code, which means that the Dart entrypoint and initial route have already been @@ -105,6 +120,9 @@ *

  • When you are unsure when/if you will need to display a Flutter experience. * * + *

    See https://flutter.dev/docs/development/add-to-app/performance for additional performance + * explorations on engine loading. + * *

    The following illustrates how to pre-warm and cache a {@link FlutterEngine}: * *

    {@code
    @@ -126,20 +144,6 @@
      * FlutterView}. Using a {@link FlutterView} requires forwarding some calls from an {@code
      * Activity}, as well as forwarding lifecycle calls from an {@code Activity} or a {@code Fragment}.
      *
    - * 

    FlutterActivity responsibilities - * - *

    {@code FlutterActivity} maintains the following responsibilities: - * - *

      - *
    • Displays an Android launch screen. - *
    • Displays a Flutter splash screen. - *
    • Configures the status bar appearance. - *
    • Chooses the Dart execution app bundle path and entrypoint. - *
    • Chooses Flutter's initial route. - *
    • Renders {@code Activity} transparently, if desired. - *
    • Offers hooks for subclasses to provide and configure a {@link FlutterEngine}. - *
    - * *

    Launch Screen and Splash Screen * *

    {@code FlutterActivity} supports the display of an Android "launch screen" as well as a @@ -196,8 +200,12 @@ public class FlutterActivity extends Activity private static final String TAG = "FlutterActivity"; /** - * Creates an {@link Intent} that launches a {@code FlutterActivity}, which executes a {@code - * main()} Dart entrypoint, and displays the "/" route as Flutter's initial route. + * Creates an {@link Intent} that launches a {@code FlutterActivity}, which creates a {@link + * FlutterEngine} that executes a {@code main()} Dart entrypoint, and displays the "/" route as + * Flutter's initial route. + * + *

    Consider using the {@link #withCachedEngine(String)} {@link Intent} builder to control when + * the {@link FlutterEngine} should be created in your application. */ @NonNull public static Intent createDefaultIntent(@NonNull Context launchContext) { diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index 0c094e0bb1e7f..b817618c72108 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -44,7 +44,8 @@ * interaction. * *

    Multiple {@code FlutterEngine}s may exist, execute Dart code, and render UIs within a single - * Android app. + * Android app. Flutter at this point makes no guarantees on the performance of running multiple + * engines. Use at your own risk. See https://github.com/flutter/flutter/issues/37644 for details. * *

    To start running Dart and/or Flutter within this {@code FlutterEngine}, get a reference to * this engine's {@link DartExecutor} and then use {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java index 4ae449a3d1f69..edf9ef9adbdd9 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java @@ -26,8 +26,7 @@ * *

    To specify a Dart callback to execute, use a {@link DartCallback}. A given Dart callback must * be registered with the Dart VM to be invoked by a {@link DartExecutor}. To execute the callback, - * pass the {@link DartCallback} to {@link #executeDartCallback(DartCallback)}. TODO(mattcarroll): - * add a reference to docs about background/plugin execution + * pass the {@link DartCallback} to {@link #executeDartCallback(DartCallback)}. * *

    Once started, a {@link DartExecutor} cannot be stopped. The associated Dart code will execute * until it completes, or until the {@link io.flutter.embedding.engine.FlutterEngine} that owns this diff --git a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java index f0082bc667488..abd06c30f2f49 100644 --- a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java +++ b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java @@ -24,6 +24,9 @@ * registrant class is, again by default, called from the application's main {@link Activity}, which * defaults to an instance of {@link io.flutter.app.FlutterActivity}, itself a {@link * PluginRegistry}. + * + *

    This class is now deprecated. See https://flutter.dev/go/android-project-migration for + * migration details. */ public interface PluginRegistry { /** diff --git a/shell/platform/android/io/flutter/view/FlutterMain.java b/shell/platform/android/io/flutter/view/FlutterMain.java index 34a9a2582c1cc..bbcea46b3775e 100644 --- a/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/shell/platform/android/io/flutter/view/FlutterMain.java @@ -11,7 +11,11 @@ import android.support.annotation.VisibleForTesting; import io.flutter.embedding.engine.loader.FlutterLoader; -/** A class to intialize the Flutter engine. */ +/** + * A legacy class to initialize the Flutter engine. + * + *

    Replaced by {@link io.flutter.embedding.engine.loader.FlutterLoader}. + */ public class FlutterMain { public static class Settings { diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index 55977a0f42b02..98066479053f0 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -60,7 +60,12 @@ import java.util.Locale; import java.util.concurrent.atomic.AtomicLong; -/** An Android view containing a Flutter app. */ +/** + * Deprecated Android view containing a Flutter app. + * + *

    Deprecation: {@link io.flutter.embedding.android.FlutterView} is the new API that now replaces + * this class. See https://flutter.dev/go/android-project-migration for more migration details. + */ public class FlutterView extends SurfaceView implements BinaryMessenger, TextureRegistry { /** * Interface for those objects that maintain and expose a reference to a {@code FlutterView} (such From cedddb7075f212578dfab18ccfff2b5006b51c98 Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Fri, 13 Mar 2020 18:55:58 -0700 Subject: [PATCH 57/58] Document texture registry threading requirements. (#17149) --- .../darwin/common/framework/Headers/FlutterTexture.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/platform/darwin/common/framework/Headers/FlutterTexture.h b/shell/platform/darwin/common/framework/Headers/FlutterTexture.h index cfda1e2df83d7..962972025e2f4 100644 --- a/shell/platform/darwin/common/framework/Headers/FlutterTexture.h +++ b/shell/platform/darwin/common/framework/Headers/FlutterTexture.h @@ -38,7 +38,8 @@ FLUTTER_EXPORT @protocol FlutterTextureRegistry /** * Registers a `FlutterTexture` for usage in Flutter and returns an id that can be used to reference - * that texture when calling into Flutter with channels. + * that texture when calling into Flutter with channels. Textures must be registered on the + * platform thread. */ - (int64_t)registerTexture:(NSObject*)texture; /** @@ -48,7 +49,8 @@ FLUTTER_EXPORT */ - (void)textureFrameAvailable:(int64_t)textureId; /** - * Unregisters a `FlutterTexture` that has previously regeistered with `registerTexture:`. + * Unregisters a `FlutterTexture` that has previously regeistered with `registerTexture:`. Textures + * must be unregistered on the the platform thread. * * @param textureId The result that was previously returned from `registerTexture:`. */ From 025e2d82dda54af7f33a0d511bde47ec835593b1 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Fri, 13 Mar 2020 21:19:24 -0700 Subject: [PATCH 58/58] Migrate embedding to AndroidX (#17075) --- DEPS | 15 +- ci/licenses_golden/licenses_fuchsia | 290 +++++++++--------- ci/licenses_golden/tool_signature | 2 +- shell/platform/android/BUILD.gn | 52 ++-- .../android/embedding_bundle/.gitignore | 3 + .../android/embedding_bundle/build.gradle | 22 +- shell/platform/android/io/flutter/Log.java | 2 +- .../io/flutter/app/FlutterActivity.java | 2 +- .../io/flutter/app/FlutterApplication.java | 2 +- .../flutter/app/FlutterFragmentActivity.java | 4 +- .../android/AndroidKeyProcessor.java | 4 +- .../android/AndroidTouchProcessor.java | 4 +- .../android/DrawableSplashScreen.java | 4 +- .../embedding/android/FlutterActivity.java | 12 +- .../FlutterActivityAndFragmentDelegate.java | 8 +- .../android/FlutterEngineConfigurator.java | 6 +- .../android/FlutterEngineProvider.java | 4 +- .../embedding/android/FlutterFragment.java | 12 +- .../android/FlutterFragmentActivity.java | 8 +- .../embedding/android/FlutterSplashView.java | 6 +- .../embedding/android/FlutterSurfaceView.java | 4 +- .../embedding/android/FlutterTextureView.java | 4 +- .../embedding/android/FlutterView.java | 8 +- .../embedding/android/SplashScreen.java | 4 +- .../android/SplashScreenProvider.java | 2 +- .../embedding/engine/FlutterEngine.java | 4 +- .../embedding/engine/FlutterEngineCache.java | 6 +- .../engine/FlutterEnginePluginRegistry.java | 6 +- .../flutter/embedding/engine/FlutterJNI.java | 10 +- .../embedding/engine/FlutterShellArgs.java | 2 +- .../embedding/engine/dart/DartExecutor.java | 6 +- .../embedding/engine/dart/DartMessenger.java | 6 +- .../engine/dart/PlatformMessageHandler.java | 4 +- .../engine/loader/FlutterLoader.java | 4 +- .../engine/loader/ResourceExtractor.java | 4 +- .../engine/plugins/FlutterPlugin.java | 4 +- .../engine/plugins/PluginRegistry.java | 4 +- .../plugins/activity/ActivityAware.java | 2 +- .../activity/ActivityControlSurface.java | 6 +- .../activity/ActivityPluginBinding.java | 4 +- .../BroadcastReceiverAware.java | 2 +- .../BroadcastReceiverControlSurface.java | 4 +- .../BroadcastReceiverPluginBinding.java | 2 +- .../contentprovider/ContentProviderAware.java | 2 +- .../ContentProviderControlSurface.java | 4 +- .../ContentProviderPluginBinding.java | 2 +- .../lifecycle/HiddenLifecycleReference.java | 6 +- .../engine/plugins/service/ServiceAware.java | 2 +- .../service/ServiceControlSurface.java | 6 +- .../plugins/service/ServicePluginBinding.java | 4 +- .../plugins/shim/ShimPluginRegistry.java | 18 +- .../engine/plugins/shim/ShimRegistrar.java | 2 +- .../engine/renderer/FlutterRenderer.java | 4 +- .../engine/renderer/RenderSurface.java | 4 +- .../systemchannels/AccessibilityChannel.java | 4 +- .../systemchannels/KeyEventChannel.java | 4 +- .../systemchannels/LifecycleChannel.java | 2 +- .../systemchannels/LocalizationChannel.java | 2 +- .../systemchannels/NavigationChannel.java | 4 +- .../systemchannels/PlatformChannel.java | 6 +- .../systemchannels/PlatformViewsChannel.java | 4 +- .../systemchannels/SettingsChannel.java | 2 +- .../engine/systemchannels/SystemChannel.java | 2 +- .../systemchannels/TextInputChannel.java | 4 +- .../plugin/common/BasicMessageChannel.java | 6 +- .../plugin/common/BinaryMessenger.java | 6 +- .../flutter/plugin/common/ErrorLogResult.java | 2 +- .../flutter/plugin/common/EventChannel.java | 2 +- .../flutter/plugin/common/MessageCodec.java | 2 +- .../io/flutter/plugin/common/MethodCall.java | 2 +- .../flutter/plugin/common/MethodChannel.java | 6 +- .../flutter/plugin/common/PluginRegistry.java | 2 +- .../plugin/editing/TextInputPlugin.java | 6 +- .../platform/AccessibilityEventsDelegate.java | 4 +- .../plugin/platform/PlatformPlugin.java | 6 +- .../flutter/plugin/platform/PlatformView.java | 2 +- .../platform/PlatformViewsController.java | 6 +- .../platform/SingleViewPresentation.java | 6 +- .../platform/VirtualDisplayController.java | 2 +- .../io/flutter/view/AccessibilityBridge.java | 6 +- .../view/AccessibilityViewEmbedder.java | 6 +- .../view/FlutterCallbackInformation.java | 4 +- .../android/io/flutter/view/FlutterMain.java | 6 +- .../io/flutter/view/FlutterNativeView.java | 4 +- .../android/io/flutter/view/FlutterView.java | 6 +- .../android/io/flutter/view/VsyncWaiter.java | 2 +- ...lutterActivityAndFragmentDelegateTest.java | 4 +- .../android/FlutterActivityTest.java | 4 +- .../android/FlutterAndroidComponentTest.java | 6 +- .../FlutterEnginePluginRegistryTest.java | 2 +- .../embedding/engine/PluginComponentTest.java | 2 +- .../editing/InputConnectionAdaptorTest.java | 15 +- .../plugins/GeneratedPluginRegistrant.java | 2 +- testing/run_tests.py | 6 +- testing/scenario_app/android/app/build.gradle | 16 +- .../scenarios/EngineLaunchE2ETest.java | 6 +- .../scenarios/ExampleInstrumentedTest.java | 4 +- .../dev/flutter/scenarios/BlankActivity.java | 2 +- .../scenarios/TextPlatformViewActivity.java | 2 +- .../scenarios/TextPlatformViewFactory.java | 2 +- .../download_android_support.py | 55 ---- tools/android_support/files.json | 65 ---- tools/androidx/files.json | 53 ++++ .../generate_pom_file.py | 0 tools/gen_javadoc.py | 9 +- tools/licenses/lib/main.dart | 4 +- 106 files changed, 454 insertions(+), 551 deletions(-) create mode 100644 shell/platform/android/embedding_bundle/.gitignore delete mode 100644 tools/android_support/download_android_support.py delete mode 100644 tools/android_support/files.json create mode 100644 tools/androidx/files.json rename tools/{android_support => androidx}/generate_pom_file.py (100%) diff --git a/DEPS b/DEPS index 4e409a0cf54a5..92e3f4f7dfb4e 100644 --- a/DEPS +++ b/DEPS @@ -497,11 +497,11 @@ deps = { 'dep_type': 'cipd', }, - 'src/third_party/robolectric': { + 'src/third_party/android_embedding_dependencies': { 'packages': [ { - 'package': 'flutter/android/robolectric_bundle', - 'version': 'last_updated:2019-09-09T16:47:38-0700' + 'package': 'flutter/android/embedding_bundle', + 'version': 'last_updated:2020-03-13T15:42:26-0700' } ], 'condition': 'download_android_deps', @@ -593,15 +593,6 @@ hooks = [ 'pattern': '.', 'action': ['python', 'src/build/vs_toolchain.py', 'update'], }, - { - 'name': 'download_android_support', - 'pattern': '.', - 'condition': 'download_android_deps', - 'action': [ - 'python', - 'src/flutter/tools/android_support/download_android_support.py', - ], - }, { 'name': 'generate_package_files', 'pattern': '.', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 1505d52a98e43..336439ae8a093 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -3086,6 +3086,151 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: fuchsia_sdk +ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h + ../../../fuchsia/sdk/linux/LICENSE +TYPE: LicenseType.bsd +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/assert.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/compiler.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/driver/binding.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/i2c.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/audio.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hid.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hub.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/ums.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/listnode.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/pixelformat.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/processargs.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/status.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/debug.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/exception.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/log.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/object.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/pci.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/port.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/profile.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/resource.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/types.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/types.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/assert.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/netboot.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/compiler.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/driver/binding.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/i2c.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/audio.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hid.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hub.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/ums.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/listnode.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/pixelformat.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/processargs.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/status.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/debug.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/exception.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/log.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/object.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/pci.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/port.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/profile.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/resource.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/types.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/types.h +FILE: ../../../fuchsia/sdk/linux/dart/fidl/lib/src/interface.dart +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.runner/component_runner.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.fonts/font_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.math/math.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/problem.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/seeking_reader.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media/audio.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/base_shell.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/user_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_context.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/focus.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/session_shell.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_info.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.net.oldhttp/url_body.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/component_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/launcher.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/loader.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/runner.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.tracing.provider/provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.ui.policy/presenter.fidl +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/fdio.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/io.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/vfs.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/watcher.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_function.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_rate.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_function.cc +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_rate.cc +FILE: ../../../fuchsia/sdk/linux/pkg/sync/include/lib/sync/completion.h +FILE: ../../../fuchsia/sdk/linux/pkg/sys_cpp/include/lib/sys/cpp/termination_reason.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/channel.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/event.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/eventpair.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/channel.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/event.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/eventpair.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/job.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object_traits.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/port.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/process.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/socket.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/task.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/thread.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/time.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmar.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmo.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/job.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/port.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/process.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/socket.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/thread.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmar.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmo.cc +---------------------------------------------------------------------------------------------------- +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +==================================================================================================== + ==================================================================================================== LIBRARY: fuchsia_sdk ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/string_view.h + ../../../fuchsia/sdk/linux/LICENSE @@ -3330,151 +3475,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -==================================================================================================== - -==================================================================================================== -LIBRARY: fuchsia_sdk -ORIGIN: ../../../third_party/tonic/LICENSE -TYPE: LicenseType.bsd -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/assert.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/compiler.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/driver/binding.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/i2c.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/audio.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hid.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hub.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/ums.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/listnode.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/pixelformat.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/processargs.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/status.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/debug.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/exception.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/log.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/object.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/pci.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/port.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/profile.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/resource.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/types.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/types.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/assert.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/netboot.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/compiler.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/driver/binding.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/i2c.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/audio.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hid.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hub.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/ums.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/listnode.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/pixelformat.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/processargs.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/status.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/debug.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/exception.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/log.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/object.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/pci.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/port.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/profile.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/resource.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/types.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/types.h -FILE: ../../../fuchsia/sdk/linux/dart/fidl/lib/src/interface.dart -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.runner/component_runner.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.fonts/font_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.math/math.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/problem.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/seeking_reader.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media/audio.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/base_shell.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/user_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_context.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/focus.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/session_shell.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_info.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.net.oldhttp/url_body.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/component_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/launcher.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/loader.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/runner.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.tracing.provider/provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.ui.policy/presenter.fidl -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/fdio.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/io.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/vfs.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/watcher.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_function.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_rate.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_function.cc -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_rate.cc -FILE: ../../../fuchsia/sdk/linux/pkg/sync/include/lib/sync/completion.h -FILE: ../../../fuchsia/sdk/linux/pkg/sys_cpp/include/lib/sys/cpp/termination_reason.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/channel.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/event.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/eventpair.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/channel.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/event.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/eventpair.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/job.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object_traits.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/port.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/process.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/socket.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/task.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/thread.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/time.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmar.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmo.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/job.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/port.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/process.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/socket.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/thread.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmar.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmo.cc ----------------------------------------------------------------------------------------------------- -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 732b5d9430cd7..287bc19a08133 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 9ad4afaa43bd81d0e6a011688ca40377 +Signature: c182c713338fa4bfd82bfab82778038b diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index e48562f1a2957..940801e7f3e03 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -228,15 +228,14 @@ android_java_sources = [ "io/flutter/view/VsyncWaiter.java", ] -android_support_jars = [ - "//third_party/android_support/android_support_compat.jar", - "//third_party/android_support/android_support_annotations.jar", - "//third_party/android_support/android_support_fragment.jar", - "//third_party/android_support/android_arch_lifecycle_common.jar", - "//third_party/android_support/android_arch_lifecycle_common_java8.jar", - "//third_party/android_support/android_arch_lifecycle_runtime.jar", - "//third_party/android_support/android_arch_lifecycle_viewmodel.jar", -] +list_script = rebase_path("//build/ls.py", ".", "//") +embedding_dependencies_jars = + exec_script(list_script, + [ + "--target-directory", + rebase_path("//third_party/android_embedding_dependencies"), + ], + "list lines") action("flutter_shell_java") { script = "//build/android/gyp/javac.py" @@ -256,10 +255,7 @@ action("flutter_shell_java") { source_jar_path, source_jar_path + ".md5.stamp", ] - inputs = [ - android_sdk_jar, - ] - inputs += android_support_jars + inputs = [ android_sdk_jar ] + embedding_dependencies_jars _rebased_current_path = rebase_path(".") _rebased_jar_path = rebase_path(jar_path, root_build_dir) @@ -267,7 +263,7 @@ action("flutter_shell_java") { _rebased_depfile = rebase_path(depfile, root_build_dir) _rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) _rebased_classpath = [ _rebased_android_sdk_jar ] + - rebase_path(android_support_jars, root_build_dir) + rebase_path(embedding_dependencies_jars, root_build_dir) args = [ "--depfile=$_rebased_depfile", @@ -357,10 +353,10 @@ action("android_jar") { } action("pom_libflutter") { - script = "//flutter/tools/android_support/generate_pom_file.py" + script = "//flutter/tools/androidx/generate_pom_file.py" inputs = [ - "//flutter/tools/android_support/files.json", + "//flutter/tools/androidx/files.json", ] artifact_id = @@ -381,10 +377,10 @@ action("pom_libflutter") { } action("pom_embedding") { - script = "//flutter/tools/android_support/generate_pom_file.py" + script = "//flutter/tools/androidx/generate_pom_file.py" inputs = [ - "//flutter/tools/android_support/files.json", + "//flutter/tools/androidx/files.json", ] artifact_id = "flutter_embedding_$flutter_runtime_mode" @@ -451,21 +447,9 @@ action("robolectric_tests") { ] _jar_dependencies = [ - android_sdk_jar, - embedding_jar_path, - "//third_party/robolectric/lib/junit-3.8.jar", - "//third_party/robolectric/lib/junit-4.13-beta-3.jar", - "//third_party/robolectric/lib/robolectric-3.8.jar", - "//third_party/robolectric/lib/shadows-framework-3.8.jar", - "//third_party/robolectric/lib/annotations-3.8.jar", - "//third_party/robolectric/lib/shadowapi-3.8.jar", - "//third_party/robolectric/lib/runtime-1.1.1.jar", - "//third_party/robolectric/lib/common-1.1.1.jar", - "//third_party/robolectric/lib/common-java8-1.1.1.jar", - "//third_party/robolectric/lib/support-annotations-28.0.0.jar", - "//third_party/robolectric/lib/support-fragment-25.2.0.jar", - "//third_party/robolectric/lib/mockito-all-1.10.19.jar", - ] + android_sdk_jar, + embedding_jar_path, + ] + embedding_dependencies_jars inputs = _jar_dependencies @@ -532,7 +516,7 @@ zip_bundle("android") { # https://github.com/flutter/flutter/issues/42400 action("gen_android_javadoc") { script = "//flutter/tools/gen_javadoc.py" - sources = android_java_sources + android_support_jars + sources = android_java_sources + embedding_dependencies_jars outputs = [ "$target_gen_dir/javadocs", diff --git a/shell/platform/android/embedding_bundle/.gitignore b/shell/platform/android/embedding_bundle/.gitignore new file mode 100644 index 0000000000000..690c5aed9ff0b --- /dev/null +++ b/shell/platform/android/embedding_bundle/.gitignore @@ -0,0 +1,3 @@ +# Don't include the jars in the engine repo. +lib/ +.gradle diff --git a/shell/platform/android/embedding_bundle/build.gradle b/shell/platform/android/embedding_bundle/build.gradle index 073937ddc3c40..418eac07c5d0c 100644 --- a/shell/platform/android/embedding_bundle/build.gradle +++ b/shell/platform/android/embedding_bundle/build.gradle @@ -44,27 +44,23 @@ android { embedding "androidx.fragment:fragment:1.1.0" def lifecycle_version = "2.2.0" - embedding "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" embedding "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-common:$lifecycle_version" embedding "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-service:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-process:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version" // Testing - embeddingTesting "androidx.arch.core:core-testing:2.1.0" embeddingTesting "org.robolectric:android-all:8.1.0-robolectric-4611349" // This is required by the robolectric test. embeddingTesting_duplicated "org.robolectric:android-all:4.1.2_r1-robolectric-r1" - embeddingTesting "org.robolectric:robolectric:3.8" - embeddingTesting "org.robolectric:junit:3.8" - embeddingTesting "org.robolectric:shadows-framework:3.8" - embeddingTesting "org.robolectric:resources:3.8" embeddingTesting "org.mockito:mockito-all:1.10.19" - embeddingTesting "junit:junit:4.13-beta-3" + embeddingTesting ("org.robolectric:robolectric:4.3") { + // org.hamcrest is added by org.mockito:mockito-all + exclude group: "org.hamcrest", module:"hamcrest-core" + } + embeddingTesting ("junit:junit:4.13") { + // org.hamcrest is added by org.mockito:mockito-all + exclude group: "org.hamcrest", module:"hamcrest-core" + } } } diff --git a/shell/platform/android/io/flutter/Log.java b/shell/platform/android/io/flutter/Log.java index fbc2ec6289838..2fb8d029e79a5 100644 --- a/shell/platform/android/io/flutter/Log.java +++ b/shell/platform/android/io/flutter/Log.java @@ -4,7 +4,7 @@ package io.flutter; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Port of {@link android.util.Log} that only logs in {@link io.flutter.BuildConfig#DEBUG} mode and diff --git a/shell/platform/android/io/flutter/app/FlutterActivity.java b/shell/platform/android/io/flutter/app/FlutterActivity.java index 816b0c13e3684..be689873684a1 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterActivity.java @@ -9,7 +9,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.app.FlutterActivityDelegate.ViewFactory; import io.flutter.plugin.common.PluginRegistry; import io.flutter.view.FlutterNativeView; diff --git a/shell/platform/android/io/flutter/app/FlutterApplication.java b/shell/platform/android/io/flutter/app/FlutterApplication.java index 1dc11e868c8d3..cd55217176ef7 100644 --- a/shell/platform/android/io/flutter/app/FlutterApplication.java +++ b/shell/platform/android/io/flutter/app/FlutterApplication.java @@ -6,7 +6,7 @@ import android.app.Activity; import android.app.Application; -import android.support.annotation.CallSuper; +import androidx.annotation.CallSuper; import io.flutter.view.FlutterMain; /** diff --git a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java index 632348b5264e9..2e881b6148673 100644 --- a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java @@ -8,7 +8,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import io.flutter.app.FlutterActivityDelegate.ViewFactory; import io.flutter.plugin.common.PluginRegistry; import io.flutter.view.FlutterNativeView; @@ -25,7 +25,7 @@ * app to ensure that {@link FragmentActivity} is available at runtime. * * @see https://developer.android.com/topic/libraries/support-library/setup.html + * href="https://developer.android.com/training/testing/set-up-project">https://developer.android.com/training/testing/set-up-project */ public class FlutterFragmentActivity extends FragmentActivity implements FlutterView.Provider, PluginRegistry, ViewFactory { diff --git a/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java b/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java index 2e778ad0e9300..5d823ef8ab674 100644 --- a/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java +++ b/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java @@ -4,10 +4,10 @@ package io.flutter.embedding.android; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.KeyCharacterMap; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.systemchannels.KeyEventChannel; import io.flutter.plugin.editing.TextInputPlugin; diff --git a/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java b/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java index 2c04f366fd491..027b13c53d274 100644 --- a/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java +++ b/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java @@ -1,10 +1,10 @@ package io.flutter.embedding.android; import android.os.Build; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; import android.view.InputDevice; import android.view.MotionEvent; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.renderer.FlutterRenderer; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java b/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java index 43638508203a1..260c1621c5279 100644 --- a/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java +++ b/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java @@ -8,11 +8,11 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * {@link SplashScreen} that displays a given {@link Drawable}, which then fades its alpha to zero diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java index cb88fa4430e25..07089613f0dd1 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java @@ -17,9 +17,6 @@ import static io.flutter.embedding.android.FlutterActivityLaunchConfigs.SPLASH_SCREEN_META_DATA_KEY; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LifecycleRegistry; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; @@ -30,12 +27,15 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.View; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.lifecycle.Lifecycle; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleRegistry; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java index 0ca628ba37866..93ff3e7165e0c 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java @@ -7,17 +7,17 @@ import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.app.FlutterActivity; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java b/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java index 05abf1e15ff05..227770d4b0bd6 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java @@ -5,14 +5,14 @@ package io.flutter.embedding.android; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; /** * Configures a {@link FlutterEngine} after it is created, e.g., adds plugins. * - *

    This interface may be applied to a {@link android.support.v4.app.FragmentActivity} that owns a + *

    This interface may be applied to a {@link androidx.fragment.app.FragmentActivity} that owns a * {@code FlutterFragment}. */ public interface FlutterEngineConfigurator { diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java b/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java index fb7dde98b5410..420e9cc4a5079 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java @@ -5,8 +5,8 @@ package io.flutter.embedding.android; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.FlutterEngine; /** diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java index ff18172ae131a..97ae4a25254ee 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java @@ -5,18 +5,18 @@ package io.flutter.embedding.android; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterShellArgs; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java index 5860d6f8c986d..9a7b6aa7d0925 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java @@ -26,15 +26,15 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java b/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java index b44f08b1f99d2..eefce9d1c8d61 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java @@ -8,12 +8,12 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.renderer.FlutterUiDisplayListener; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java b/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java index 04dc93042ab91..b13bf55cec26b 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java @@ -6,11 +6,11 @@ import android.content.Context; import android.graphics.PixelFormat; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.SurfaceHolder; import android.view.SurfaceView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.renderer.FlutterRenderer; import io.flutter.embedding.engine.renderer.FlutterUiDisplayListener; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java b/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java index a1b47bdda8ef1..9416301b8afd4 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java @@ -6,11 +6,11 @@ import android.content.Context; import android.graphics.SurfaceTexture; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.Surface; import android.view.TextureView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.renderer.FlutterRenderer; import io.flutter.embedding.engine.renderer.RenderSurface; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterView.java b/shell/platform/android/io/flutter/embedding/android/FlutterView.java index 0e1ceb602c4e4..5d782b678ff6f 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterView.java @@ -12,10 +12,6 @@ import android.graphics.Rect; import android.os.Build; import android.os.LocaleList; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.annotation.VisibleForTesting; import android.text.format.DateFormat; import android.util.AttributeSet; import android.view.KeyEvent; @@ -27,6 +23,10 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.renderer.FlutterRenderer; diff --git a/shell/platform/android/io/flutter/embedding/android/SplashScreen.java b/shell/platform/android/io/flutter/embedding/android/SplashScreen.java index 8b27f802798d6..0546ded78207b 100644 --- a/shell/platform/android/io/flutter/embedding/android/SplashScreen.java +++ b/shell/platform/android/io/flutter/embedding/android/SplashScreen.java @@ -7,9 +7,9 @@ import android.annotation.SuppressLint; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Splash screen configuration for a given Flutter experience. diff --git a/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java b/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java index c6248fb348219..2e72bdad8cfb9 100644 --- a/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java +++ b/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java @@ -4,7 +4,7 @@ package io.flutter.embedding.android; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; /** * Provides a {@link SplashScreen} to display while Flutter initializes and renders its first frame. diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index b817618c72108..dfd2bd674c57c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -5,8 +5,8 @@ package io.flutter.embedding.engine; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.loader.FlutterLoader; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java index 9006c84aca714..d75ea03a804a4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import java.util.HashMap; import java.util.Map; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java index 89c3c5dc94efe..64a11fa9431d2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java @@ -6,14 +6,14 @@ import android.app.Activity; import android.app.Service; -import android.arch.lifecycle.Lifecycle; import android.content.BroadcastReceiver; import android.content.ContentProvider; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.embedding.engine.loader.FlutterLoader; import io.flutter.embedding.engine.plugins.FlutterPlugin; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java index 183f42c615943..e599281f84137 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java @@ -9,13 +9,13 @@ import android.graphics.Bitmap; import android.graphics.SurfaceTexture; import android.os.Looper; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; -import android.support.annotation.VisibleForTesting; import android.view.Surface; import android.view.SurfaceHolder; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine.EngineLifecycleListener; import io.flutter.embedding.engine.dart.PlatformMessageHandler; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index d73c7f7ec6ec8..f7ec6fa4e3bbd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.*; /** diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java index edf9ef9adbdd9..fd8061325f9b7 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java @@ -5,9 +5,9 @@ package io.flutter.embedding.engine.dart; import android.content.res.AssetManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.plugin.common.BinaryMessenger; diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java b/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java index cc00179b4efbc..2c4726b7f8fd3 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.dart; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.plugin.common.BinaryMessenger; diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java b/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java index 2eb4c893c37f4..ed8a5b044daad 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.dart; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** Handler that receives messages from Dart code. */ public interface PlatformMessageHandler { diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java index b0f4b165416de..32fa212e8c647 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java @@ -12,10 +12,10 @@ import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.util.PathUtils; diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java b/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java index 36f167c0a0aae..f8714dc813fcd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java @@ -11,9 +11,9 @@ import android.content.res.AssetManager; import android.os.AsyncTask; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.WorkerThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.WorkerThread; import io.flutter.BuildConfig; import java.io.*; import java.util.ArrayList; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java b/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java index c028cf951f00a..7c2e4c2ee25c2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins; -import android.arch.lifecycle.Lifecycle; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.platform.PlatformViewRegistry; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java index b1faf4ff413b1..e9d59a13983fd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.plugins; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Set; public interface PluginRegistry { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java index 9b772c92468ed..ac6bc2a007ff1 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.activity; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * {@link FlutterPlugin} that is interested in {@link Activity} lifecycle events related to a {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java index 037aedcf0c3e5..671f8311f4827 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java @@ -5,11 +5,11 @@ package io.flutter.embedding.engine.plugins.activity; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; /** * Control surface through which an {@link Activity} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java index 021ef3b6e84b7..b3090bd81078f 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java @@ -6,8 +6,8 @@ import android.app.Activity; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.plugin.common.PluginRegistry; /** diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java index 5842fbc91930a..dbe3d681d0307 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * A {@link FlutterPlugin} that wants to know when it is running within a {@link BroadcastReceiver}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java index 305cf5bc8c91f..d529af512f0ef 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; -import android.arch.lifecycle.Lifecycle; import android.content.BroadcastReceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link BroadcastReceiver} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java index 6bc5251ce3e71..73ba8486c414a 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; import android.content.BroadcastReceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Binding that gives {@link BroadcastReceiverAware} plugins access to an associated {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java index 9cc0f8946fc6e..5f0308154fca2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.contentprovider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * A {@link FlutterPlugin} that wants to know when it is running within a {@link ContentProvider}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java index e892dd8d3925d..a53496939ec04 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.contentprovider; -import android.arch.lifecycle.Lifecycle; import android.content.ContentProvider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link ContentProvider} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java index ed81801e23406..d55d7e45a2fc4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.plugins.contentprovider; import android.content.ContentProvider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Binding that gives {@link ContentProviderAware} plugins access to an associated {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java b/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java index 70880c0b4529a..9c3a0805b5324 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.lifecycle; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * An {@code Object} that can be used to obtain a {@link Lifecycle} reference. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java index 790ef4c6bea4c..f0d78456b0330 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.service; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** A {@link FlutterPlugin} that wants to know when it is running within a {@link Service}. */ public interface ServiceAware { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java index 77202744151da..e5450fe4c1cd7 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java @@ -5,9 +5,9 @@ package io.flutter.embedding.engine.plugins.service; import android.app.Service; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link Service} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java index 9b9ed5753a96b..62a51e321a565 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java @@ -5,8 +5,8 @@ package io.flutter.embedding.engine.plugins.service; import android.app.Service; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** Binding that gives {@link ServiceAware} plugins access to an associated {@link Service}. */ public interface ServicePluginBinding { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java index ec2dc0a27f84c..671e24e0ee53c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.shim; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.plugins.FlutterPlugin; @@ -21,14 +21,18 @@ * plugin API behind the scenes. * *

    The following is an example usage of {@code ShimPluginRegistry} within a {@code - * FlutterActivity}: {@code // Create the FlutterEngine that will back the Flutter UI. FlutterEngine - * flutterEngine = new FlutterEngine(context); + * FlutterActivity}: * - *

    // Create a ShimPluginRegistry and wrap the FlutterEngine with the shim. ShimPluginRegistry - * shimPluginRegistry = new ShimPluginRegistry(flutterEngine, platformViewsController); + *

    + * // Create the FlutterEngine that will back the Flutter UI.
    + * FlutterEngine flutterEngine = new FlutterEngine(context);
      *
    - * 

    // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec. - * GeneratedPluginRegistrant.registerWith(shimPluginRegistry); } + * // Create a ShimPluginRegistry and wrap the FlutterEngine with the shim. + * ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine, platformViewsController); + * + * // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec. + * GeneratedPluginRegistrant.registerWith(shimPluginRegistry); + *

    */ public class ShimPluginRegistry implements PluginRegistry { private static final String TAG = "ShimPluginRegistry"; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java index 3e5b78a3dd4ff..9ec464e4f5736 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java @@ -6,7 +6,7 @@ import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.embedding.engine.plugins.activity.ActivityAware; diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index 01f12a08680de..919971849fda4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -9,9 +9,9 @@ import android.graphics.SurfaceTexture; import android.os.Build; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.Surface; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.view.TextureRegistry; diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java b/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java index 9189d259d39a5..e788b610eb809 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.renderer; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.Surface; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Owns a {@code Surface} that {@code FlutterRenderer} would like to paint. diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java index de5dcb4c25d67..90455bcecefc2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java @@ -1,7 +1,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.embedding.engine.dart.DartExecutor; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java index b8af0504fbbc1..1b03c94184221 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java @@ -5,10 +5,10 @@ package io.flutter.embedding.engine.systemchannels; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.InputDevice; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; import io.flutter.plugin.common.JSONMessageCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java index a1ad730c84171..9e8c22bc909be 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java index d984217dcd458..2df0ecd7c1193 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.systemchannels; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java index ec797dac70350..e76023471e2bd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java index d50a8296bb95b..3c7d33b306765 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java @@ -6,9 +6,9 @@ import android.content.pm.ActivityInfo; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java index b32149581fc5b..5fcd966c24309 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.MethodCall; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java index 1d6ad2c6c832d..cc01aea2861f5 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java @@ -1,6 +1,6 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java index de97d2b5b926f..acdf7f7f6b49f 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java index 4a321ee53e6ab..80d2e419c8fce 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java @@ -1,8 +1,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.inputmethod.EditorInfo; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java index dbf361a081e65..03fc178498d8e 100644 --- a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java @@ -4,10 +4,10 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java b/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java index 0e4414ab787c9..9491c13b6a57b 100644 --- a/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java +++ b/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java @@ -4,9 +4,9 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import java.nio.ByteBuffer; /** diff --git a/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java b/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java index 9f1d38b76705d..d4acc77ea0f7c 100644 --- a/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java +++ b/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java @@ -4,8 +4,8 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; /** diff --git a/shell/platform/android/io/flutter/plugin/common/EventChannel.java b/shell/platform/android/io/flutter/plugin/common/EventChannel.java index c8093ec085bbb..f7d2e3e84c2f2 100644 --- a/shell/platform/android/io/flutter/plugin/common/EventChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/EventChannel.java @@ -4,8 +4,8 @@ package io.flutter.plugin.common; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/MessageCodec.java b/shell/platform/android/io/flutter/plugin/common/MessageCodec.java index ba1c3e362fa2f..2e9d88718f9a7 100644 --- a/shell/platform/android/io/flutter/plugin/common/MessageCodec.java +++ b/shell/platform/android/io/flutter/plugin/common/MessageCodec.java @@ -4,7 +4,7 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.nio.ByteBuffer; /** diff --git a/shell/platform/android/io/flutter/plugin/common/MethodCall.java b/shell/platform/android/io/flutter/plugin/common/MethodCall.java index 53129fa52970e..8a6e51783e696 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodCall.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodCall.java @@ -4,7 +4,7 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; import java.util.Map; import org.json.JSONObject; diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index 65441bb7b7b66..8c0bdd6895562 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -4,10 +4,10 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java index abd06c30f2f49..62ac2b7b665b6 100644 --- a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java +++ b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java @@ -219,7 +219,7 @@ interface Registrar { /** * Adds a callback allowing the plugin to take part in handling incoming calls to {@code * Activity#onRequestPermissionsResult(int, String[], int[])} or {@code - * android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, + * androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, * String[], int[])}. * *

    This registrar is for Flutter's v1 embedding. To listen for permission results in the v2 diff --git a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java index 45d8d8659b60f..9d41dc5b52902 100644 --- a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java +++ b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java @@ -8,9 +8,6 @@ import android.content.Context; import android.os.Build; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.Editable; import android.text.InputType; import android.text.Selection; @@ -20,6 +17,9 @@ import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.systemchannels.TextInputChannel; import io.flutter.plugin.platform.PlatformViewsController; diff --git a/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java b/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java index 90eae2a0da65a..ec6a4e9667234 100644 --- a/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java +++ b/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java @@ -4,10 +4,10 @@ package io.flutter.plugin.platform; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; import android.view.accessibility.AccessibilityEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.view.AccessibilityBridge; /** diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index 6ef1e384e9040..2c88dce423938 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -11,13 +11,13 @@ import android.content.Context; import android.graphics.Rect; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.HapticFeedbackConstants; import android.view.SoundEffectConstants; import android.view.View; import android.view.Window; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.systemchannels.PlatformChannel; import java.util.ArrayList; import java.util.List; diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformView.java b/shell/platform/android/io/flutter/plugin/platform/PlatformView.java index 1ab9166a56c3b..fc22e8440fd1d 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformView.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformView.java @@ -5,8 +5,8 @@ package io.flutter.plugin.platform; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; import android.view.View; +import androidx.annotation.NonNull; /** A handle to an Android view to be embedded in the Flutter hierarchy. */ public interface PlatformView { diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 3a6ae6b97342f..6c87e20c0fd94 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -10,13 +10,13 @@ import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.UiThread; -import android.support.annotation.VisibleForTesting; import android.util.DisplayMetrics; import android.util.Log; import android.view.MotionEvent; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.UiThread; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.systemchannels.PlatformViewsChannel; import io.flutter.plugin.editing.TextInputPlugin; diff --git a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java index ddfc518c486d9..9bda1295b9b88 100644 --- a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java +++ b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java @@ -16,9 +16,6 @@ import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.view.Display; import android.view.Gravity; @@ -28,6 +25,9 @@ import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java index 4b6c5f73055fd..81c59b6135bea 100644 --- a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java +++ b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java @@ -11,10 +11,10 @@ import android.hardware.display.DisplayManager; import android.hardware.display.VirtualDisplay; import android.os.Build; -import android.support.annotation.NonNull; import android.view.Surface; import android.view.View; import android.view.ViewTreeObserver; +import androidx.annotation.NonNull; import io.flutter.view.TextureRegistry; @TargetApi(Build.VERSION_CODES.KITKAT_WATCH) diff --git a/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/shell/platform/android/io/flutter/view/AccessibilityBridge.java index c6acaed155c9d..4d4fe46a33281 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -15,9 +15,6 @@ import android.os.Bundle; import android.os.Handler; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; import android.util.Log; import android.view.MotionEvent; import android.view.View; @@ -26,6 +23,9 @@ import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import io.flutter.BuildConfig; import io.flutter.embedding.engine.systemchannels.AccessibilityChannel; import io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate; diff --git a/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java b/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java index 28ca6006568d2..0fb2957d92410 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java +++ b/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java @@ -9,9 +9,6 @@ import android.os.Build; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.util.SparseArray; import android.view.MotionEvent; @@ -20,6 +17,9 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; import android.view.accessibility.AccessibilityRecord; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java b/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java index 326e874dd6678..0aec8868f91a8 100644 --- a/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java +++ b/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java @@ -4,8 +4,8 @@ package io.flutter.view; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterJNI; /** diff --git a/shell/platform/android/io/flutter/view/FlutterMain.java b/shell/platform/android/io/flutter/view/FlutterMain.java index bbcea46b3775e..8cc80ec8dc96f 100644 --- a/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/shell/platform/android/io/flutter/view/FlutterMain.java @@ -6,9 +6,9 @@ import android.content.Context; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.loader.FlutterLoader; /** diff --git a/shell/platform/android/io/flutter/view/FlutterNativeView.java b/shell/platform/android/io/flutter/view/FlutterNativeView.java index bba2b1fede6c6..01e3434d89d7c 100644 --- a/shell/platform/android/io/flutter/view/FlutterNativeView.java +++ b/shell/platform/android/io/flutter/view/FlutterNativeView.java @@ -6,9 +6,9 @@ import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.UiThread; import io.flutter.app.FlutterPluginRegistry; import io.flutter.embedding.engine.FlutterEngine.EngineLifecycleListener; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index 98066479053f0..23362b64a3499 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -18,9 +18,6 @@ import android.os.Build; import android.os.Handler; import android.os.LocaleList; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; -import android.support.annotation.UiThread; import android.text.format.DateFormat; import android.util.AttributeSet; import android.util.Log; @@ -36,6 +33,9 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; +import androidx.annotation.UiThread; import io.flutter.app.FlutterPluginRegistry; import io.flutter.embedding.android.AndroidKeyProcessor; import io.flutter.embedding.android.AndroidTouchProcessor; diff --git a/shell/platform/android/io/flutter/view/VsyncWaiter.java b/shell/platform/android/io/flutter/view/VsyncWaiter.java index e70c116e412f5..8e225f0ee548a 100644 --- a/shell/platform/android/io/flutter/view/VsyncWaiter.java +++ b/shell/platform/android/io/flutter/view/VsyncWaiter.java @@ -4,9 +4,9 @@ package io.flutter.view; -import android.support.annotation.NonNull; import android.view.Choreographer; import android.view.WindowManager; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterJNI; // TODO(mattcarroll): add javadoc. diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java index 422673439b551..3d8f420795f22 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java @@ -13,10 +13,10 @@ import static org.mockito.Mockito.when; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.Host; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterEngineCache; diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java index 3f476ebc8b72e..f6e9c59c6f295 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java @@ -11,8 +11,8 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java index 05072e01c2f8a..66d8f5dc0135b 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java @@ -11,11 +11,11 @@ import static org.mockito.Mockito.withSettings; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterEngineCache; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java b/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java index 5a28e2d2683ef..846299d02f73b 100644 --- a/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java +++ b/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java @@ -7,7 +7,7 @@ import static org.mockito.Mockito.when; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.loader.FlutterLoader; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.plugin.platform.PlatformViewsController; diff --git a/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java b/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java index 727e7177d121f..f4860fd62e845 100644 --- a/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java +++ b/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java @@ -5,7 +5,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.embedding.engine.loader.FlutterLoader; diff --git a/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java b/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java index 0a8d60f2d732a..9d8d95095adf5 100644 --- a/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java +++ b/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java @@ -10,7 +10,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import android.content.Context; +import android.content.ClipboardManager; import android.content.res.AssetManager; import android.text.Editable; import android.text.InputType; @@ -28,7 +28,6 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import org.robolectric.shadow.api.Shadow; import org.robolectric.shadows.ShadowClipboardManager; @Config(manifest = Config.NONE, sdk = 27, shadows = ShadowClipboardManager.class) @@ -71,8 +70,8 @@ public void testPerformContextMenuAction_selectAll() { @Test public void testPerformContextMenuAction_cut() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); int selStart = 6; int selEnd = 11; Editable editable = sampleEditable(selStart, selEnd); @@ -89,8 +88,8 @@ public void testPerformContextMenuAction_cut() { @Test public void testPerformContextMenuAction_copy() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); int selStart = 6; int selEnd = 11; Editable editable = sampleEditable(selStart, selEnd); @@ -109,8 +108,8 @@ public void testPerformContextMenuAction_copy() { @Test public void testPerformContextMenuAction_paste() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); String textToBePasted = "deadbeef"; clipboardManager.setText(textToBePasted); Editable editable = sampleEditable(0, 0); diff --git a/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java b/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java index e41c50bd4c719..9b93bd6399464 100644 --- a/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java +++ b/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -1,6 +1,6 @@ package io.flutter.plugins; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.FlutterEngine; import java.util.ArrayList; import java.util.List; diff --git a/testing/run_tests.py b/testing/run_tests.py index cb11932eae934..90c3a6067b26f 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -290,10 +290,10 @@ def RunJavaTests(filter, android_variant='android_debug_unopt'): android_out_dir = os.path.join(out_dir, android_variant) EnsureJavaTestsAreBuilt(android_out_dir) - robolectric_dir = os.path.join(buildroot_dir, 'third_party', 'robolectric', 'lib') + embedding_deps_dir = os.path.join(buildroot_dir, 'third_party', 'android_embedding_dependencies', 'lib') classpath = map(str, [ os.path.join(buildroot_dir, 'third_party', 'android_tools', 'sdk', 'platforms', 'android-29', 'android.jar'), - os.path.join(robolectric_dir, '*'), # Wildcard for all jars in the directory + os.path.join(embedding_deps_dir, '*'), # Wildcard for all jars in the directory os.path.join(android_out_dir, 'flutter.jar'), os.path.join(android_out_dir, 'robolectric_tests.jar') ]) @@ -302,7 +302,7 @@ def RunJavaTests(filter, android_variant='android_debug_unopt'): command = [ 'java', '-Drobolectric.offline=true', - '-Drobolectric.dependency.dir=' + robolectric_dir, + '-Drobolectric.dependency.dir=' + embedding_deps_dir, '-classpath', ':'.join(classpath), '-Drobolectric.logging=stdout', 'org.junit.runner.JUnitCore', diff --git a/testing/scenario_app/android/app/build.gradle b/testing/scenario_app/android/app/build.gradle index 0fbd03be46952..a3ae608f1b7ce 100644 --- a/testing/scenario_app/android/app/build.gradle +++ b/testing/scenario_app/android/app/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -24,12 +24,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:design:28.0.0' - implementation 'android.arch.lifecycle:common-java8:1.1.1' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha01' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test:rules:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test:rules:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java index f72102296d37e..24d3ed5e4ae4f 100644 --- a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java +++ b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java @@ -7,9 +7,9 @@ import static org.junit.Assert.fail; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.internal.runner.junit4.statement.UiThreadStatement; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.internal.runner.junit4.statement.UiThreadStatement; +import androidx.test.runner.AndroidJUnit4; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.dart.DartExecutor; import java.util.concurrent.CompletableFuture; diff --git a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java index d85a4249bc19c..6a717cfe57977 100644 --- a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java +++ b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java @@ -3,8 +3,8 @@ import static org.junit.Assert.*; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java index b8605e84d7bbd..d6f1835c7d84d 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java @@ -1,7 +1,7 @@ package dev.flutter.scenarios; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; public class BlankActivity extends AppCompatActivity { @Override diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java index 366ffe75178b0..3a5a2c2f2d1fb 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java @@ -8,7 +8,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivity; import io.flutter.embedding.engine.FlutterEngine; diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java index cbdcef084fa59..6a590ccf2ca34 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java @@ -5,7 +5,7 @@ package dev.flutter.scenarios; import android.content.Context; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import io.flutter.plugin.common.MessageCodec; import io.flutter.plugin.common.StringCodec; import io.flutter.plugin.platform.PlatformView; diff --git a/tools/android_support/download_android_support.py b/tools/android_support/download_android_support.py deleted file mode 100644 index 296243f926e63..0000000000000 --- a/tools/android_support/download_android_support.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import sys -import urllib2 -import cStringIO -import zipfile -import json - -# Path constants. (All of these should be absolute paths.) -THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -FLUTTER_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) -INSTALL_DIR = os.path.join(FLUTTER_DIR, 'third_party', 'android_support') - -def GetInstalledVersion(out_file_name): - version_file = os.path.join(INSTALL_DIR, out_file_name + '.stamp') - if not os.path.exists(version_file): - return None - with open(version_file) as f: - return f.read().strip() - -def getFile(url, out_file_name): - # Read latest version. - if url == GetInstalledVersion(out_file_name): - return - - downloaded_file = urllib2.urlopen(url).read() - if not os.path.exists(INSTALL_DIR): - os.mkdir(INSTALL_DIR) - - if (url.endswith('.aar')): - aar_zip = zipfile.ZipFile(cStringIO.StringIO(downloaded_file)) - with open(os.path.join(INSTALL_DIR, out_file_name), 'w') as f: - f.write(aar_zip.read('classes.jar')) - else: - with open(os.path.join(INSTALL_DIR, out_file_name), 'w') as f: - f.write(downloaded_file) - - # Write version as the last step. - with open(os.path.join(INSTALL_DIR, out_file_name + '.stamp'), 'w') as f: - f.write('%s\n' % url) - - -def main(): - with open (os.path.join(THIS_DIR, 'files.json')) as f: - files = json.load(f) - - for entry in files: - getFile(entry['url'], entry['out_file_name']) - -if __name__ == '__main__': - sys.exit(main()) diff --git a/tools/android_support/files.json b/tools/android_support/files.json deleted file mode 100644 index 6a6c1911bcc2a..0000000000000 --- a/tools/android_support/files.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common/1.1.1/common-1.1.1.jar", - "out_file_name": "android_arch_lifecycle_common.jar", - "maven_dependency": "android.arch.lifecycle:common:1.1.1", - "provides": [ - "android.arch.lifecycle.Lifecycle", - "android.arch.lifecycle.LifecycleObserver", - "android.arch.lifecycle.LifecycleOwner" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common-java8/1.1.1/common-java8-1.1.1.jar", - "out_file_name": "android_arch_lifecycle_common_java8.jar", - "maven_dependency": "android.arch.lifecycle:common-java8:1.1.1", - "provides": [ - "android.arch.lifecycle.DefaultLifecycleObserver" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/runtime/1.1.1/runtime-1.1.1.aar", - "out_file_name": "android_arch_lifecycle_runtime.jar", - "maven_dependency": "android.arch.lifecycle:runtime:1.1.1", - "provides": [ - "android.arch.lifecycle.LifecycleRegistry" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/viewmodel/1.1.1/viewmodel-1.1.1.aar", - "out_file_name": "android_arch_lifecycle_viewmodel.jar", - "maven_dependency": "android.arch.lifecycle:viewmodel:1.1.1", - "provides": [] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-fragment/28.0.0/support-fragment-28.0.0.aar", - "out_file_name": "android_support_fragment.jar", - "maven_dependency": "com.android.support:support-fragment:28.0.0", - "provides": [ - "android.support.v4.app.Fragment", - "android.support.v4.app.FragmentActivity" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-annotations/28.0.0/support-annotations-28.0.0.jar", - "out_file_name": "android_support_annotations.jar", - "maven_dependency": "com.android.support:support-annotations:28.0.0", - "provides": [ - "android.support.annotation.CallSuper", - "android.support.annotation.FloatRange", - "android.support.annotation.IntDef", - "android.support.annotation.Keep", - "android.support.annotation.NonNull", - "android.support.annotation.Nullable", - "android.support.annotation.RequiresApi", - "android.support.annotation.UiThread", - "android.support.annotation.VisibleForTesting" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-compat/28.0.0/support-compat-28.0.0.aar", - "out_file_name": "android_support_compat.jar", - "maven_dependency": "com.android.support:support-compat:28.0.0", - "provides": [] - } -] \ No newline at end of file diff --git a/tools/androidx/files.json b/tools/androidx/files.json new file mode 100644 index 0000000000000..e8939614a32b1 --- /dev/null +++ b/tools/androidx/files.json @@ -0,0 +1,53 @@ +[ + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-common/2.2.0/lifecycle-common-2.2.0.jar", + "out_file_name": "androidx_lifecycle_common.jar", + "maven_dependency": "androidx.lifecycle:lifecycle-common:2.2.0", + "provides": [ + "androidx.lifecycle.Lifecycle", + "androidx.lifecycle.LifecycleObserver", + "androidx.lifecycle.LifecycleOwner" + ] + }, + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-common-java8/2.2.0/lifecycle-common-java8-2.2.0.jar", + "out_file_name": "androidx_lifecycle_common_java8.jar", + "maven_dependency": "androidx.lifecycle:lifecycle-common-java8:2.2.0", + "provides": [ + "androidx.lifecycle.DefaultLifecycleObserver" + ] + }, + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.aar", + "out_file_name": "androidx_lifecycle_runtime.aar", + "maven_dependency": "androidx.lifecycle:lifecycle-runtime:2.2.0", + "provides": [ + "androidx.lifecycle.LifecycleRegistry" + ] + }, + { + "url": "https://maven.google.com/androidx/fragment/fragment/1.1.0/fragment-1.1.0.aar", + "out_file_name": "androidx_fragment.aar", + "maven_dependency": "androidx.fragment:fragment:1.1.0", + "provides": [ + "androidx.fragment.app.Fragment", + "androidx.fragment.app.FragmentActivity" + ] + }, + { + "url": "https://maven.google.com/androidx/annotation/annotation/1.1.0/annotation-1.1.0.jar", + "out_file_name": "androidx_annotation.jar", + "maven_dependency": "androidx.annotation:annotation:1.1.0", + "provides": [ + "androidx.annotation.CallSuper", + "androidx.annotation.FloatRange", + "androidx.annotation.IntDef", + "androidx.annotation.Keep", + "androidx.annotation.NonNull", + "androidx.annotation.Nullable", + "androidx.annotation.RequiresApi", + "androidx.annotation.UiThread", + "androidx.annotation.VisibleForTesting" + ] + } +] diff --git a/tools/android_support/generate_pom_file.py b/tools/androidx/generate_pom_file.py similarity index 100% rename from tools/android_support/generate_pom_file.py rename to tools/androidx/generate_pom_file.py diff --git a/tools/gen_javadoc.py b/tools/gen_javadoc.py index 14c16203869e1..e0a0e913fbaf6 100755 --- a/tools/gen_javadoc.py +++ b/tools/gen_javadoc.py @@ -29,14 +29,7 @@ def main(): classpath = [ args.android_source_root, - args.third_party + '/android_support/android_support_compat.jar', - args.third_party + '/android_support/android_support_annotations.jar', - args.third_party + '/android_support/android_support_fragment.jar', - args.third_party + '/android_support/android_arch_lifecycle_common.jar', - args.third_party + '/android_support/android_arch_lifecycle_common_java8.jar', - args.third_party + '/android_support/android_arch_lifecycle_runtime.jar', - args.third_party + '/android_support/android_arch_lifecycle_viewmodel.jar', - args.third_party + '/android_tools/sdk/platforms/android-29/android.jar', + os.path.join(args.third_party, 'android_embedding_dependencies', 'lib', '*'), ] if args.build_config_path: classpath.append(args.build_config_path) diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index fc948e23134b8..fa622354a4bb0 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -1745,12 +1745,12 @@ class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDir && entry.name != 'markupsafe' // build-time only && entry.name != 'mockito' // only used by tests && entry.name != 'pymock' // presumably only used by tests - && entry.name != 'robolectric' // testing framework for android + && entry.name != 'android_embedding_dependencies' // testing framework for android && entry.name != 'yasm' // build-time dependency only && entry.name != 'binutils' // build-time dependency only && entry.name != 'instrumented_libraries' // unused according to chinmay && entry.name != 'android_tools' // excluded on advice - && entry.name != 'android_support' // build-time only + && entry.name != 'androidx' // build-time only && entry.name != 'googletest' // only used by tests && entry.name != 'skia' // treated as a separate component && entry.name != 'fontconfig' // not used in standard configurations