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

Commit fac302b

Browse files
committed
Merge branch 'master' into jni_create
2 parents 2668256 + 983b6e1 commit fac302b

Some content is hidden

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

43 files changed

+2132
-1903
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': 'ac16760df46352bd3341d8be0ef3f70a273dbfe0',
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': 'H-uAkPvuDon58GTpK_AIt9mUp7BV6bkmM6_oimQ-EIQC'
525525
}
526526
],
527527
'condition': 'host_os == "mac"',

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# private fields, especially on the Window object):
1111

1212
analyzer:
13+
enable-experiment:
14+
- non-nullable
1315
exclude: [
1416
# this test pretends to be part of dart:ui and results in lots of false
1517
# positives.

ci/analyze.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dartanalyzer --version
77

88
RESULTS=`dartanalyzer \
99
--options flutter/analysis_options.yaml \
10+
--enable-experiment=non-nullable \
1011
"$1out/host_debug_unopt/gen/sky/bindings/dart_ui/ui.dart" \
1112
2>&1 \
1213
| grep -Ev "No issues found!" \

ci/licenses_golden/licenses_flutter

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ LIBRARY: txt
1111
ORIGIN: ../../../flutter/LICENSE
1212
TYPE: LicenseType.bsd
1313
FILE: ../../../flutter/.clang-tidy
14-
FILE: ../../../flutter/.gradle/6.5/fileChanges/last-build.bin
15-
FILE: ../../../flutter/.gradle/buildOutputCleanup/cache.properties
1614
FILE: ../../../flutter/DEPS
1715
FILE: ../../../flutter/assets/asset_manager.cc
1816
FILE: ../../../flutter/assets/asset_manager.h
@@ -704,7 +702,6 @@ FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/Flutte
704702
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java
705703
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java
706704
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java
707-
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterOverlaySurface.java
708705
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java
709706
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java
710707
FILE: ../../../flutter/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java
@@ -1104,6 +1101,7 @@ FILE: ../../../flutter/shell/platform/fuchsia/flutter/accessibility_bridge_unitt
11041101
FILE: ../../../flutter/shell/platform/fuchsia/flutter/collect_traces.dart
11051102
FILE: ../../../flutter/shell/platform/fuchsia/flutter/component.cc
11061103
FILE: ../../../flutter/shell/platform/fuchsia/flutter/component.h
1104+
FILE: ../../../flutter/shell/platform/fuchsia/flutter/component_unittest.cc
11071105
FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.cc
11081106
FILE: ../../../flutter/shell/platform/fuchsia/flutter/compositor_context.h
11091107
FILE: ../../../flutter/shell/platform/fuchsia/flutter/engine.cc

ci/licenses_golden/licenses_skia

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Signature: 993fb29d3f36954f6bd8c6cc91a573ef
1+
Signature: 23602ff03d68b0564c600da5a646ae6b
22

33
UNUSED LICENSES:
44

@@ -3493,6 +3493,8 @@ FILE: ../../../third_party/skia/src/gpu/ops/GrQuadPerEdgeAA.cpp
34933493
FILE: ../../../third_party/skia/src/gpu/ops/GrQuadPerEdgeAA.h
34943494
FILE: ../../../third_party/skia/src/gpu/ops/GrStrokeRectOp.cpp
34953495
FILE: ../../../third_party/skia/src/gpu/ops/GrStrokeRectOp.h
3496+
FILE: ../../../third_party/skia/src/gpu/tessellate/GrStrokeGeometry.cpp
3497+
FILE: ../../../third_party/skia/src/gpu/tessellate/GrStrokeGeometry.h
34963498
FILE: ../../../third_party/skia/src/gpu/text/GrAtlasManager.cpp
34973499
FILE: ../../../third_party/skia/src/gpu/text/GrAtlasManager.h
34983500
FILE: ../../../third_party/skia/src/gpu/text/GrSDFMaskFilter.cpp
@@ -3900,6 +3902,7 @@ FILE: ../../../third_party/skia/gm/crbug_1041204.cpp
39003902
FILE: ../../../third_party/skia/gm/crbug_224618.cpp
39013903
FILE: ../../../third_party/skia/gm/encode_color_types.cpp
39023904
FILE: ../../../third_party/skia/gm/userfont.cpp
3905+
FILE: ../../../third_party/skia/gm/ycbcrimage.cpp
39033906
FILE: ../../../third_party/skia/include/gpu/GrBackendSurfaceMutableState.h
39043907
FILE: ../../../third_party/skia/include/gpu/d3d/GrD3DBackendContext.h
39053908
FILE: ../../../third_party/skia/include/gpu/d3d/GrD3DTypes.h
@@ -5279,6 +5282,7 @@ FILE: ../../../third_party/skia/src/core/SkVerticesPriv.h
52795282
FILE: ../../../third_party/skia/src/gpu/GrDynamicAtlas.cpp
52805283
FILE: ../../../third_party/skia/src/gpu/GrDynamicAtlas.h
52815284
FILE: ../../../third_party/skia/src/gpu/GrEagerVertexAllocator.h
5285+
FILE: ../../../third_party/skia/src/gpu/GrHashMapWithCache.h
52825286
FILE: ../../../third_party/skia/src/gpu/GrStagingBuffer.cpp
52835287
FILE: ../../../third_party/skia/src/gpu/GrStagingBuffer.h
52845288
FILE: ../../../third_party/skia/src/gpu/ccpr/GrAutoMapVertexBuffer.h
@@ -5720,6 +5724,43 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57205724
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57215725
====================================================================================================
57225726

5727+
====================================================================================================
5728+
LIBRARY: skia
5729+
ORIGIN: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSVG.cpp + ../../../third_party/skia/LICENSE
5730+
TYPE: LicenseType.bsd
5731+
FILE: ../../../third_party/skia/fuzz/oss_fuzz/FuzzSVG.cpp
5732+
----------------------------------------------------------------------------------------------------
5733+
Copyright 2020 Google, LLC
5734+
5735+
Redistribution and use in source and binary forms, with or without
5736+
modification, are permitted provided that the following conditions are
5737+
met:
5738+
5739+
* Redistributions of source code must retain the above copyright
5740+
notice, this list of conditions and the following disclaimer.
5741+
5742+
* Redistributions in binary form must reproduce the above copyright
5743+
notice, this list of conditions and the following disclaimer in
5744+
the documentation and/or other materials provided with the
5745+
distribution.
5746+
5747+
* Neither the name of the copyright holder nor the names of its
5748+
contributors may be used to endorse or promote products derived
5749+
from this software without specific prior written permission.
5750+
5751+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5752+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5753+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5754+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5755+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5756+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5757+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5758+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5759+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5760+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5761+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5762+
====================================================================================================
5763+
57235764
====================================================================================================
57245765
LIBRARY: skia
57255766
ORIGIN: ../../../third_party/skia/gm/circles.cpp + ../../../third_party/skia/LICENSE
@@ -7131,4 +7172,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
71317172
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
71327173
THE SOFTWARE.
71337174
====================================================================================================
7134-
Total license count: 58
7175+
Total license count: 59

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

lib/ui/annotations.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
// TODO(dnfield): Remove unused_import ignores when https://github.com/dart-lang/sdk/issues/35164 is resolved.
66

7-
// @dart = 2.6
7+
// @dart = 2.9
8+
89
part of dart.ui;
910

1011
// TODO(dnfield): Update this if/when we default this to on in the tool,
@@ -39,7 +40,7 @@ part of dart.ui;
3940
/// }
4041
/// }
4142
/// ```
42-
const _KeepToString/*!*/ keepToString = _KeepToString();
43+
const _KeepToString keepToString = _KeepToString();
4344

4445
class _KeepToString {
4546
const _KeepToString();

lib/ui/channel_buffers.dart

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

5-
// @dart = 2.6
5+
// @dart = 2.9
6+
67
part of dart.ui;
78

89
/// A saved platform message for a channel with its callback.
@@ -14,12 +15,12 @@ class _StoredMessage {
1415
_StoredMessage(this._data, this._callback);
1516

1617
/// Representation of the message's payload.
17-
final ByteData/*?*/ _data;
18-
ByteData/*?*/ get data => _data;
18+
final ByteData? _data;
19+
ByteData? get data => _data;
1920

2021
/// Callback to be called when the message is received.
21-
final PlatformMessageResponseCallback/*!*/ _callback;
22-
PlatformMessageResponseCallback/*!*/ get callback => _callback;
22+
final PlatformMessageResponseCallback _callback;
23+
PlatformMessageResponseCallback get callback => _callback;
2324
}
2425

2526
/// A fixed-size circular queue.
@@ -43,7 +44,7 @@ class _RingBuffer<T> {
4344

4445
/// A callback that get's called when items are ejected from the [_RingBuffer]
4546
/// by way of an overflow or a resizing.
46-
Function(T) _dropItemCallback;
47+
Function(T)? _dropItemCallback;
4748
set dropItemCallback(Function(T) callback) {
4849
_dropItemCallback = callback;
4950
}
@@ -60,7 +61,7 @@ class _RingBuffer<T> {
6061
}
6162

6263
/// Returns null when empty.
63-
T pop() {
64+
T? pop() {
6465
return _queue.isEmpty ? null : _queue.removeFirst();
6566
}
6667

@@ -70,9 +71,7 @@ class _RingBuffer<T> {
7071
int result = 0;
7172
while (_queue.length > lengthLimit) {
7273
final T item = _queue.removeFirst();
73-
if (_dropItemCallback != null) {
74-
_dropItemCallback(item);
75-
}
74+
_dropItemCallback?.call(item);
7675
result += 1;
7776
}
7877
return result;
@@ -86,7 +85,7 @@ class _RingBuffer<T> {
8685
}
8786

8887
/// Signature for [ChannelBuffers.drain].
89-
typedef DrainChannelCallback = Future<void>/*!*/ Function(ByteData/*?*/, PlatformMessageResponseCallback/*!*/);
88+
typedef DrainChannelCallback = Future<void> Function(ByteData?, PlatformMessageResponseCallback);
9089

9190
/// Storage of channel messages until the channels are completely routed,
9291
/// i.e. when a message handler is attached to the channel on the framework side.
@@ -116,8 +115,8 @@ class ChannelBuffers {
116115
static const String kControlChannelName = 'dev.flutter/channel-buffers';
117116

118117
/// A mapping between a channel name and its associated [_RingBuffer].
119-
final Map<String, _RingBuffer<_StoredMessage>> _messages =
120-
<String, _RingBuffer<_StoredMessage>>{};
118+
final Map<String, _RingBuffer<_StoredMessage>?> _messages =
119+
<String, _RingBuffer<_StoredMessage>?>{};
121120

122121
_RingBuffer<_StoredMessage> _makeRingBuffer(int size) {
123122
final _RingBuffer<_StoredMessage> result = _RingBuffer<_StoredMessage>(size);
@@ -130,8 +129,8 @@ class ChannelBuffers {
130129
}
131130

132131
/// Returns true on overflow.
133-
bool/*!*/ push(String/*!*/ channel, ByteData/*?*/ data, PlatformMessageResponseCallback/*!*/ callback) {
134-
_RingBuffer<_StoredMessage> queue = _messages[channel];
132+
bool push(String channel, ByteData? data, PlatformMessageResponseCallback callback) {
133+
_RingBuffer<_StoredMessage>? queue = _messages[channel];
135134
if (queue == null) {
136135
queue = _makeRingBuffer(kDefaultBufferSize);
137136
_messages[channel] = queue;
@@ -150,23 +149,23 @@ class ChannelBuffers {
150149
}
151150

152151
/// Returns null on underflow.
153-
_StoredMessage _pop(String channel) {
154-
final _RingBuffer<_StoredMessage> queue = _messages[channel];
155-
final _StoredMessage result = queue?.pop();
152+
_StoredMessage? _pop(String channel) {
153+
final _RingBuffer<_StoredMessage>? queue = _messages[channel];
154+
final _StoredMessage? result = queue?.pop();
156155
return result;
157156
}
158157

159158
bool _isEmpty(String channel) {
160-
final _RingBuffer<_StoredMessage> queue = _messages[channel];
161-
return (queue == null) ? true : queue.isEmpty;
159+
final _RingBuffer<_StoredMessage>? queue = _messages[channel];
160+
return queue == null || queue.isEmpty;
162161
}
163162

164163
/// Changes the capacity of the queue associated with the given channel.
165164
///
166165
/// This could result in the dropping of messages if newSize is less
167166
/// than the current length of the queue.
168167
void _resize(String channel, int newSize) {
169-
_RingBuffer<_StoredMessage> queue = _messages[channel];
168+
_RingBuffer<_StoredMessage>? queue = _messages[channel];
170169
if (queue == null) {
171170
queue = _makeRingBuffer(newSize);
172171
_messages[channel] = queue;
@@ -182,9 +181,9 @@ class ChannelBuffers {
182181
///
183182
/// This should be called once a channel is prepared to handle messages
184183
/// (i.e. when a message handler is setup in the framework).
185-
Future<void>/*!*/ drain(String/*!*/ channel, DrainChannelCallback/*!*/ callback) async {
184+
Future<void> drain(String channel, DrainChannelCallback callback) async {
186185
while (!_isEmpty(channel)) {
187-
final _StoredMessage message = _pop(channel);
186+
final _StoredMessage message = _pop(channel)!;
188187
await callback(message.data, message.callback);
189188
}
190189
}
@@ -204,7 +203,7 @@ class ChannelBuffers {
204203
/// Arity: 2
205204
/// Format: `resize\r<channel name>\r<new size>`
206205
/// Description: Allows you to set the size of a channel's buffer.
207-
void handleMessage(ByteData/*!*/ data) {
206+
void handleMessage(ByteData data) {
208207
final List<String> command = _getString(data).split('\r');
209208
if (command.length == /*arity=*/2 + 1 && command[0] == 'resize') {
210209
_resize(command[1], int.parse(command[2]));
@@ -220,4 +219,4 @@ class ChannelBuffers {
220219
///
221220
/// See also:
222221
/// * [BinaryMessenger] - The place where ChannelBuffers are typically read.
223-
final ChannelBuffers/*!*/ channelBuffers = ChannelBuffers();
222+
final ChannelBuffers channelBuffers = ChannelBuffers();

0 commit comments

Comments
 (0)