Skip to content

Commit

Permalink
Flush the SkCanvas when submitting a frame in ShellTestPlatformViewVu…
Browse files Browse the repository at this point in the history
…lkan::OffscreenSurface (flutter#16717)
  • Loading branch information
George Wright authored Feb 20, 2020
1 parent 969cfc1 commit 8eb727e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions shell/common/shell_test_platform_view_vulkan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ ShellTestPlatformViewVulkan::OffScreenSurface::AcquireFrame(
SkAlphaType::kOpaque_SkAlphaType);
auto surface = SkSurface::MakeRenderTarget(context_.get(), SkBudgeted::kNo,
image_info, 0, nullptr);
SurfaceFrame::SubmitCallback callback =
[](const SurfaceFrame&, SkCanvas* canvas) -> bool { return true; };
SurfaceFrame::SubmitCallback callback = [](const SurfaceFrame&,
SkCanvas* canvas) -> bool {
canvas->flush();
return true;
};

return std::make_unique<SurfaceFrame>(std::move(surface), true,
std::move(callback));
Expand Down

0 comments on commit 8eb727e

Please sign in to comment.