fix: use RenderViewReady to call InstallTransparency (#24390)
this fixes a crash with transparent OSR when GPU acceleration is disabled
This commit is contained in:
parent
99079c3bc7
commit
cf74ee3d83
2 changed files with 4 additions and 2 deletions
shell/browser/osr
|
@ -222,7 +222,6 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
|
|||
|
||||
ResizeRootLayer(false);
|
||||
render_widget_host_->SetView(this);
|
||||
InstallTransparency();
|
||||
|
||||
if (content::GpuDataManager::GetInstance()->HardwareAccelerationEnabled()) {
|
||||
video_consumer_ = std::make_unique<OffScreenVideoConsumer>(
|
||||
|
|
|
@ -143,7 +143,10 @@ OffScreenWebContentsView::CreateViewForChildWidget(
|
|||
|
||||
void OffScreenWebContentsView::SetPageTitle(const base::string16& title) {}
|
||||
|
||||
void OffScreenWebContentsView::RenderViewReady() {}
|
||||
void OffScreenWebContentsView::RenderViewReady() {
|
||||
if (GetView())
|
||||
GetView()->InstallTransparency();
|
||||
}
|
||||
|
||||
void OffScreenWebContentsView::RenderViewHostChanged(
|
||||
content::RenderViewHost* old_host,
|
||||
|
|
Loading…
Reference in a new issue