mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add SkColorSpace to Picture.toImage() (flutter/engine#3691)
Skia doesn't actually create the image if we don't supply a color space.
This commit is contained in:
parent
1cc1f25bbf
commit
5366eb0eb7
@ -40,7 +40,7 @@ ftl::RefPtr<CanvasImage> Picture::toImage(int width, int height) {
|
||||
// TODO(abarth): We should pass in an SkColorSpace at some point.
|
||||
image->set_image(
|
||||
SkImage::MakeFromPicture(picture_, SkISize::Make(width, height), nullptr,
|
||||
nullptr, SkImage::BitDepth::kU8, nullptr));
|
||||
nullptr, SkImage::BitDepth::kU8, SkColorSpace::MakeSRGB()));
|
||||
return image;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user