osr: Implement InvalidateLocalSurfaceIdOnEviction (fixes issue #2483)
This fixes an empty-rendering issue when the view is shown after being evicted.
This commit is contained in:
parent
28599ae1a5
commit
6dad2c45ee
|
@ -114,7 +114,9 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
|
||||||
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
|
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InvalidateLocalSurfaceIdOnEviction() override {}
|
void InvalidateLocalSurfaceIdOnEviction() override {
|
||||||
|
view_->InvalidateLocalSurfaceId();
|
||||||
|
}
|
||||||
|
|
||||||
bool ShouldShowStaleContentOnEviction() override { return false; }
|
bool ShouldShowStaleContentOnEviction() override { return false; }
|
||||||
|
|
||||||
|
|
|
@ -275,6 +275,11 @@ class CefRenderWidgetHostViewOSR
|
||||||
|
|
||||||
void ReleaseCompositor();
|
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:
|
private:
|
||||||
void SetFrameRate();
|
void SetFrameRate();
|
||||||
bool SetDeviceScaleFactor();
|
bool SetDeviceScaleFactor();
|
||||||
|
@ -322,10 +327,6 @@ class CefRenderWidgetHostViewOSR
|
||||||
// Returns the current viz::LocalSurfaceIdAllocation.
|
// Returns the current viz::LocalSurfaceIdAllocation.
|
||||||
const viz::LocalSurfaceId& GetOrCreateLocalSurfaceId();
|
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);
|
void AddDamageRect(uint32_t sequence, const gfx::Rect& rect);
|
||||||
|
|
||||||
// Applies background color without notifying the RenderWidget about
|
// Applies background color without notifying the RenderWidget about
|
||||||
|
|
Loading…
Reference in New Issue