这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 78 additions & 10 deletions .ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,10 @@ targets:
- engine/**
- DEPS

- name: Linux plugin_test
- name: Linux plugin_test_android_variants
bringup: true
recipe: devicelab/devicelab_drone
timeout: 60
timeout: 45
properties:
dependencies: >-
[
Expand All @@ -1108,7 +1109,29 @@ targets:
["os=Linux", "os=Ubuntu-20"]
tags: >
["devicelab", "hostonly", "linux"]
task_name: plugin_test
task_name: plugin_test_android_variants
runIf:
- dev/**
- packages/flutter_tools/**
- bin/**
- .ci.yaml
- engine/**
- DEPS

- name: Linux plugin_test_android_standard
bringup: true
recipe: devicelab/devicelab_drone
timeout: 45
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:36v1"},
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
{"dependency": "open_jdk", "version": "version:21"}
]
tags: >
["devicelab", "hostonly", "windows"]
task_name: plugin_test_android_standard
runIf:
- dev/**
- packages/flutter_tools/**
Expand Down Expand Up @@ -4389,9 +4412,10 @@ targets:
- engine/**
- DEPS

- name: Mac plugin_test
- name: Mac plugin_test_android_variants
bringup: true
recipe: devicelab/devicelab_drone
timeout: 60
timeout: 45
properties:
dependencies: >-
[
Expand All @@ -4400,7 +4424,29 @@ targets:
]
tags: >
["devicelab", "hostonly", "mac"]
task_name: plugin_test
task_name: plugin_test_android_variants
runIf:
- dev/**
- packages/flutter_tools/**
- bin/**
- .ci.yaml
- engine/**
- DEPS

- name: Mac plugin_test_android_standard
bringup: true
recipe: devicelab/devicelab_drone
timeout: 45
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:36v1"},
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
{"dependency": "open_jdk", "version": "version:21"}
]
tags: >
["devicelab", "hostonly", "windows"]
task_name: plugin_test_android_standard
runIf:
- dev/**
- packages/flutter_tools/**
Expand Down Expand Up @@ -6171,10 +6217,32 @@ targets:
- engine/**
- DEPS

- name: Windows plugin_test
bringup: true # Flaky https://github.com/flutter/flutter/issues/174116
- name: Windows plugin_test_android_variants
bringup: true
recipe: devicelab/devicelab_drone
timeout: 60
timeout: 45
properties:
dependencies: >-
[
{"dependency": "android_sdk", "version": "version:36v1"},
{"dependency": "chrome_and_driver", "version": "version:125.0.6422.141"},
{"dependency": "open_jdk", "version": "version:21"}
]
tags: >
["devicelab", "hostonly", "windows"]
task_name: plugin_test_android_variants
runIf:
- dev/**
- packages/flutter_tools/**
- bin/**
- .ci.yaml
- engine/**
- DEPS

- name: Windows plugin_test_android_standard
bringup: true
recipe: devicelab/devicelab_drone
timeout: 45
properties:
dependencies: >-
[
Expand All @@ -6184,7 +6252,7 @@ targets:
]
tags: >
["devicelab", "hostonly", "windows"]
task_name: plugin_test
task_name: plugin_test_android_standard
runIf:
- dev/**
- packages/flutter_tools/**
Expand Down
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vars = {
'flutter_git': 'https://flutter.googlesource.com',
'skia_git': 'https://skia.googlesource.com',
'llvm_git': 'https://llvm.googlesource.com',
'skia_revision': '359f3d7cc7edfcb93e99ab5ed7e9f2f5fdd8ef85',
'skia_revision': '7c2f502e3304f4c76413696a9035470c32ac6dde',

# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
Expand Down
3 changes: 2 additions & 1 deletion TESTOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@
/dev/devicelab/bin/tasks/platform_view_macos__start_up.dart @cbracken @flutter/desktop
/dev/devicelab/bin/tasks/platform_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
/dev/devicelab/bin/tasks/plugin_lint_mac.dart @stuartmorgan-g @flutter/plugin
/dev/devicelab/bin/tasks/plugin_test.dart @stuartmorgan-g @flutter/plugin
/dev/devicelab/bin/tasks/plugin_test_android_standard.dart @stuartmorgan-g @flutter/plugin
/dev/devicelab/bin/tasks/plugin_test_android_variants.dart @stuartmorgan-g @flutter/plugin
/dev/devicelab/bin/tasks/plugin_test_ios.dart @stuartmorgan-g @flutter/ios
/dev/devicelab/bin/tasks/plugin_test_linux.dart @stuartmorgan-g @flutter/desktop
/dev/devicelab/bin/tasks/plugin_test_macos.dart @vashworth @flutter/desktop
Expand Down
15 changes: 15 additions & 0 deletions dev/devicelab/bin/tasks/plugin_test_android_standard.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2014 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 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/plugin_tests.dart';

Future<void> main() async {
await task(
combine(<TaskFunction>[
PluginTest('apk', <String>['-a', 'java', '--platforms=android']).call,
PluginTest('apk', <String>['-a', 'kotlin', '--platforms=android']).call,
]),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import 'package:flutter_devicelab/tasks/plugin_tests.dart';
Future<void> main() async {
await task(
combine(<TaskFunction>[
PluginTest('apk', <String>['-a', 'java', '--platforms=android']).call,
PluginTest('apk', <String>['-a', 'kotlin', '--platforms=android']).call,
// Test that Dart-only plugins are supported.
PluginTest('apk', <String>['--platforms=android'], dartOnlyPlugin: true).call,
// Test that FFI plugins are supported.
Expand Down
7 changes: 2 additions & 5 deletions engine/src/.clang-format
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Defines the Chromium style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
# This defaults to 'Auto'. Explicitly set it for a while, so that
# 'vector<vector<int> >' in existing files gets formatted to
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11
# This defaults to 'Auto'.
Standard: c++20
2 changes: 1 addition & 1 deletion engine/src/flutter/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BasedOnStyle: Chromium
# 'vector<vector<int> >' in existing files gets formatted to
# 'vector<vector<int>>'. ('Auto' means that clang-format will only use
# 'int>>' if the file already contains at least one such instance.)
Standard: Cpp11
Standard: c++20
SortIncludes: true
---
Language: ObjC
Expand Down
2 changes: 1 addition & 1 deletion engine/src/flutter/impeller/.clang-format
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Defines the Chromium style for automatic reformatting.
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
Standard: c++17
Standard: c++20
EmptyLineBeforeAccessModifier: Always
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,75 @@ TEST_P(AiksTest, CanRenderColoredRect) {
ASSERT_TRUE(OpenPlaygroundHere(builder.Build()));
}

namespace {
using DrawRectProc =
std::function<void(DisplayListBuilder&, const DlRect&, const DlPaint&)>;

sk_sp<DisplayList> MakeWideStrokedRects(Point scale,
const DrawRectProc& draw_rect) {
DisplayListBuilder builder;
builder.Scale(scale.x, scale.y);
builder.DrawColor(DlColor::kWhite(), DlBlendMode::kSrc);

DlPaint paint;
paint.setColor(DlColor::kBlue().withAlphaF(0.5));
paint.setDrawStyle(DlDrawStyle::kStroke);
paint.setStrokeWidth(30.0f);

// Each of these 3 sets of rects includes (with different join types):
// - One rectangle with a gap in the middle
// - One rectangle with no gap because it is too narrow
// - One rectangle with no gap because it is too short
paint.setStrokeJoin(DlStrokeJoin::kBevel);
draw_rect(builder, DlRect::MakeXYWH(100.0f, 100.0f, 100.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(250.0f, 100.0f, 10.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(100.0f, 250.0f, 100.0f, 10.0f), paint);

paint.setStrokeJoin(DlStrokeJoin::kRound);
draw_rect(builder, DlRect::MakeXYWH(350.0f, 100.0f, 100.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(500.0f, 100.0f, 10.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(350.0f, 250.0f, 100.0f, 10.0f), paint);

paint.setStrokeJoin(DlStrokeJoin::kMiter);
draw_rect(builder, DlRect::MakeXYWH(600.0f, 100.0f, 100.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(750.0f, 100.0f, 10.0f, 100.0f), paint);
draw_rect(builder, DlRect::MakeXYWH(600.0f, 250.0f, 100.0f, 10.0f), paint);

// And now draw 3 rectangles with a stroke width so large that that it
// overlaps in the middle in both directions (horizontal/vertical).
paint.setStrokeWidth(110.0f);

paint.setStrokeJoin(DlStrokeJoin::kBevel);
draw_rect(builder, DlRect::MakeXYWH(100.0f, 400.0f, 100.0f, 100.0f), paint);

paint.setStrokeJoin(DlStrokeJoin::kRound);
draw_rect(builder, DlRect::MakeXYWH(350.0f, 400.0f, 100.0f, 100.0f), paint);

paint.setStrokeJoin(DlStrokeJoin::kMiter);
draw_rect(builder, DlRect::MakeXYWH(600.0f, 400.0f, 100.0f, 100.0f), paint);

return builder.Build();
}
} // namespace

TEST_P(AiksTest, CanRenderWideStrokedRectWithoutOverlap) {
ASSERT_TRUE(OpenPlaygroundHere(MakeWideStrokedRects(
GetContentScale(), [](DisplayListBuilder& builder, const DlRect& rect,
const DlPaint& paint) {
// Draw the rect directly
builder.DrawRect(rect, paint);
})));
}

TEST_P(AiksTest, CanRenderWideStrokedRectPathWithoutOverlap) {
ASSERT_TRUE(OpenPlaygroundHere(MakeWideStrokedRects(
GetContentScale(), [](DisplayListBuilder& builder, const DlRect& rect,
const DlPaint& paint) {
// Draw the rect as a Path
builder.DrawPath(DlPath::MakeRect(rect), paint);
})));
}

TEST_P(AiksTest, CanRenderImage) {
DisplayListBuilder builder;
DlPaint paint;
Expand Down
Loading