Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Prev Previous commit
Next Next commit
Removed RunNowOrPostTask.
  • Loading branch information
gaaclarke committed Jul 15, 2019
commit ca8776efa4e10ff55367ea55fe3d104326cef075
20 changes: 10 additions & 10 deletions lib/ui/painting/picture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ Dart_Handle Picture::RasterizeToImage(sk_sp<SkPicture> picture,
delete image_callback;
});

fml::TaskRunner::RunNowOrPostTask(io_task_runner, [ui_task_runner, picture,
picture_bounds, ui_task,
resource_context] {
sk_sp<SkSurface> surface =
MakeSnapshotSurface(picture_bounds, resource_context);
sk_sp<SkImage> raster_image = MakeRasterSnapshot(picture, surface);

fml::TaskRunner::RunNowOrPostTask(
ui_task_runner, [ui_task, raster_image]() { ui_task(raster_image); });
});
fml::TaskRunner::RunNowOrPostTask(
io_task_runner,
[ui_task_runner, picture, picture_bounds, ui_task, resource_context] {
sk_sp<SkSurface> surface =
MakeSnapshotSurface(picture_bounds, resource_context);
sk_sp<SkImage> raster_image = MakeRasterSnapshot(picture, surface);

ui_task_runner->PostTask(
[ui_task, raster_image]() { ui_task(raster_image); });
});

return Dart_Null();
}
Expand Down