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

Commit d2f54f0

Browse files
authored
Merge branch 'main' into scenario_app_args
2 parents 7c647d7 + 070290b commit d2f54f0

File tree

20 files changed

+590
-352
lines changed

20 files changed

+590
-352
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ vars = {
6262
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
6363
# You can use //tools/dart/create_updated_flutter_deps.py to produce
6464
# updated revision list of existing dependencies.
65-
'dart_revision': 'c479735adcf91684b66e94747199e3c1b17516b9',
65+
'dart_revision': '2876f5684ceddf924aa0e2ab7d34a6baf4717496',
6666

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

ci/builders/mac_unopt.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,21 @@
142142
"$flutter/osx_sdk": {
143143
"sdk_version": "15a240d"
144144
}
145-
}
145+
},
146+
"tests": [
147+
{
148+
"language": "python3",
149+
"name": "Host Tests for host_debug_unopt_arm64",
150+
"script": "flutter/testing/run_tests.py",
151+
"parameters": [
152+
"--variant",
153+
"host_debug_unopt_arm64",
154+
"--type",
155+
"dart,dart-host,engine",
156+
"--engine-capture-core-dump"
157+
]
158+
}
159+
]
146160
},
147161
{
148162
"properties": {

ci/licenses_golden/licenses_dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: aee8d76d23570c7efd9439c5f991502a
1+
Signature: 7fd3eb25284e36712433374678f727d7
22

33
====================================================================================================
44
LIBRARY: dart
@@ -3728,7 +3728,6 @@ ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/class_id.dart + ../
37283728
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/convert_patch.dart + ../../../third_party/dart/LICENSE
37293729
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/core_patch.dart + ../../../third_party/dart/LICENSE
37303730
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/deferred.dart + ../../../third_party/dart/LICENSE
3731-
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/developer.dart + ../../../third_party/dart/LICENSE
37323731
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/double_patch.dart + ../../../third_party/dart/LICENSE
37333732
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/errors_patch.dart + ../../../third_party/dart/LICENSE
37343733
ORIGIN: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/growable_list.dart + ../../../third_party/dart/LICENSE
@@ -3804,7 +3803,6 @@ FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/class_id.dart
38043803
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/convert_patch.dart
38053804
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/core_patch.dart
38063805
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/deferred.dart
3807-
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/developer.dart
38083806
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/double_patch.dart
38093807
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/errors_patch.dart
38103808
FILE: ../../../third_party/dart/sdk/lib/_internal/wasm/lib/growable_list.dart
@@ -4753,7 +4751,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
47534751
This Source Code Form is "Incompatible With Secondary Licenses", as
47544752
defined by the Mozilla Public License, v. 2.0.
47554753

4756-
You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/e5e4aaceaf23200d0cf92ebed1506f915f364b4d
4754+
You may obtain a copy of this library's Source Code Form from: https://dart.googlesource.com/sdk/+/2876f5684ceddf924aa0e2ab7d34a6baf4717496
47574755
/third_party/fallback_root_certificates/
47584756

47594757
====================================================================================================

impeller/fixtures/box_fade.frag

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ uniform FrameInfo {
99
}
1010
frame_info;
1111

12-
in vec2 interporlated_texture_coordinates;
12+
in vec2 interpolated_texture_coordinates;
1313

1414
out vec4 frag_color;
1515

1616
uniform sampler2D contents1;
1717
uniform sampler2D contents2;
1818

1919
void main() {
20-
vec4 tex1 = texture(contents1, interporlated_texture_coordinates);
21-
vec4 tex2 = texture(contents2, interporlated_texture_coordinates);
20+
vec4 tex1 = texture(contents1, interpolated_texture_coordinates);
21+
vec4 tex2 = texture(contents2, interpolated_texture_coordinates);
2222
frag_color = mix(
2323
tex1, tex2,
2424
clamp(frame_info.cursor_position.x / frame_info.window_size.x, 0.0, 1.0));

impeller/fixtures/box_fade.vert

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ uniform_buffer;
1010
in vec3 vertex_position;
1111
in vec2 texture_coordinates;
1212

13-
out vec2 interporlated_texture_coordinates;
13+
out vec2 interpolated_texture_coordinates;
1414

1515
void main() {
1616
gl_Position = uniform_buffer.mvp * vec4(vertex_position, 1.0);
17-
interporlated_texture_coordinates = texture_coordinates;
17+
interpolated_texture_coordinates = texture_coordinates;
1818
}

impeller/fixtures/texture.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
in vec2 interporlated_texture_coordinates;
5+
in vec2 interpolated_texture_coordinates;
66

77
out vec4 frag_color;
88

99
uniform sampler2D texture_contents;
1010

1111
void main() {
12-
frag_color = texture(texture_contents, interporlated_texture_coordinates);
12+
frag_color = texture(texture_contents, interpolated_texture_coordinates);
1313
}

impeller/renderer/backend/vulkan/render_pass_cache_unittests.cc

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,7 @@
1111
namespace impeller {
1212
namespace testing {
1313

14-
using RendererTest = PlaygroundTest;
15-
16-
TEST_P(RendererTest, CachesRenderPassAndFramebuffer) {
17-
if (GetBackend() != PlaygroundBackend::kVulkan) {
18-
GTEST_SKIP() << "Test only applies to Vulkan";
19-
}
20-
21-
auto allocator = std::make_shared<RenderTargetAllocator>(
22-
GetContext()->GetResourceAllocator());
23-
24-
auto render_target = RenderTarget::CreateOffscreenMSAA(
25-
*GetContext(), *allocator, {100, 100}, 1);
26-
auto resolve_texture =
27-
render_target.GetColorAttachments().find(0u)->second.resolve_texture;
28-
auto& texture_vk = TextureVK::Cast(*resolve_texture);
29-
30-
EXPECT_EQ(texture_vk.GetFramebuffer(), nullptr);
31-
EXPECT_EQ(texture_vk.GetRenderPass(), nullptr);
32-
33-
auto buffer = GetContext()->CreateCommandBuffer();
34-
auto render_pass = buffer->CreateRenderPass(render_target);
35-
36-
EXPECT_NE(texture_vk.GetFramebuffer(), nullptr);
37-
EXPECT_NE(texture_vk.GetRenderPass(), nullptr);
38-
39-
render_pass->EncodeCommands();
40-
GetContext()->GetCommandQueue()->Submit({buffer});
41-
42-
// Can be reused without error.
43-
auto buffer_2 = GetContext()->CreateCommandBuffer();
44-
auto render_pass_2 = buffer_2->CreateRenderPass(render_target);
45-
46-
EXPECT_TRUE(render_pass_2->EncodeCommands());
47-
EXPECT_TRUE(GetContext()->GetCommandQueue()->Submit({buffer_2}).ok());
48-
}
14+
//
4915

5016
} // namespace testing
5117
} // namespace impeller

impeller/renderer/backend/vulkan/render_pass_vk.cc

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -170,26 +170,16 @@ RenderPassVK::RenderPassVK(const std::shared_ptr<const Context>& context,
170170
return true;
171171
});
172172

173-
SharedHandleVK<vk::RenderPass> recycled_render_pass;
174-
SharedHandleVK<vk::Framebuffer> recycled_framebuffer;
175-
if (resolve_image_vk_) {
176-
recycled_render_pass = TextureVK::Cast(*resolve_image_vk_).GetRenderPass();
177-
recycled_framebuffer = TextureVK::Cast(*resolve_image_vk_).GetFramebuffer();
178-
}
179-
180173
const auto& target_size = render_target_.GetRenderTargetSize();
181174

182-
render_pass_ =
183-
CreateVKRenderPass(vk_context, recycled_render_pass, command_buffer_);
175+
render_pass_ = CreateVKRenderPass(vk_context, nullptr, command_buffer_);
184176
if (!render_pass_) {
185177
VALIDATION_LOG << "Could not create renderpass.";
186178
is_valid_ = false;
187179
return;
188180
}
189181

190-
auto framebuffer = (recycled_framebuffer == nullptr)
191-
? CreateVKFramebuffer(vk_context, *render_pass_)
192-
: recycled_framebuffer;
182+
auto framebuffer = CreateVKFramebuffer(vk_context, *render_pass_);
193183
if (!framebuffer) {
194184
VALIDATION_LOG << "Could not create framebuffer.";
195185
is_valid_ = false;
@@ -200,10 +190,6 @@ RenderPassVK::RenderPassVK(const std::shared_ptr<const Context>& context,
200190
is_valid_ = false;
201191
return;
202192
}
203-
if (resolve_image_vk_) {
204-
TextureVK::Cast(*resolve_image_vk_).SetFramebuffer(framebuffer);
205-
TextureVK::Cast(*resolve_image_vk_).SetRenderPass(render_pass_);
206-
}
207193

208194
auto clear_values = GetVKClearValues(render_target_);
209195

impeller/renderer/blit_pass_unittests.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ TEST_P(BlitPassTest, BlitAcrossDifferentPixelFormatsFails) {
2424
TextureDescriptor src_desc;
2525
src_desc.format = PixelFormat::kA8UNormInt;
2626
src_desc.size = {100, 100};
27+
src_desc.storage_mode = StorageMode::kHostVisible;
2728
auto src = context->GetResourceAllocator()->CreateTexture(src_desc);
2829

2930
TextureDescriptor dst_format;
3031
dst_format.format = PixelFormat::kR8G8B8A8UNormInt;
3132
dst_format.size = {100, 100};
33+
dst_format.storage_mode = StorageMode::kHostVisible;
3234
auto dst = context->GetResourceAllocator()->CreateTexture(dst_format);
3335

3436
EXPECT_FALSE(blit_pass->AddCopy(src, dst));

shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,19 @@
1919
import androidx.annotation.NonNull;
2020
import androidx.annotation.VisibleForTesting;
2121

22-
@TargetApi(20)
22+
@TargetApi(21)
2323
class VirtualDisplayController {
2424
private static String TAG = "VirtualDisplayController";
2525

26+
private static VirtualDisplay.Callback callback =
27+
new VirtualDisplay.Callback() {
28+
@Override
29+
public void onPaused() {}
30+
31+
@Override
32+
public void onResumed() {}
33+
};
34+
2635
public static VirtualDisplayController create(
2736
Context context,
2837
AccessibilityEventsDelegate accessibilityEventsDelegate,
@@ -40,6 +49,7 @@ public static VirtualDisplayController create(
4049
DisplayManager displayManager =
4150
(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
4251
final DisplayMetrics metrics = context.getResources().getDisplayMetrics();
52+
4353
// Virtual Display crashes for some PlatformViews if the width or height is bigger
4454
// than the physical screen size. We have tried to clamp or scale down the size to prevent
4555
// the crash, but both solutions lead to unwanted behavior because the
@@ -51,14 +61,17 @@ public static VirtualDisplayController create(
5161
// virtual display and AndroidPlatformView widget.
5262
// https://github.com/flutter/flutter/issues/93115
5363
renderTarget.resize(width, height);
64+
int flags = 0;
5465
VirtualDisplay virtualDisplay =
5566
displayManager.createVirtualDisplay(
5667
"flutter-vd#" + viewId,
5768
width,
5869
height,
5970
metrics.densityDpi,
6071
renderTarget.getSurface(),
61-
0);
72+
flags,
73+
callback,
74+
null /* handler */);
6275

6376
if (virtualDisplay == null) {
6477
return null;
@@ -148,9 +161,17 @@ public void resize(final int width, final int height, final Runnable onNewSizeFr
148161
final DisplayManager displayManager =
149162
(DisplayManager) context.getSystemService(Context.DISPLAY_SERVICE);
150163
renderTarget.resize(width, height);
164+
int flags = 0;
151165
virtualDisplay =
152166
displayManager.createVirtualDisplay(
153-
"flutter-vd#" + viewId, width, height, densityDpi, renderTarget.getSurface(), 0);
167+
"flutter-vd#" + viewId,
168+
width,
169+
height,
170+
densityDpi,
171+
renderTarget.getSurface(),
172+
flags,
173+
callback,
174+
null /* handler */);
154175

155176
final View embeddedView = getView();
156177
// There's a bug in Android version older than O where view tree observer onDrawListeners don't
@@ -210,12 +231,14 @@ public void dispose() {
210231
renderTarget.release();
211232
}
212233

234+
// On Android versions 31+ resizing of a Virtual Display's Presentation is natively supported.
213235
@TargetApi(31)
214236
private void resize31(
215237
View embeddedView, int width, int height, final Runnable onNewSizeFrameAvailable) {
216238
renderTarget.resize(width, height);
217-
// On Android versions 31+ resizing of a Virtual Display's Presentation is natively supported.
218239
virtualDisplay.resize(width, height, densityDpi);
240+
// Must update the surface to match the renderTarget's current surface.
241+
virtualDisplay.setSurface(renderTarget.getSurface());
219242
embeddedView.postDelayed(onNewSizeFrameAvailable, 0);
220243
}
221244

0 commit comments

Comments
 (0)