Skip to content

Commit

Permalink
Add SkColorSpace to Picture.toImage() (flutter#3691)
Browse files Browse the repository at this point in the history
Skia doesn't actually create the image if we don't supply a color space.
  • Loading branch information
abarth authored May 13, 2017
1 parent 30edb3c commit f1bfddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/painting/picture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f1bfddd

Please sign in to comment.