diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index fe2f2c094..240b3ecc0 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -114,7 +114,9 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient { return view_->render_widget_host()->CollectSurfaceIdsForEviction(); } - void InvalidateLocalSurfaceIdOnEviction() override {} + void InvalidateLocalSurfaceIdOnEviction() override { + view_->InvalidateLocalSurfaceId(); + } bool ShouldShowStaleContentOnEviction() override { return false; } diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 7a5ac1da7..518838c5f 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -275,6 +275,11 @@ class CefRenderWidgetHostViewOSR void ReleaseCompositor(); + // Marks the current viz::LocalSurfaceId as invalid. AllocateLocalSurfaceId + // must be called before submitting new CompositorFrames. May be called by + // content::DelegatedFrameHostClient::InvalidateLocalSurfaceIdOnEviction. + void InvalidateLocalSurfaceId(); + private: void SetFrameRate(); bool SetDeviceScaleFactor(); @@ -322,10 +327,6 @@ class CefRenderWidgetHostViewOSR // Returns the current viz::LocalSurfaceIdAllocation. const viz::LocalSurfaceId& GetOrCreateLocalSurfaceId(); - // Marks the current viz::LocalSurfaceId as invalid. AllocateLocalSurfaceId - // must be called before submitting new CompositorFrames. - void InvalidateLocalSurfaceId(); - void AddDamageRect(uint32_t sequence, const gfx::Rect& rect); // Applies background color without notifying the RenderWidget about