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

Commit 6de3174

Browse files
authored
Merge branch 'master' into jni_end
2 parents f587178 + f6455fa commit 6de3174

11 files changed

+63
-39
lines changed

DEPS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ vars = {
2626
'skia_git': 'https://skia.googlesource.com',
2727
# OCMock is for testing only so there is no google clone
2828
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
29-
'skia_revision': '32d5cfa1f35e0368f3d1b2a807514a1a0ec814bb',
29+
'skia_revision': '21bbfc6c2dfe07f0406df3dcce4eddd160db92b7',
3030

3131
# When updating the Dart revision, ensure that all entries that are
3232
# dependencies of Dart are also updated to match the entries in the
3333
# Dart SDK's DEPS file for that revision of Dart. The DEPS file for
3434
# Dart is: https://github.com/dart-lang/sdk/blob/master/DEPS.
3535
# You can use //tools/dart/create_updated_flutter_deps.py to produce
3636
# updated revision list of existing dependencies.
37-
'dart_revision': 'f043f9e5f6ea4194c0ff4114e30adc5380cbc932',
37+
'dart_revision': '50836c171e9153459aafef4a2404b3180fb35fd6',
3838

3939
# WARNING: DO NOT EDIT MANUALLY
4040
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
@@ -110,7 +110,7 @@ allowed_hosts = [
110110
]
111111

112112
deps = {
113-
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'd00ecf066669b2d6b3f9174de581864655bce6ff',
113+
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'b445ea3b0aec9c9aa9bc1833d1423a8db71e9358',
114114

115115
# Fuchsia compatibility
116116
#
@@ -354,7 +354,7 @@ deps = {
354354
Var('dart_git') + '/package_config.git@9c586d04bd26fef01215fd10e7ab96a3050cfa64',
355355

356356
'src/third_party/dart/tools/sdks':
357-
{'packages': [{'version': 'version:2.9.0-15.0.dev', 'package': 'dart/dart-sdk/${{platform}}'}], 'dep_type': 'cipd'},
357+
{'packages': [{'version': 'version:2.9.0-10.0.dev', 'package': 'dart/dart-sdk/${{platform}}'}], 'dep_type': 'cipd'},
358358

359359
# WARNING: end of dart dependencies list that is cleaned up automatically - see create_updated_flutter_deps.py.
360360

@@ -521,7 +521,7 @@ deps = {
521521
'packages': [
522522
{
523523
'package': 'fuchsia/sdk/core/mac-amd64',
524-
'version': 'Wj0yogFK9aLJz9Ywn4EvTVNZFgia4Li_-l3iQZjARlsC'
524+
'version': 'gR0ZcVF7fBt2skRCkqUqX9GgjPH0Jxs8H6CwJdT65OcC'
525525
}
526526
],
527527
'condition': 'host_os == "mac"',

ci/licenses_golden/licenses_skia

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 993fb29d3f36954f6bd8c6cc91a573ef
1+
Signature: cfdd5bbe0473ca5d32a6dea2b2b55e27
22

33
UNUSED LICENSES:
44

ci/licenses_golden/licenses_third_party

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: e2381fb0c6bd8969b9e68bc7898a2915
1+
Signature: bfcb15c7a644429b76382d47bc5aa5d7
22

33
UNUSED LICENSES:
44

shell/common/BUILD.gn

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,21 +223,21 @@ if (enable_unittests) {
223223

224224
defines += [ "SHELL_ENABLE_GL" ]
225225
}
226+
}
226227

227-
if (test_enable_vulkan) {
228-
sources += [
229-
"shell_test_platform_view_vulkan.cc",
230-
"shell_test_platform_view_vulkan.h",
231-
]
228+
if (test_enable_vulkan) {
229+
sources += [
230+
"shell_test_platform_view_vulkan.cc",
231+
"shell_test_platform_view_vulkan.h",
232+
]
232233

233-
public_deps += [
234-
"//flutter/shell/gpu:gpu_surface_vulkan",
235-
"//flutter/testing:vulkan",
236-
"//flutter/vulkan",
237-
]
234+
public_deps += [
235+
"//flutter/shell/gpu:gpu_surface_vulkan",
236+
"//flutter/testing:vulkan",
237+
"//flutter/vulkan",
238+
]
238239

239-
defines += [ "SHELL_ENABLE_VULKAN" ]
240-
}
240+
defines += [ "SHELL_ENABLE_VULKAN" ]
241241
}
242242
}
243243

@@ -263,6 +263,10 @@ if (enable_unittests) {
263263
if (!defined(defines)) {
264264
defines = []
265265
}
266+
267+
if (test_enable_vulkan) {
268+
defines += [ "SHELL_ENABLE_VULKAN" ]
269+
}
266270
}
267271

268272
if (is_fuchsia) {

shell/common/persistent_cache_unittests.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,17 @@ TEST_F(ShellTest, CacheSkSLWorks) {
9999
firstFrameLatch.Wait();
100100
WaitForIO(shell.get());
101101

102+
// Shader precompilation from SKSL is not implemented on the Skia Vulkan
103+
// backend so don't run the second half of this test on Vulkan. This can get
104+
// removed if SKSL precompilation is implemented in the Skia Vulkan backend.
105+
#if !defined(SHELL_ENABLE_VULKAN)
102106
// To check that all shaders are precompiled, verify that no new skp is dumped
103107
// due to shader compilations.
104108
int old_skp_count = skp_count;
105109
skp_count = 0;
106110
fml::VisitFilesRecursively(dir.fd(), skp_visitor);
107111
ASSERT_EQ(skp_count, old_skp_count);
112+
#endif // !defined(SHELL_ENABLE_VULKAN)
108113

109114
// Remove all files generated
110115
fml::FileVisitor remove_visitor = [&remove_visitor](

shell/common/rasterizer.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ void Rasterizer::DrawLastLayerTree() {
120120
}
121121

122122
void Rasterizer::Draw(std::shared_ptr<LayerTreeHolder> layer_tree_holder) {
123+
if (layer_tree_holder->IsEmpty()) {
124+
// We do not have any frame to raster.
125+
return;
126+
}
123127
TRACE_EVENT0("flutter", "GPURasterizer::Draw");
124128
if (raster_thread_merger_ &&
125129
!raster_thread_merger_->IsOnRasterizingThread()) {

shell/common/shell_test_platform_view_vulkan.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
#include "flutter/shell/common/shell_test_platform_view_vulkan.h"
6+
#include "flutter/shell/common/persistent_cache.h"
67
#include "flutter/vulkan/vulkan_utilities.h"
78

89
namespace flutter {
@@ -105,7 +106,14 @@ bool ShellTestPlatformViewVulkan::OffScreenSurface::CreateSkiaGrContext() {
105106
return false;
106107
}
107108

108-
sk_sp<GrContext> context = GrContext::MakeVulkan(backend_context);
109+
GrContextOptions options;
110+
if (PersistentCache::cache_sksl()) {
111+
options.fShaderCacheStrategy = GrContextOptions::ShaderCacheStrategy::kSkSL;
112+
}
113+
PersistentCache::MarkStrategySet();
114+
options.fPersistentCache = PersistentCache::GetCacheForProcess();
115+
116+
sk_sp<GrContext> context = GrContext::MakeVulkan(backend_context, options);
109117

110118
if (context == nullptr) {
111119
FML_DLOG(ERROR) << "Failed to create GrContext";

shell/platform/android/platform_view_android_jni_impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ bool PlatformViewAndroid::Register(JNIEnv* env) {
737737
FML_LOG(ERROR) << "Could not locate onEndFrame method";
738738
return false;
739739
}
740-
740+
741741
g_on_display_overlay_surface_method = env->GetMethodID(
742742
g_flutter_jni_class->obj(), "onDisplayOverlaySurface", "(IIIII)V");
743743

shell/platform/linux/fl_text_input_plugin.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ FlTextInputPlugin* fl_text_input_plugin_new(FlBinaryMessenger* messenger) {
288288
gboolean fl_text_input_plugin_filter_keypress(FlTextInputPlugin* self,
289289
GdkEventKey* event) {
290290
g_return_val_if_fail(FL_IS_TEXT_INPUT_PLUGIN(self), FALSE);
291+
292+
if (self->client_id == kClientIdUnset)
293+
return FALSE;
294+
291295
if (gtk_im_context_filter_keypress(self->im_context, event))
292296
return TRUE;
293297

shell/platform/linux/fl_view.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,8 @@ static gboolean fl_view_motion_notify_event(GtkWidget* widget,
330330
static gboolean fl_view_key_press_event(GtkWidget* widget, GdkEventKey* event) {
331331
FlView* self = FL_VIEW(widget);
332332

333-
if (fl_text_input_plugin_filter_keypress(self->text_input_plugin, event))
334-
return TRUE;
335-
336333
fl_key_event_plugin_send_key_event(self->key_event_plugin, event);
334+
fl_text_input_plugin_filter_keypress(self->text_input_plugin, event);
337335

338336
return TRUE;
339337
}
@@ -343,10 +341,8 @@ static gboolean fl_view_key_release_event(GtkWidget* widget,
343341
GdkEventKey* event) {
344342
FlView* self = FL_VIEW(widget);
345343

346-
if (fl_text_input_plugin_filter_keypress(self->text_input_plugin, event))
347-
return TRUE;
348-
349344
fl_key_event_plugin_send_key_event(self->key_event_plugin, event);
345+
fl_text_input_plugin_filter_keypress(self->text_input_plugin, event);
350346

351347
return TRUE;
352348
}

testing/BUILD.gn

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ source_set("fixture_test") {
9898
}
9999

100100
if (enable_unittests) {
101+
source_set("vulkan") {
102+
testonly = true
103+
104+
deps = [
105+
":skia",
106+
"//flutter/fml",
107+
]
108+
109+
# SwiftShader only supports x86/x64_64
110+
if (target_cpu == "x86" || target_cpu == "x64") {
111+
configs += [ "//third_party/swiftshader_flutter:swiftshader_config" ]
112+
deps += [ "//third_party/swiftshader_flutter:swiftshader_vulkan" ]
113+
}
114+
}
115+
101116
# SwiftShader only supports x86/x64_64
102117
if (target_cpu == "x86" || target_cpu == "x64") {
103118
source_set("opengl") {
@@ -117,18 +132,6 @@ if (enable_unittests) {
117132
]
118133
}
119134

120-
source_set("vulkan") {
121-
testonly = true
122-
123-
configs += [ "//third_party/swiftshader_flutter:swiftshader_config" ]
124-
125-
deps = [
126-
":skia",
127-
"//flutter/fml",
128-
"//third_party/swiftshader_flutter:swiftshader_vulkan",
129-
]
130-
}
131-
132135
# All targets on all platforms should be able to use the Metal utilities. On
133136
# platforms where Metal is not available, the tests must be skipped or
134137
# implemented to use another available client rendering API. This is usually

0 commit comments

Comments
 (0)