Skip to content

Commit 351f5a3

Browse files
Use the Wuffs GIF decoder (#7658)
Fixes #23838
1 parent 0b014c4 commit 351f5a3

File tree

8 files changed

+312
-584
lines changed

8 files changed

+312
-584
lines changed

DEPS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ deps = {
369369
'src/third_party/libwebp':
370370
Var('chromium_git') + '/webm/libwebp.git' + '@' + '0.6.0',
371371

372+
'src/third_party/wuffs':
373+
Var('fuchsia_git') + '/third_party/wuffs' + '@' + 'a71538baa8f1f4053176c0d9f31bc12fd4e8e71b',
374+
372375
'src/third_party/gyp':
373376
Var('chromium_git') + '/external/gyp.git' + '@' + '4801a5331ae62da9769a327f11c4213d32fb0dad',
374377

ci/licenses_golden/licenses_skia

Lines changed: 2 additions & 580 deletions
Large diffs are not rendered by default.

ci/licenses_golden/licenses_third_party

Lines changed: 283 additions & 2 deletions
Large diffs are not rendered by default.

ci/licenses_golden/tool_signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Signature: c3d53eebec5b6c8992029095408c2d8c
1+
Signature: 3265e06530be4b2f63aae56dd7a9e830
22

tools/gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def to_gn_args(args):
8585
gn_args['skia_use_x11'] = False # Never add the X11 dependency (only takes effect on Linux).
8686
gn_args['skia_use_expat'] = args.target_os == 'android'
8787
gn_args['skia_use_fontconfig'] = False # Use the custom font manager instead.
88+
gn_args['skia_use_wuffs'] = True
8889
gn_args['is_official_build'] = True # Disable Skia test utilities.
8990

9091
gn_args['is_debug'] = args.unoptimized

tools/licenses/lib/licenses.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ abstract class License implements Comparable<License> {
230230
switch (url) {
231231
case 'Apache:2.0':
232232
case 'http://www.apache.org/licenses/LICENSE-2.0':
233+
case 'https://www.apache.org/licenses/LICENSE-2.0':
233234
body = system.File('data/apache-license-2.0').readAsStringSync();
234235
type = LicenseType.apache;
235236
break;

tools/licenses/lib/main.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,6 +1639,7 @@ class _RepositorySkiaThirdPartyDirectory extends _RepositoryGenericThirdPartyDir
16391639
return entry.name != 'giflib' // contains nothing that ends up in the binary executable
16401640
&& entry.name != 'freetype' // we use our own version
16411641
&& entry.name != 'freetype2' // we use our own version
1642+
&& entry.name != 'gif' // not linked in
16421643
&& entry.name != 'icu' // we use our own version
16431644
&& entry.name != 'libjpeg-turbo' // we use our own version
16441645
&& entry.name != 'libpng' // we use our own version
@@ -1698,6 +1699,23 @@ class _RepositoryVulkanDirectory extends _RepositoryDirectory {
16981699
}
16991700
}
17001701

1702+
class _RepositoryWuffsDirectory extends _RepositoryDirectory {
1703+
_RepositoryWuffsDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
1704+
1705+
@override
1706+
bool shouldRecurse(fs.IoNode entry) {
1707+
return entry.name != 'CONTRIBUTORS' // not linked in
1708+
&& super.shouldRecurse(entry);
1709+
}
1710+
1711+
@override
1712+
_RepositoryDirectory createSubdirectory(fs.Directory entry) {
1713+
if (entry.name == 'src')
1714+
return _RepositoryExcludeSubpathDirectory(this, entry, const <String>['spec']);
1715+
return super.createSubdirectory(entry);
1716+
}
1717+
}
1718+
17011719
class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDirectory {
17021720
_RepositoryRootThirdPartyDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
17031721

@@ -1764,6 +1782,8 @@ class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDir
17641782
return _RepositoryPkgDirectory(this, entry);
17651783
if (entry.name == 'vulkan')
17661784
return _RepositoryVulkanDirectory(this, entry);
1785+
if (entry.name == 'wuffs')
1786+
return _RepositoryWuffsDirectory(this, entry);
17671787
return super.createSubdirectory(entry);
17681788
}
17691789
}

tools/licenses/lib/patterns.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ final List<MultipleVersionedLicenseReferencePattern> csReferencesByUrl = <Multip
651651
r'^\1\2you may not use this file except in compliance with the License\. *\n'
652652
r'^\1\2You may obtain a copy of the License at *\n'
653653
r'^(?:(?:\1\2? *)? *\n)*'
654-
r'^\1\2 *(http://www\.apache\.org/licenses/LICENSE-2\.0) *\n'
654+
r'^\1\2 *(https?://www\.apache\.org/licenses/LICENSE-2\.0) *\n'
655655
r'^(?:(?:\1\2? *)? *\n)*'
656656
r'^\1\2Unless required by applicable law or agreed to in writing, software *\n'
657657
r'^\1\2distributed under the License is distributed on an "AS IS" BASIS, *\n'

0 commit comments

Comments
 (0)