Skip to content

Commit c956ad4

Browse files
committed
Merge remote-tracking branch 'origin/bdero/impeller-mipmap-sampling' into bdero/impeller-mipmap-sampling
2 parents c97a440 + 0102f4d commit c956ad4

52 files changed

Lines changed: 2046 additions & 387 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ deps = {
264264
Var('chromium_git') + '/external/github.com/google/flatbuffers' + '@' + '067bfdbde9b10c1beb5d6b02d67ae9db8b96f736',
265265

266266
'engine/src/flutter/third_party/icu':
267-
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'ee5f27adc28bd3f15b2c293f726d14d2e336cbd5',
267+
Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd578f2e8b7bd5938e21cfb6bf15c079e0aa5b738',
268268

269269
'engine/src/flutter/third_party/gtest-parallel':
270270
Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14',
@@ -805,7 +805,7 @@ deps = {
805805
'packages': [
806806
{
807807
'package': 'fuchsia/sdk/core/linux-amd64',
808-
'version': '8azSyvz57mKcPqTwk917EgHwgK-u93O6u-H9xa4IYvIC'
808+
'version': '2KosSR4ONUjIB7tP_2aF-x-GK-p_n-b-U65EzczctwsC'
809809
}
810810
],
811811
'condition': 'download_fuchsia_deps and not download_fuchsia_sdk',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bd297cf6233836099fe1413f9e954ad24ec6f5f0
1+
1b56cdeeb733029126cd70c755187d6adf743421

docs/triage/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,9 @@ For more guidance on reviewing PRs, see [Tree Hygiene](../contributing/Tree-hygi
255255

256256
- [Incoming issue list](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Ateam-ecosystem%2Cfyi-ecosystem+-label%3Atriaged-ecosystem+no%3Aassignee+-label%3A%22will+need+additional+triage%22+sort%3Aupdated-asc)
257257
- [P0 list](https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Ateam-ecosystem+label%3AP0+sort%3Aupdated-asc)
258-
- [PR list](https://github.com/flutter/packages/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc+-label%3A%22p%3A+go_router%22+-label%3A%22p%3A+go_router_builder%22)
258+
- [flutter/packages PR list](https://github.com/flutter/packages/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc+-label%3A%22p%3A+go_router%22+-label%3A%22p%3A+go_router_builder%22)
259259
- Make sure that any PR that still needs review by a platform team has the appropriate `triage-<platform>` label(s) on it, so that it shows up in the regular platform team triages. This is separate from `platform-*` because a multi-platform PR may have sign-off from some platforms, and still need review from others.
260+
- [flutter/core-packages PR list](https://github.com/flutter/core-packages/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-asc)
260261

261262
In addition, consider these issues that fall under another team's triage, but are things the ecosystem team might want to be aware of:
262263
* [`a: plugins` issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+label%3A%22a%3A+plugins%22+-label%3Ateam-ecosystem+-label%3Atriaged-ecosystem)

engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
import static org.junit.Assert.assertNotNull;
1212
import static org.junit.Assert.assertNull;
1313
import static org.junit.Assert.assertTrue;
14+
import static org.mockito.ArgumentMatchers.contains;
1415
import static org.mockito.ArgumentMatchers.eq;
1516
import static org.mockito.Mockito.any;
1617
import static org.mockito.Mockito.anyInt;
1718
import static org.mockito.Mockito.atLeastOnce;
1819
import static org.mockito.Mockito.doAnswer;
1920
import static org.mockito.Mockito.mock;
21+
import static org.mockito.Mockito.mockStatic;
2022
import static org.mockito.Mockito.never;
2123
import static org.mockito.Mockito.reset;
2224
import static org.mockito.Mockito.spy;
@@ -64,6 +66,7 @@
6466
import org.junit.Test;
6567
import org.junit.runner.RunWith;
6668
import org.mockito.ArgumentCaptor;
69+
import org.mockito.MockedStatic;
6770
import org.mockito.invocation.InvocationOnMock;
6871
import org.robolectric.RuntimeEnvironment;
6972
import org.robolectric.annotation.Config;
@@ -3247,6 +3250,38 @@ AccessibilityBridge setUpBridge(
32473250
platformViewsAccessibilityDelegate);
32483251
}
32493252

3253+
@Config(sdk = API_LEVELS.API_36)
3254+
@TargetApi(API_LEVELS.API_36)
3255+
@SuppressWarnings("deprecation")
3256+
@Test
3257+
public void itLogsDeprecationWarningForAnnounceOnAPI36() {
3258+
AccessibilityBridge accessibilityBridge = setUpBridge();
3259+
try (MockedStatic<io.flutter.Log> mockedLog = mockStatic(io.flutter.Log.class)) {
3260+
accessibilityBridge.accessibilityMessageHandler.announce("Hello");
3261+
3262+
mockedLog.verify(
3263+
() ->
3264+
io.flutter.Log.w(
3265+
eq("AccessibilityBridge"),
3266+
contains(
3267+
"Using AnnounceSemanticsEvent for accessibility is deprecated on Android")));
3268+
}
3269+
}
3270+
3271+
@Config(sdk = API_LEVELS.API_35)
3272+
@TargetApi(API_LEVELS.API_35)
3273+
@SuppressWarnings("deprecation")
3274+
@Test
3275+
public void itDoesNotLogDeprecationWarningForAnnounceOnAPI35() {
3276+
AccessibilityBridge accessibilityBridge = setUpBridge();
3277+
try (MockedStatic<io.flutter.Log> mockedLog = mockStatic(io.flutter.Log.class)) {
3278+
accessibilityBridge.accessibilityMessageHandler.announce("Hello");
3279+
3280+
mockedLog.verify(
3281+
() -> io.flutter.Log.w(eq("AccessibilityBridge"), any(String.class)), never());
3282+
}
3283+
}
3284+
32503285
/// The encoding for semantics is described in platform_view_android.cc
32513286
class TestSemanticsUpdate {
32523287
TestSemanticsUpdate(ByteBuffer buffer, String[] strings, ByteBuffer[] stringAttributeArgs) {

engine/src/flutter/shell/platform/embedder/embedder.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2762,6 +2762,8 @@ inline flutter::PointerData::DeviceKind ToPointerDataKind(
27622762
return flutter::PointerData::DeviceKind::kStylus;
27632763
case kFlutterPointerDeviceKindTrackpad:
27642764
return flutter::PointerData::DeviceKind::kTrackpad;
2765+
case kFlutterPointerDeviceKindInvertedStylus:
2766+
return flutter::PointerData::DeviceKind::kInvertedStylus;
27652767
}
27662768
return flutter::PointerData::DeviceKind::kMouse;
27672769
}

engine/src/flutter/shell/platform/embedder/embedder.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,7 @@ typedef enum {
13111311
kFlutterPointerDeviceKindTouch,
13121312
kFlutterPointerDeviceKindStylus,
13131313
kFlutterPointerDeviceKindTrackpad,
1314+
kFlutterPointerDeviceKindInvertedStylus,
13141315
} FlutterPointerDeviceKind;
13151316

13161317
/// Flags for the `buttons` field of `FlutterPointerEvent` when `device_kind`
@@ -1325,6 +1326,21 @@ typedef enum {
13251326
/// corresponding to the button number: 1 << 5 for the 6th, etc.
13261327
} FlutterPointerMouseButtons;
13271328

1329+
/// Flags for the `buttons` field of `FlutterPointerEvent` when `device_kind`
1330+
/// is `kFlutterPointerDeviceKindStylus` or
1331+
/// `kFlutterPointerDeviceKindInvertedStylus`.
1332+
typedef enum {
1333+
/// Whether the stylus has contact with the screen.
1334+
/// This matches the framework's `kStylusContact`.
1335+
kFlutterPointerButtonStylusContact = 1 << 0,
1336+
/// Whether the stylus's primary button is pressed.
1337+
/// This matches the framework's `kPrimaryStylusButton`.
1338+
kFlutterPointerButtonStylusPrimary = 1 << 1,
1339+
/// Whether the stylus's secondary button is pressed.
1340+
/// This matches the framework's `kSecondaryStylusButton`.
1341+
kFlutterPointerButtonStylusSecondary = 1 << 2,
1342+
} FlutterPointerStylusButtons;
1343+
13281344
/// The type of a pointer signal.
13291345
typedef enum {
13301346
kFlutterPointerSignalKindNone,
@@ -1360,6 +1376,7 @@ typedef struct {
13601376
/// correct buttons.
13611377
FlutterPointerDeviceKind device_kind;
13621378
/// The buttons currently pressed, if any.
1379+
/// See `FlutterPointerMouseButtons` or `FlutterPointerStylusButtons`.
13631380
int64_t buttons;
13641381
/// The x offset of the pan/zoom in physical pixels.
13651382
double pan_x;

engine/src/flutter/shell/platform/embedder/fixtures/main.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,20 @@ void pointer_data_packet() {
14521452
signalNativeTest();
14531453
}
14541454

1455+
@pragma('vm:entry-point')
1456+
// ignore: non_constant_identifier_names
1457+
void pointer_data_packet_stylus_buttons() {
1458+
PlatformDispatcher.instance.onPointerDataPacket = (PointerDataPacket packet) {
1459+
signalNativeCount(packet.data.length);
1460+
1461+
for (final PointerData pointerData in packet.data) {
1462+
signalNativeMessage('buttons: ${pointerData.buttons}');
1463+
}
1464+
};
1465+
1466+
signalNativeTest();
1467+
}
1468+
14551469
@pragma('vm:entry-point')
14561470
// ignore: non_constant_identifier_names
14571471
void pointer_data_packet_view_id() {

engine/src/flutter/shell/platform/embedder/tests/embedder_unittests.cc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4078,6 +4078,59 @@ TEST_F(EmbedderTest, CanSendPointer) {
40784078
message_latch.Wait();
40794079
}
40804080

4081+
/// Send a stylus pointer event to Dart and verify the buttons mask.
4082+
TEST_F(EmbedderTest, CanSendStylusPointerButtons) {
4083+
auto& context = GetEmbedderContext<EmbedderTestContextSoftware>();
4084+
EmbedderConfigBuilder builder(context);
4085+
builder.SetSurface(DlISize(1, 1));
4086+
builder.SetDartEntrypoint("pointer_data_packet_stylus_buttons");
4087+
4088+
fml::AutoResetWaitableEvent ready_latch, count_latch, message_latch;
4089+
context.AddNativeCallback(
4090+
"SignalNativeTest",
4091+
CREATE_NATIVE_ENTRY(
4092+
[&ready_latch](Dart_NativeArguments args) { ready_latch.Signal(); }));
4093+
context.AddNativeCallback(
4094+
"SignalNativeCount",
4095+
CREATE_NATIVE_ENTRY([&count_latch](Dart_NativeArguments args) {
4096+
int count = tonic::DartConverter<int>::FromDart(
4097+
Dart_GetNativeArgument(args, 0));
4098+
EXPECT_EQ(count, 1);
4099+
count_latch.Signal();
4100+
}));
4101+
context.AddNativeCallback(
4102+
"SignalNativeMessage",
4103+
CREATE_NATIVE_ENTRY([&message_latch](Dart_NativeArguments args) {
4104+
auto message = tonic::DartConverter<std::string>::FromDart(
4105+
Dart_GetNativeArgument(args, 0));
4106+
EXPECT_EQ("buttons: 3", message);
4107+
message_latch.Signal();
4108+
}));
4109+
4110+
auto engine = builder.LaunchEngine();
4111+
ASSERT_TRUE(engine.is_valid());
4112+
4113+
ready_latch.Wait();
4114+
4115+
FlutterPointerEvent pointer_event = {};
4116+
pointer_event.struct_size = sizeof(FlutterPointerEvent);
4117+
pointer_event.phase = FlutterPointerPhase::kAdd;
4118+
pointer_event.device_kind = kFlutterPointerDeviceKindStylus;
4119+
pointer_event.buttons =
4120+
kFlutterPointerButtonStylusContact | kFlutterPointerButtonStylusPrimary;
4121+
pointer_event.x = 123;
4122+
pointer_event.y = 456;
4123+
pointer_event.timestamp = static_cast<size_t>(1234567890);
4124+
pointer_event.view_id = 0;
4125+
4126+
FlutterEngineResult result =
4127+
FlutterEngineSendPointerEvent(engine.get(), &pointer_event, 1);
4128+
ASSERT_EQ(result, kSuccess);
4129+
4130+
count_latch.Wait();
4131+
message_latch.Wait();
4132+
}
4133+
40814134
/// Send a pointer event to Dart and wait until the Dart code echos with the
40824135
/// view ID.
40834136
TEST_F(EmbedderTest, CanSendPointerEventWithViewId) {

engine/src/flutter/shell/platform/windows/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ source_set("flutter_windows_source") {
9999
"host_window_popup.h",
100100
"host_window_regular.cc",
101101
"host_window_regular.h",
102+
"host_window_sized.cc",
103+
"host_window_sized.h",
102104
"host_window_tooltip.cc",
103105
"host_window_tooltip.h",
104106
"keyboard_handler_base.h",

0 commit comments

Comments
 (0)