Drop package:image dependency from testing harness (flutter/engine#26279)

This commit is contained in:
Dan Field
2021-05-20 09:19:02 -07:00
committed by GitHub
parent a2b7132a7a
commit f5d97c4397
3 changed files with 3 additions and 30 deletions

9
DEPS
View File

@@ -401,12 +401,6 @@ deps = {
'src/third_party/pkg/file':
Var('github_git') + '/google/file.dart.git' + '@' + '427bb20ccc852425d67f2880da2a9b4707c266b4', # 6.1.0
'src/third_party/pkg/image':
Var('github_git') + '/brendan-duncan/image.git' + '@' + '3.0.2',
'src/third_party/pkg/petitparser':
Var('github_git') + '/petitparser/dart-petitparser' + '@' + '4.1.0',
'src/third_party/pkg/platform':
Var('github_git') + '/google/platform.dart.git' + '@' + 'f63fd0bc3021354a0687dc935962c9acc003f47e', # 3.0.1
@@ -416,9 +410,6 @@ deps = {
'src/third_party/pkg/when':
Var('dart_git') + '/when.git' + '@' + '0.2.0',
'src/third_party/pkg/xml':
Var('github_git') + '/renggli/dart-xml' + '@' + '22a9e95c07c51429da368301047ffeba945b72a7', # 5.1.0
'src/third_party/android_tools/ndk': {
'packages': [
{

View File

@@ -3,12 +3,12 @@
// found in the LICENSE file.
// @dart = 2.6
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'dart:ui';
import 'package:image/image.dart' as dart_image;
import 'package:litetest/litetest.dart';
import 'package:path/path.dart' as path;
@@ -144,12 +144,9 @@ Future<bool> fuzzyGoldenImageCompare(
}
if (!areEqual) {
final ByteData pngData = await image.toByteData();
final ByteBuffer buffer = pngData.buffer;
final dart_image.Image png = dart_image.Image.fromBytes(
image.width, image.height, buffer.asUint8List());
final ByteData pngData = await image.toByteData(format: ImageByteFormat.png);
final String outPath = path.join(imagesPath, 'found_' + goldenImageName);
File(outPath).writeAsBytesSync(dart_image.encodePng(png));
File(outPath).writeAsBytesSync(pngData.buffer.asUint8List());
print('wrote: ' + outPath);
}
return areEqual;

View File

@@ -19,37 +19,22 @@ environment:
dependencies:
litetest: any
path: any
image: any
vm_service: any
dependency_overrides:
archive:
path: ../../../third_party/pkg/archive
async_helper:
path: ../../../third_party/dart/pkg/async_helper
collection:
path: ../../../third_party/dart/third_party/pkg/collection
crypto:
path: ../../../third_party/dart/third_party/pkg/crypto
expect:
path: ../../../third_party/dart/pkg/expect
image:
path: ../../../third_party/pkg/image
litetest:
path: ../litetest
meta:
path: ../../../third_party/dart/pkg/meta
path:
path: ../../../third_party/dart/third_party/pkg/path
petitparser:
path: ../../../third_party/pkg/petitparser/petitparser
sky_engine:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_engine
sky_services:
path: ../../../out/host_debug_unopt/gen/dart-pkg/sky_services
typed_data:
path: ../../../third_party/dart/third_party/pkg/typed_data
vm_service:
path: ../../../third_party/dart/pkg/vm_service
xml:
path: ../../../third_party/pkg/xml