Commit fecdf668 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

SkiaOutputSurface: Fix a crash related to presnetation feedback

Bug: 824382, 727775
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
Change-Id: If75f42895bfc2a41ec3c4cf1bbe0e24b37743c36
Reviewed-on: https://chromium-review.googlesource.com/1089041Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565292}
parent c220be7c
......@@ -176,8 +176,9 @@ void SkiaOutputSurfaceImplOnGpu::SwapBuffers(
sk_surface_->draw(ddl.get());
gpu_service_->gr_context()->flush();
OnSwapBuffers();
surface_->SwapBuffers(
base::BindRepeating([](const gfx::PresentationFeedback&) {}));
surface_->SwapBuffers(frame.need_presentation_feedback
? buffer_presented_callback_
: base::DoNothing());
sync_point_client_state_->ReleaseFenceSync(sync_fence_release);
}
......@@ -305,7 +306,6 @@ void SkiaOutputSurfaceImplOnGpu::SetSnapshotRequestedCallback(
void SkiaOutputSurfaceImplOnGpu::BufferPresented(
const gfx::PresentationFeedback& feedback) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
buffer_presented_callback_.Run(feedback);
}
void SkiaOutputSurfaceImplOnGpu::AddFilter(IPC::MessageFilter* message_filter) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment