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

Commit b23ac23

Browse files
author
Jonah Williams
authored
Merge branch 'main' into do_everything_plus_barrier
2 parents a071e9b + 924d5db commit b23ac23

Some content is hidden

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

52 files changed

+1003
-883
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
====================================================================================================

flow/frame_timings.cc

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,6 @@
1313

1414
namespace flutter {
1515

16-
namespace {
17-
18-
const char* StateToString(FrameTimingsRecorder::State state) {
19-
#ifndef NDEBUG
20-
switch (state) {
21-
case FrameTimingsRecorder::State::kUninitialized:
22-
return "kUninitialized";
23-
case FrameTimingsRecorder::State::kVsync:
24-
return "kVsync";
25-
case FrameTimingsRecorder::State::kBuildStart:
26-
return "kBuildStart";
27-
case FrameTimingsRecorder::State::kBuildEnd:
28-
return "kBuildEnd";
29-
case FrameTimingsRecorder::State::kRasterStart:
30-
return "kRasterStart";
31-
case FrameTimingsRecorder::State::kRasterEnd:
32-
return "kRasterEnd";
33-
};
34-
FML_UNREACHABLE();
35-
#endif
36-
return "";
37-
}
38-
39-
} // namespace
40-
4116
std::atomic<uint64_t> FrameTimingsRecorder::frame_number_gen_ = {1};
4217

4318
FrameTimingsRecorder::FrameTimingsRecorder()
@@ -280,8 +255,7 @@ const char* FrameTimingsRecorder::GetFrameNumberTraceArg() const {
280255
}
281256

282257
void FrameTimingsRecorder::AssertInState(State state) const {
283-
FML_DCHECK(state_ == state) << "Expected state " << StateToString(state)
284-
<< ", actual state " << StateToString(state_);
258+
FML_DCHECK(state_ == state);
285259
}
286260

287261
} // namespace flutter

flow/frame_timings.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class FrameTimingsRecorder {
3131
public:
3232
/// Various states that the recorder can be in. When created the recorder is
3333
/// in an unitialized state and transtions in sequential order of the states.
34-
// After adding an item to this enum, modify StateToString accordingly.
3534
enum class State : uint32_t {
3635
kUninitialized,
3736
kVsync,
@@ -122,8 +121,6 @@ class FrameTimingsRecorder {
122121
///
123122
/// Instead of adding a `GetState` method and asserting on the result, this
124123
/// method prevents other logic from relying on the state.
125-
///
126-
/// In release builds, this call is a no-op.
127124
void AssertInState(State state) const;
128125

129126
private:

impeller/base/base_unittests.cc

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

55
#include "flutter/testing/testing.h"
6+
#include "impeller/base/promise.h"
67
#include "impeller/base/strings.h"
78
#include "impeller/base/thread.h"
89

@@ -233,5 +234,21 @@ TEST(ConditionVariableTest, TestsCriticalSectionAfterWait) {
233234
ASSERT_EQ(sum, kThreadCount);
234235
}
235236

237+
TEST(BaseTest, NoExceptionPromiseValue) {
238+
NoExceptionPromise<int> wrapper;
239+
std::future future = wrapper.get_future();
240+
wrapper.set_value(123);
241+
ASSERT_EQ(future.get(), 123);
242+
}
243+
244+
TEST(BaseTest, NoExceptionPromiseEmpty) {
245+
auto wrapper = std::make_shared<NoExceptionPromise<int>>();
246+
std::future future = wrapper->get_future();
247+
248+
// Destroy the empty promise with the future still pending. Verify that the
249+
// process does not abort while destructing the promise.
250+
wrapper.reset();
251+
}
252+
236253
} // namespace testing
237254
} // namespace impeller

impeller/base/promise.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,34 @@ std::future<T> RealizedFuture(T t) {
1717
return future;
1818
}
1919

20+
// Wraps a std::promise and completes the promise with a value during
21+
// destruction if the promise does not already have a value.
22+
//
23+
// By default the std::promise destructor will complete an empty promise with an
24+
// exception. This will fail because Flutter is built without exception support.
25+
template <typename T>
26+
class NoExceptionPromise {
27+
public:
28+
NoExceptionPromise() = default;
29+
30+
~NoExceptionPromise() {
31+
if (!value_set_) {
32+
promise_.set_value({});
33+
}
34+
}
35+
36+
std::future<T> get_future() { return promise_.get_future(); }
37+
38+
void set_value(const T& value) {
39+
promise_.set_value(value);
40+
value_set_ = true;
41+
}
42+
43+
private:
44+
std::promise<T> promise_;
45+
bool value_set_ = false;
46+
};
47+
2048
} // namespace impeller
2149

2250
#endif // FLUTTER_IMPELLER_BASE_PROMISE_H_

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
}

0 commit comments

Comments
 (0)