diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index bade725d9c95..48582705a430 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -23,6 +23,7 @@ #include "content/browser/renderer_host/cursor_manager.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -286,6 +287,8 @@ class AtomDelegatedFrameHostClient : public content::DelegatedFrameHostClient { return view_->render_widget_host()->CollectSurfaceIdsForEviction(); } + bool ShouldShowStaleContentOnEviction() override { return false; } + void OnBeginFrame(base::TimeTicks frame_time) override {} void InvalidateLocalSurfaceIdOnEviction() override {} @@ -526,7 +529,7 @@ void OffScreenRenderWidgetHostView::SetBackgroundColor(SkColor color) { // We short-cut here to show a sensible color before that happens. UpdateBackgroundColorFromRenderer(color); - if (render_widget_host_) { + if (render_widget_host_ && render_widget_host_->owner_delegate()) { render_widget_host_->owner_delegate()->SetBackgroundOpaque( SkColorGetA(color) == SK_AlphaOPAQUE); } diff --git a/atom/browser/osr/osr_render_widget_host_view.h b/atom/browser/osr/osr_render_widget_host_view.h index 780e04e9ca34..4f33182c25df 100644 --- a/atom/browser/osr/osr_render_widget_host_view.h +++ b/atom/browser/osr/osr_render_widget_host_view.h @@ -343,7 +343,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, // Latest capture sequence number which is incremented when the caller // requests surfaces be synchronized via - // EnsureSurfaceSynchronizedForLayoutTest(). + // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; SkColor background_color_ = SkColor();