mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: use RenderViewReady to call InstallTransparency (#24390)
this fixes a crash with transparent OSR when GPU acceleration is disabled
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user