Fix OSR rendering recovery after GPU process crash (fixes issue #2827)
This commit is contained in:
parent
80fc651d7e
commit
8ca0b4580e
|
@ -435,6 +435,17 @@ void CefRenderWidgetHostViewOSR::DidCreateNewRendererCompositorFrameSink(
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::OnPresentCompositorFrame() {}
|
void CefRenderWidgetHostViewOSR::OnPresentCompositorFrame() {}
|
||||||
|
|
||||||
|
void CefRenderWidgetHostViewOSR::OnDidUpdateVisualPropertiesComplete(
|
||||||
|
const cc::RenderFrameMetadata& metadata) {
|
||||||
|
bool force = false;
|
||||||
|
if (metadata.local_surface_id_allocation) {
|
||||||
|
force = local_surface_id_allocator_.UpdateFromChild(
|
||||||
|
*metadata.local_surface_id_allocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
SynchronizeVisualProperties(force);
|
||||||
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::AddDamageRect(uint32_t sequence,
|
void CefRenderWidgetHostViewOSR::AddDamageRect(uint32_t sequence,
|
||||||
const gfx::Rect& rect) {
|
const gfx::Rect& rect) {
|
||||||
// Associate the given damage rect with the presentation token.
|
// Associate the given damage rect with the presentation token.
|
||||||
|
@ -700,9 +711,9 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
|
||||||
viz::ScopedSurfaceIdAllocator
|
viz::ScopedSurfaceIdAllocator
|
||||||
CefRenderWidgetHostViewOSR::DidUpdateVisualProperties(
|
CefRenderWidgetHostViewOSR::DidUpdateVisualProperties(
|
||||||
const cc::RenderFrameMetadata& metadata) {
|
const cc::RenderFrameMetadata& metadata) {
|
||||||
base::OnceCallback<void()> allocation_task =
|
base::OnceCallback<void()> allocation_task = base::BindOnce(
|
||||||
base::BindOnce(&CefRenderWidgetHostViewOSR::SynchronizeVisualProperties,
|
&CefRenderWidgetHostViewOSR::OnDidUpdateVisualPropertiesComplete,
|
||||||
weak_ptr_factory_.GetWeakPtr(), false);
|
weak_ptr_factory_.GetWeakPtr(), metadata);
|
||||||
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
|
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -268,6 +268,9 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||||
|
|
||||||
void OnPresentCompositorFrame();
|
void OnPresentCompositorFrame();
|
||||||
|
|
||||||
|
void OnDidUpdateVisualPropertiesComplete(
|
||||||
|
const cc::RenderFrameMetadata& metadata);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
|
content::DelegatedFrameHost* GetDelegatedFrameHost() const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue