[new gallery] Reisze gallery images (#147882)
Some cause of jank on both Skia and Impeller are these massive images. We should just resize them so that the noise is reduced and we can see other performance issues. Fixes https://github.com/flutter/flutter/issues/147797 Tested: this is a test!
This commit is contained in:
parent
af84f6b847
commit
5230ec5ba4
@ -337,9 +337,13 @@ class _CraneAppBarState extends State<CraneAppBar> {
|
||||
children: <Widget>[
|
||||
const ExcludeSemantics(
|
||||
child: FadeInImagePlaceholder(
|
||||
image: AssetImage(
|
||||
'crane/logo/logo.png',
|
||||
package: 'flutter_gallery_assets',
|
||||
image: ResizeImage(
|
||||
AssetImage(
|
||||
'crane/logo/logo.png',
|
||||
package: 'flutter_gallery_assets',
|
||||
),
|
||||
width: 40,
|
||||
height: 60,
|
||||
),
|
||||
placeholder: SizedBox(
|
||||
width: 40,
|
||||
|
@ -101,9 +101,13 @@ class _DestinationImage extends StatelessWidget {
|
||||
label: destination.assetSemanticLabel,
|
||||
child: ExcludeSemantics(
|
||||
child: FadeInImagePlaceholder(
|
||||
image: AssetImage(
|
||||
destination.assetName,
|
||||
package: 'flutter_gallery_assets',
|
||||
image: ResizeImage(
|
||||
AssetImage(
|
||||
destination.assetName,
|
||||
package: 'flutter_gallery_assets',
|
||||
),
|
||||
width: isDesktop ? null : mobileThumbnailSize.toInt(),
|
||||
height: isDesktop ? null : mobileThumbnailSize.toInt(),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: isDesktop ? null : mobileThumbnailSize,
|
||||
|
Loading…
x
Reference in New Issue
Block a user