Fix a crash when resizing an OSR browser window (see issue #2614)

This commit is contained in:
Riku Palomäki
2019-03-07 22:03:35 +00:00
committed by Marshall Greenblatt
parent 84a2c2fa61
commit 7d9deeb6c5
2 changed files with 11 additions and 2 deletions

View File

@@ -1130,6 +1130,17 @@ viz::FrameSinkId CefRenderWidgetHostViewOSR::GetRootFrameSinkId() {
#endif
}
#if !defined(OS_MACOSX)
viz::ScopedSurfaceIdAllocator
CefRenderWidgetHostViewOSR::DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) {
base::OnceCallback<void()> allocation_task =
base::BindOnce(&CefRenderWidgetHostViewOSR::SynchronizeVisualProperties,
weak_ptr_factory_.GetWeakPtr());
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
}
#endif
void CefRenderWidgetHostViewOSR::SetNeedsBeginFrames(bool enabled) {
SetFrameRate();

View File

@@ -175,10 +175,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void GetScreenInfo(content::ScreenInfo* results) const override;
void TransformPointToRootSurface(gfx::PointF* point) override;
gfx::Rect GetBoundsInRootWindow() override;
#if defined(OS_MACOSX)
viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) override;
#endif
viz::SurfaceId GetCurrentSurfaceId() const override;
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
content::BrowserAccessibilityDelegate* delegate,