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

Commit 208b7aa

Browse files
authored
Merge branch 'main' into add-share-to-selection-controls
2 parents 9b6d693 + d5db728 commit 208b7aa

35 files changed

+524
-247
lines changed

DEPS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ vars = {
1818
'llvm_git': 'https://llvm.googlesource.com',
1919
# OCMock is for testing only so there is no google clone
2020
'ocmock_git': 'https://github.com/erikdoe/ocmock.git',
21-
'skia_revision': '491f67637e6ef7b63546c4ed98fb7431b938c00a',
21+
'skia_revision': 'b6492f5ce8c3b44bea9299a5850770d150d01b76',
2222

2323
# WARNING: DO NOT EDIT canvaskit_cipd_instance MANUALLY
2424
# See `lib/web_ui/README.md` for how to roll CanvasKit to a new version.
@@ -53,7 +53,7 @@ vars = {
5353
# Dart is: https://github.com/dart-lang/sdk/blob/main/DEPS
5454
# You can use //tools/dart/create_updated_flutter_deps.py to produce
5555
# updated revision list of existing dependencies.
56-
'dart_revision': 'd89e4ead966d9f58020b93c69007bc14a20ee745',
56+
'dart_revision': '46da53e7abe2e430c20baf0a9249d2a14a470073',
5757

5858
# WARNING: DO NOT EDIT MANUALLY
5959
# The lines between blank lines above and below are generated by a script. See create_updated_flutter_deps.py
@@ -72,7 +72,7 @@ vars = {
7272
'dart_root_certificates_rev': '692f6d6488af68e0121317a9c2c9eb393eb0ee50',
7373
'dart_tools_rev': 'f14bf2eb3d4d5bdcb6ea5d6862d33a319dfd9564',
7474
'dart_watcher_rev': '7457413060ed7403b90b01533a61bd959932122e',
75-
'dart_webdev_rev': '5081dff0952eb7163f98a508d7b2d976c1573c55',
75+
'dart_webdev_rev': 'f8f752cb455935a7dfe626bcb357645c41749725',
7676
'dart_webkit_inspection_protocol_rev': '39a3c297ff573635e7936b015ce4f3466e4739d6',
7777
'dart_yaml_edit_rev': '87dcf31fcaada207ae7c3527f9885982534badce',
7878
'dart_zlib_rev': '14dd4c4455602c9b71a1a89b5cafd1f4030d2e3f',
@@ -431,7 +431,7 @@ deps = {
431431
Var('dart_git') + '/package_config.git@981c49dfec1e3e3e90f336dcd7c225923d2fd321',
432432

433433
'src/third_party/dart/third_party/pkg/path':
434-
Var('dart_git') + '/path.git@282dd18bd9ae2e265ea40a29b2c637194e9be8b7',
434+
Var('dart_git') + '/path.git@7c2324bdb4c75a17de8a3d1e6afe8cc0756ef5f9',
435435

436436
'src/third_party/dart/third_party/pkg/pool':
437437
Var('dart_git') + '/pool.git@77001024a16126cc5718e654ea3e57bbf6e7fac3',
@@ -884,7 +884,7 @@ deps = {
884884
'packages': [
885885
{
886886
'package': 'fuchsia/sdk/core/mac-amd64',
887-
'version': 'zoCGnScKZWbm5s9HyAjx76EBVB8sGlXfVdo-mqVQ5PMC'
887+
'version': 'SoKcmsZ5H8uHJXV1S-usFW2d9gflCTQCiZ7pJIgc7FcC'
888888
}
889889
],
890890
'condition': 'host_os == "mac" and not download_fuchsia_sdk',
@@ -894,7 +894,7 @@ deps = {
894894
'packages': [
895895
{
896896
'package': 'fuchsia/sdk/core/linux-amd64',
897-
'version': 'ZCP8LDbKF4LTBFz_W5JeK5PEaIsrWaGGiH9iKZoHTJkC'
897+
'version': 'konJQZKk2qXc276iAIxQgmZOqP26ZATMf3alFxYkhDIC'
898898
}
899899
],
900900
'condition': 'host_os == "linux" and not download_fuchsia_sdk',

ci/licenses_golden/licenses_flutter

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,8 @@ ORIGIN: ../../../flutter/impeller/compiler/compiler_backend.cc + ../../../flutte
10821082
ORIGIN: ../../../flutter/impeller/compiler/compiler_backend.h + ../../../flutter/LICENSE
10831083
ORIGIN: ../../../flutter/impeller/compiler/compiler_test.cc + ../../../flutter/LICENSE
10841084
ORIGIN: ../../../flutter/impeller/compiler/compiler_test.h + ../../../flutter/LICENSE
1085+
ORIGIN: ../../../flutter/impeller/compiler/constants.cc + ../../../flutter/LICENSE
1086+
ORIGIN: ../../../flutter/impeller/compiler/constants.h + ../../../flutter/LICENSE
10851087
ORIGIN: ../../../flutter/impeller/compiler/impellerc_main.cc + ../../../flutter/LICENSE
10861088
ORIGIN: ../../../flutter/impeller/compiler/include_dir.h + ../../../flutter/LICENSE
10871089
ORIGIN: ../../../flutter/impeller/compiler/includer.cc + ../../../flutter/LICENSE
@@ -1348,6 +1350,7 @@ ORIGIN: ../../../flutter/impeller/entity/shaders/sweep_gradient_fill.frag + ../.
13481350
ORIGIN: ../../../flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag + ../../../flutter/LICENSE
13491351
ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill.frag + ../../../flutter/LICENSE
13501352
ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill.vert + ../../../flutter/LICENSE
1353+
ORIGIN: ../../../flutter/impeller/entity/shaders/texture_fill_external.frag + ../../../flutter/LICENSE
13511354
ORIGIN: ../../../flutter/impeller/entity/shaders/tiled_texture_fill.frag + ../../../flutter/LICENSE
13521355
ORIGIN: ../../../flutter/impeller/entity/shaders/vertices.frag + ../../../flutter/LICENSE
13531356
ORIGIN: ../../../flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag + ../../../flutter/LICENSE
@@ -3797,6 +3800,8 @@ FILE: ../../../flutter/impeller/compiler/compiler_backend.cc
37973800
FILE: ../../../flutter/impeller/compiler/compiler_backend.h
37983801
FILE: ../../../flutter/impeller/compiler/compiler_test.cc
37993802
FILE: ../../../flutter/impeller/compiler/compiler_test.h
3803+
FILE: ../../../flutter/impeller/compiler/constants.cc
3804+
FILE: ../../../flutter/impeller/compiler/constants.h
38003805
FILE: ../../../flutter/impeller/compiler/impellerc_main.cc
38013806
FILE: ../../../flutter/impeller/compiler/include_dir.h
38023807
FILE: ../../../flutter/impeller/compiler/includer.cc
@@ -4063,6 +4068,7 @@ FILE: ../../../flutter/impeller/entity/shaders/sweep_gradient_fill.frag
40634068
FILE: ../../../flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag
40644069
FILE: ../../../flutter/impeller/entity/shaders/texture_fill.frag
40654070
FILE: ../../../flutter/impeller/entity/shaders/texture_fill.vert
4071+
FILE: ../../../flutter/impeller/entity/shaders/texture_fill_external.frag
40664072
FILE: ../../../flutter/impeller/entity/shaders/tiled_texture_fill.frag
40674073
FILE: ../../../flutter/impeller/entity/shaders/vertices.frag
40684074
FILE: ../../../flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag

ci/licenses_golden/licenses_fuchsia

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 2c7fdf5c1134dc23605ffd2945adc1f9
1+
Signature: 41ab664d5f5ccd89ca5fb1207a63c8f8
22

33
====================================================================================================
44
LIBRARY: fuchsia_sdk

ci/licenses_golden/licenses_skia

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 610c49b8771144a1fca107bf8ed22d88
1+
Signature: 7cb81751a45b1d0e3abc1b6c276eee26
22

33
====================================================================================================
44
LIBRARY: etc1
@@ -8916,6 +8916,8 @@ ORIGIN: ../../../third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp + ..
89168916
ORIGIN: ../../../third_party/skia/src/core/SkBlitMask.h + ../../../third_party/skia/LICENSE
89178917
ORIGIN: ../../../third_party/skia/src/core/SkBlitMask_opts.cpp + ../../../third_party/skia/LICENSE
89188918
ORIGIN: ../../../third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp + ../../../third_party/skia/LICENSE
8919+
ORIGIN: ../../../third_party/skia/src/core/SkBlitRow_opts.cpp + ../../../third_party/skia/LICENSE
8920+
ORIGIN: ../../../third_party/skia/src/core/SkBlitRow_opts_hsw.cpp + ../../../third_party/skia/LICENSE
89198921
ORIGIN: ../../../third_party/skia/src/core/SkBlitter_A8.h + ../../../third_party/skia/LICENSE
89208922
ORIGIN: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.h + ../../../third_party/skia/LICENSE
89218923
ORIGIN: ../../../third_party/skia/src/core/SkCanvas_Raster.cpp + ../../../third_party/skia/LICENSE
@@ -9143,6 +9145,8 @@ FILE: ../../../third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
91439145
FILE: ../../../third_party/skia/src/core/SkBlitMask.h
91449146
FILE: ../../../third_party/skia/src/core/SkBlitMask_opts.cpp
91459147
FILE: ../../../third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
9148+
FILE: ../../../third_party/skia/src/core/SkBlitRow_opts.cpp
9149+
FILE: ../../../third_party/skia/src/core/SkBlitRow_opts_hsw.cpp
91469150
FILE: ../../../third_party/skia/src/core/SkBlitter_A8.h
91479151
FILE: ../../../third_party/skia/src/core/SkBlurMaskFilterImpl.h
91489152
FILE: ../../../third_party/skia/src/core/SkCanvas_Raster.cpp

impeller/compiler/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ impeller_component("compiler_lib") {
3636
"compiler.h",
3737
"compiler_backend.cc",
3838
"compiler_backend.h",
39+
"constants.cc",
40+
"constants.h",
3941
"include_dir.h",
4042
"includer.cc",
4143
"includer.h",

impeller/compiler/compiler.cc

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
#include "flutter/fml/paths.h"
1515
#include "impeller/base/allocation.h"
1616
#include "impeller/compiler/compiler_backend.h"
17+
#include "impeller/compiler/constants.h"
1718
#include "impeller/compiler/includer.h"
1819
#include "impeller/compiler/logger.h"
1920
#include "impeller/compiler/spirv_compiler.h"
20-
#include "impeller/compiler/types.h"
2121
#include "impeller/compiler/uniform_sorter.h"
22+
#include "impeller/compiler/utilities.h"
2223

2324
namespace impeller {
2425
namespace compiler {
@@ -128,6 +129,23 @@ static CompilerBackend CreateVulkanCompiler(
128129
static CompilerBackend CreateGLSLCompiler(const spirv_cross::ParsedIR& ir,
129130
const SourceOptions& source_options) {
130131
auto gl_compiler = std::make_shared<spirv_cross::CompilerGLSL>(ir);
132+
133+
// Walk the variables and insert the external image extension if any of them
134+
// begins with the external texture prefix. Unfortunately, we can't walk
135+
// `gl_compiler->get_shader_resources().separate_samplers` until the compiler
136+
// is further along.
137+
//
138+
// Unfortunately, we can't just let the shader author add this extension and
139+
// use `samplerExternalOES` directly because compiling to spirv requires the
140+
// source language profile to be at least 310 ES, but this extension is
141+
// incompatible with ES 310+.
142+
for (auto& id : ir.ids_for_constant_or_variable) {
143+
if (StringStartsWith(ir.get_name(id), kExternalTexturePrefix)) {
144+
gl_compiler->require_extension("GL_OES_EGL_image_external");
145+
break;
146+
}
147+
}
148+
131149
spirv_cross::CompilerGLSL::Options sl_options;
132150
sl_options.force_zero_initialized_variables = true;
133151
sl_options.vertex.fixup_clipspace = true;
@@ -137,6 +155,13 @@ static CompilerBackend CreateGLSLCompiler(const spirv_cross::ParsedIR& ir,
137155
? source_options.gles_language_version
138156
: 100;
139157
sl_options.es = true;
158+
gl_compiler->set_variable_type_remap_callback(
159+
[&](const spirv_cross::SPIRType& type, const std::string& var_name,
160+
std::string& name_of_type) {
161+
if (StringStartsWith(var_name, kExternalTexturePrefix)) {
162+
name_of_type = "samplerExternalOES";
163+
}
164+
});
140165
} else {
141166
sl_options.version = source_options.gles_language_version > 0
142167
? source_options.gles_language_version

impeller/compiler/constants.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#include "impeller/compiler/constants.h"
6+
7+
namespace impeller {
8+
namespace compiler {
9+
10+
//
11+
12+
} // namespace compiler
13+
} // namespace impeller

impeller/compiler/constants.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
#pragma once
6+
7+
namespace impeller {
8+
namespace compiler {
9+
10+
constexpr char kExternalTexturePrefix[] = "SAMPLER_EXTERNAL_OES_";
11+
12+
} // namespace compiler
13+
} // namespace impeller

impeller/compiler/reflector.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "impeller/base/strings.h"
1717
#include "impeller/base/validation.h"
1818
#include "impeller/compiler/code_gen_template.h"
19+
#include "impeller/compiler/types.h"
1920
#include "impeller/compiler/uniform_sorter.h"
2021
#include "impeller/compiler/utilities.h"
2122
#include "impeller/geometry/half.h"

impeller/compiler/utilities.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,17 @@ std::string ConvertToEntrypointName(std::string_view string) {
6161
return stream.str();
6262
}
6363

64+
bool StringStartsWith(const std::string& target, const std::string& prefix) {
65+
if (prefix.length() > target.length()) {
66+
return false;
67+
}
68+
for (size_t i = 0; i < prefix.length(); i++) {
69+
if (target[i] != prefix[i]) {
70+
return false;
71+
}
72+
}
73+
return true;
74+
}
75+
6476
} // namespace compiler
6577
} // namespace impeller

0 commit comments

Comments
 (0)