Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit cc63cac

Browse files
committed
Merge branch 'main' into implicit_view_tests
2 parents c8d65c9 + 4c30919 commit cc63cac

36 files changed

+650
-323
lines changed

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ group("unittests") {
201201
public_deps += [
202202
"//flutter/impeller/golden_tests:impeller_golden_tests",
203203
"//flutter/shell/gpu:gpu_surface_metal_unittests",
204+
"//flutter/shell/platform/darwin/common:availability_version_check_unittests",
204205
"//flutter/shell/platform/darwin/common:framework_common_unittests",
205206
"//flutter/third_party/spring_animation:spring_animation_unittests",
206207
]

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ vars = {
6666
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
6767
# You can use //tools/dart/create_updated_flutter_deps.py to produce
6868
# updated revision list of existing dependencies.
69-
'dart_revision': 'cc0067095755680e93a7e96522bb32168118dee6',
69+
'dart_revision': '611fca7f0c202f0f4e4404d2e5508ce6b513aae7',
7070

7171
# WARNING: DO NOT EDIT MANUALLY
7272
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py

ci/licenses_golden/excluded_files

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@
303303
../../../flutter/shell/platform/common/text_input_model_unittests.cc
304304
../../../flutter/shell/platform/common/text_range_unittests.cc
305305
../../../flutter/shell/platform/darwin/Doxyfile
306+
../../../flutter/shell/platform/darwin/common/availability_version_check_unittests.cc
306307
../../../flutter/shell/platform/darwin/common/framework/Source/flutter_codecs_unittest.mm
307308
../../../flutter/shell/platform/darwin/common/framework/Source/flutter_standard_codec_unittest.mm
308309
../../../flutter/shell/platform/darwin/macos/README.md

ci/licenses_golden/licenses_dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 36d2973b9412fd1b1d1f0e85be7dcc98
1+
Signature: 7cda4a784ad63119dcc713d8039961d0
22

33
====================================================================================================
44
LIBRARY: dart

ci/licenses_golden/licenses_flutter

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6465,6 +6465,7 @@ ORIGIN: ../../../flutter/shell/platform/common/text_input_model.cc + ../../../fl
64656465
ORIGIN: ../../../flutter/shell/platform/common/text_input_model.h + ../../../flutter/LICENSE
64666466
ORIGIN: ../../../flutter/shell/platform/common/text_range.h + ../../../flutter/LICENSE
64676467
ORIGIN: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc + ../../../flutter/LICENSE
6468+
ORIGIN: ../../../flutter/shell/platform/darwin/common/availability_version_check.h + ../../../flutter/LICENSE
64686469
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h + ../../../flutter/LICENSE
64696470
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm + ../../../flutter/LICENSE
64706471
ORIGIN: ../../../flutter/shell/platform/darwin/common/command_line.h + ../../../flutter/LICENSE
@@ -6597,6 +6598,7 @@ ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibilit
65976598
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm + ../../../flutter/LICENSE
65986599
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.h + ../../../flutter/LICENSE
65996600
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm + ../../../flutter/LICENSE
6601+
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/availability_version_check_test.mm + ../../../flutter/LICENSE
66006602
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection.h + ../../../flutter/LICENSE
66016603
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection.mm + ../../../flutter/LICENSE
66026604
ORIGIN: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection_test.mm + ../../../flutter/LICENSE
@@ -9281,6 +9283,7 @@ FILE: ../../../flutter/shell/platform/common/text_input_model.cc
92819283
FILE: ../../../flutter/shell/platform/common/text_input_model.h
92829284
FILE: ../../../flutter/shell/platform/common/text_range.h
92839285
FILE: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc
9286+
FILE: ../../../flutter/shell/platform/darwin/common/availability_version_check.h
92849287
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h
92859288
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm
92869289
FILE: ../../../flutter/shell/platform/darwin/common/command_line.h
@@ -9414,6 +9417,7 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_
94149417
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm
94159418
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.h
94169419
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/accessibility_text_entry.mm
9420+
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/availability_version_check_test.mm
94179421
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection.h
94189422
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection.mm
94199423
FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/connection_collection_test.mm

impeller/entity/entity_unittests.cc

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "impeller/entity/contents/contents.h"
2121
#include "impeller/entity/contents/filters/color_filter_contents.h"
2222
#include "impeller/entity/contents/filters/filter_contents.h"
23+
#include "impeller/entity/contents/filters/gaussian_blur_filter_contents.h"
2324
#include "impeller/entity/contents/filters/inputs/filter_input.h"
2425
#include "impeller/entity/contents/linear_gradient_contents.h"
2526
#include "impeller/entity/contents/radial_gradient_contents.h"
@@ -991,7 +992,8 @@ TEST_P(EntityTest, GaussianBlurFilter) {
991992
auto callback = [&](ContentContext& context, RenderPass& pass) -> bool {
992993
const char* input_type_names[] = {"Texture", "Solid Color"};
993994
const char* blur_type_names[] = {"Image blur", "Mask blur"};
994-
const char* pass_variation_names[] = {"Two pass", "Directional"};
995+
const char* pass_variation_names[] = {"New", "2D Directional",
996+
"Directional"};
995997
const char* blur_style_names[] = {"Normal", "Solid", "Outer", "Inner"};
996998
const char* tile_mode_names[] = {"Clamp", "Repeat", "Mirror", "Decal"};
997999
const FilterContents::BlurStyle blur_styles[] = {
@@ -1083,16 +1085,26 @@ TEST_P(EntityTest, GaussianBlurFilter) {
10831085
}
10841086

10851087
std::shared_ptr<FilterContents> blur;
1086-
if (selected_pass_variation == 0) {
1087-
blur = FilterContents::MakeGaussianBlur(
1088-
FilterInput::Make(input), blur_sigma_x, blur_sigma_y,
1089-
blur_styles[selected_blur_style], tile_modes[selected_tile_mode]);
1090-
} else {
1091-
Vector2 blur_vector(blur_sigma_x.sigma, blur_sigma_y.sigma);
1092-
blur = FilterContents::MakeDirectionalGaussianBlur(
1093-
FilterInput::Make(input), Sigma{blur_vector.GetLength()},
1094-
blur_vector.Normalize());
1095-
}
1088+
switch (selected_pass_variation) {
1089+
case 0:
1090+
blur = std::make_shared<GaussianBlurFilterContents>(
1091+
blur_sigma_x.sigma, tile_modes[selected_tile_mode]);
1092+
blur->SetInputs({FilterInput::Make(input)});
1093+
break;
1094+
case 1:
1095+
blur = FilterContents::MakeGaussianBlur(
1096+
FilterInput::Make(input), blur_sigma_x, blur_sigma_y,
1097+
blur_styles[selected_blur_style], tile_modes[selected_tile_mode]);
1098+
break;
1099+
case 2: {
1100+
Vector2 blur_vector(blur_sigma_x.sigma, blur_sigma_y.sigma);
1101+
blur = FilterContents::MakeDirectionalGaussianBlur(
1102+
FilterInput::Make(input), Sigma{blur_vector.GetLength()},
1103+
blur_vector.Normalize());
1104+
break;
1105+
}
1106+
};
1107+
FML_CHECK(blur);
10961108

10971109
auto mask_blur = FilterContents::MakeBorderMaskBlur(
10981110
FilterInput::Make(input), blur_sigma_x, blur_sigma_y,

impeller/renderer/backend/vulkan/allocator_vk.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ AllocatorVK::AllocatorVK(std::weak_ptr<Context> context,
9191
const vk::Instance& instance,
9292
const CapabilitiesVK& capabilities)
9393
: context_(std::move(context)), device_holder_(device_holder) {
94-
TRACE_EVENT0("impeller", "CreateAllocatorVK");
95-
9694
auto limits = physical_device.getProperties().limits;
9795
max_texture_size_.width = max_texture_size_.height =
9896
limits.maxImageDimension2D;
@@ -273,7 +271,6 @@ class AllocatedTextureSourceVK final : public TextureSourceVK {
273271
bool supports_framebuffer_fetch)
274272
: TextureSourceVK(desc), resource_(std::move(resource_manager)) {
275273
FML_DCHECK(desc.format != PixelFormat::kUnknown);
276-
TRACE_EVENT0("impeller", "CreateDeviceTexture");
277274
vk::ImageCreateInfo image_info;
278275
image_info.flags = ToVKImageCreateFlags(desc.type);
279276
image_info.imageType = vk::ImageType::e2D;
@@ -402,7 +399,6 @@ class AllocatedTextureSourceVK final : public TextureSourceVK {
402399
// |Allocator|
403400
std::shared_ptr<Texture> AllocatorVK::OnCreateTexture(
404401
const TextureDescriptor& desc) {
405-
TRACE_EVENT0("impeller", "AllocatorVK::OnCreateTexture");
406402
if (!IsValid()) {
407403
return nullptr;
408404
}
@@ -436,7 +432,6 @@ void AllocatorVK::DidAcquireSurfaceFrame() {
436432
// |Allocator|
437433
std::shared_ptr<DeviceBuffer> AllocatorVK::OnCreateBuffer(
438434
const DeviceBufferDescriptor& desc) {
439-
TRACE_EVENT0("impeller", "AllocatorVK::OnCreateBuffer");
440435
vk::BufferCreateInfo buffer_info;
441436
buffer_info.usage = vk::BufferUsageFlagBits::eVertexBuffer |
442437
vk::BufferUsageFlagBits::eIndexBuffer |

impeller/renderer/backend/vulkan/command_pool_vk.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ std::optional<vk::UniqueCommandPool> CommandPoolRecyclerVK::Reuse() {
212212
}
213213

214214
void CommandPoolRecyclerVK::Reclaim(vk::UniqueCommandPool&& pool) {
215-
TRACE_EVENT0("impeller", "ReclaimCommandPool");
216-
217215
// Reset the pool on a background thread.
218216
auto strong_context = context_.lock();
219217
if (!strong_context) {

impeller/renderer/backend/vulkan/descriptor_pool_vk.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ DescriptorPoolVK::AllocateDescriptorSets(
116116

117117
void DescriptorPoolRecyclerVK::Reclaim(vk::UniqueDescriptorPool&& pool,
118118
uint32_t allocated_capacity) {
119-
TRACE_EVENT0("impeller", "DescriptorPoolRecyclerVK::Reclaim");
120-
121119
// Reset the pool on a background thread.
122120
auto strong_context = context_.lock();
123121
if (!strong_context) {
@@ -172,8 +170,6 @@ DescriptorPoolAndSize DescriptorPoolRecyclerVK::Get(uint32_t minimum_capacity) {
172170

173171
DescriptorPoolAndSize DescriptorPoolRecyclerVK::Create(
174172
uint32_t minimum_capacity) {
175-
TRACE_EVENT0("impeller", "DescriptorPoolRecyclerVK::Create");
176-
177173
FML_DCHECK(Allocation::NextPowerOfTwoSize(minimum_capacity) ==
178174
minimum_capacity);
179175
auto strong_context = context_.lock();
@@ -204,8 +200,6 @@ DescriptorPoolAndSize DescriptorPoolRecyclerVK::Create(
204200

205201
std::optional<DescriptorPoolAndSize> DescriptorPoolRecyclerVK::Reuse(
206202
uint32_t minimum_capacity) {
207-
TRACE_EVENT0("impeller", "DescriptorPoolRecyclerVK::Reuse");
208-
209203
FML_DCHECK(Allocation::NextPowerOfTwoSize(minimum_capacity) ==
210204
minimum_capacity);
211205
Lock lock(recycled_mutex_);

impeller/renderer/backend/vulkan/fence_waiter_vk.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ FenceWaiterVK::~FenceWaiterVK() {
6464

6565
bool FenceWaiterVK::AddFence(vk::UniqueFence fence,
6666
const fml::closure& callback) {
67-
TRACE_EVENT0("flutter", "FenceWaiterVK::AddFence");
6867
if (!fence || !callback) {
6968
return false;
7069
}

lib/web_ui/lib/src/engine/embedder.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import '../engine.dart' show buildMode, renderer;
88
import 'browser_detection.dart';
99
import 'configuration.dart';
1010
import 'dom.dart';
11-
import 'keyboard_binding.dart';
1211
import 'platform_dispatcher.dart';
13-
import 'pointer_binding.dart';
1412
import 'text_editing/text_editing.dart';
1513
import 'view_embedder/style_manager.dart';
1614
import 'window.dart';
@@ -67,14 +65,6 @@ class FlutterViewEmbedder {
6765

6866
renderer.reset(this);
6967

70-
// TODO(mdebbar): Move these to `engine/initialization.dart`.
71-
72-
KeyboardBinding.initInstance();
73-
PointerBinding.initInstance(
74-
_flutterViewElement,
75-
KeyboardBinding.instance!.converter,
76-
);
77-
7868
window.onResize.listen(_metricsDidChange);
7969
}
8070

lib/web_ui/lib/src/engine/initialization.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ Future<void> initializeEngineUi() async {
225225
_initializationState = DebugEngineInitializationState.initializingUi;
226226

227227
RawKeyboard.initialize(onMacOs: operatingSystem == OperatingSystem.macOs);
228+
KeyboardBinding.initInstance();
229+
228230
if (!configuration.multiViewEnabled) {
229231
ensureImplicitViewInitialized(hostElement: configuration.hostElement);
230232
ensureFlutterViewEmbedderInitialized();

lib/web_ui/lib/src/engine/keyboard_binding.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ class KeyboardConverter {
258258
bool _disposed = false;
259259
void dispose() {
260260
_disposed = true;
261+
clearPressedKeys();
261262
}
262263

263264
// On macOS, CapsLock behaves differently in that, a keydown event occurs when
@@ -699,4 +700,8 @@ class KeyboardConverter {
699700
bool keyIsPressed(int physical) {
700701
return _pressingRecords.containsKey(physical);
701702
}
703+
704+
void clearPressedKeys() {
705+
_pressingRecords.clear();
706+
}
702707
}

lib/web_ui/lib/src/engine/platform_dispatcher.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
634634
const StandardMessageCodec codec = StandardMessageCodec();
635635
// TODO(yjbanov): Dispatch the announcement to the correct view?
636636
// https://github.com/flutter/flutter/issues/137445
637-
implicitView!.accessibilityAnnouncements.handleMessage(codec, data);
637+
implicitView?.accessibilityAnnouncements.handleMessage(codec, data);
638638
replyToPlatformMessage(callback, codec.encodeMessage(true));
639639
return;
640640

0 commit comments

Comments
 (0)