mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix initial transparency delay for OSR + gpu-disabled (see issue #2938)
This commit is contained in:
committed by
Marshall Greenblatt
parent
5b78afcf54
commit
3f0eaa53b7
@@ -53,6 +53,12 @@ void CefBrowserPlatformDelegateOsr::WebContentsCreated(
|
|||||||
view_osr_->WebContentsCreated(web_contents);
|
view_osr_->WebContentsCreated(web_contents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CefBrowserPlatformDelegateOsr::RenderViewCreated(
|
||||||
|
content::RenderViewHost* render_view_host) {
|
||||||
|
if (view_osr_)
|
||||||
|
view_osr_->RenderViewCreated();
|
||||||
|
}
|
||||||
|
|
||||||
void CefBrowserPlatformDelegateOsr::BrowserCreated(
|
void CefBrowserPlatformDelegateOsr::BrowserCreated(
|
||||||
CefBrowserHostImpl* browser) {
|
CefBrowserHostImpl* browser) {
|
||||||
CefBrowserPlatformDelegateAlloy::BrowserCreated(browser);
|
CefBrowserPlatformDelegateAlloy::BrowserCreated(browser);
|
||||||
|
@@ -26,6 +26,7 @@ class CefBrowserPlatformDelegateOsr
|
|||||||
content::RenderViewHostDelegateView** delegate_view) override;
|
content::RenderViewHostDelegateView** delegate_view) override;
|
||||||
void WebContentsCreated(content::WebContents* web_contents,
|
void WebContentsCreated(content::WebContents* web_contents,
|
||||||
bool owned) override;
|
bool owned) override;
|
||||||
|
void RenderViewCreated(content::RenderViewHost* render_view_host) override;
|
||||||
void BrowserCreated(CefBrowserHostImpl* browser) override;
|
void BrowserCreated(CefBrowserHostImpl* browser) override;
|
||||||
void NotifyBrowserDestroyed() override;
|
void NotifyBrowserDestroyed() override;
|
||||||
void BrowserDestroyed(CefBrowserHostImpl* browser) override;
|
void BrowserDestroyed(CefBrowserHostImpl* browser) override;
|
||||||
|
@@ -29,7 +29,17 @@ void CefWebContentsViewOSR::WebContentsCreated(
|
|||||||
DCHECK(!web_contents_);
|
DCHECK(!web_contents_);
|
||||||
web_contents_ = web_contents;
|
web_contents_ = web_contents;
|
||||||
|
|
||||||
RenderViewReady();
|
RenderViewCreated();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CefWebContentsViewOSR::RenderViewCreated() {
|
||||||
|
if (web_contents_) {
|
||||||
|
auto host = web_contents_->GetRenderViewHost();
|
||||||
|
CefRenderWidgetHostViewOSR* view =
|
||||||
|
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
|
||||||
|
if (view)
|
||||||
|
view->InstallTransparency();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
|
gfx::NativeView CefWebContentsViewOSR::GetNativeView() const {
|
||||||
@@ -120,15 +130,7 @@ CefWebContentsViewOSR::CreateViewForChildWidget(
|
|||||||
|
|
||||||
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
|
void CefWebContentsViewOSR::SetPageTitle(const base::string16& title) {}
|
||||||
|
|
||||||
void CefWebContentsViewOSR::RenderViewReady() {
|
void CefWebContentsViewOSR::RenderViewReady() {}
|
||||||
if (web_contents_) {
|
|
||||||
auto host = web_contents_->GetRenderViewHost();
|
|
||||||
CefRenderWidgetHostViewOSR* view =
|
|
||||||
static_cast<CefRenderWidgetHostViewOSR*>(host->GetWidget()->GetView());
|
|
||||||
if (view)
|
|
||||||
view->InstallTransparency();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefWebContentsViewOSR::RenderViewHostChanged(
|
void CefWebContentsViewOSR::RenderViewHostChanged(
|
||||||
content::RenderViewHost* old_host,
|
content::RenderViewHost* old_host,
|
||||||
|
@@ -31,6 +31,8 @@ class CefWebContentsViewOSR : public content::WebContentsView,
|
|||||||
void WebContentsCreated(content::WebContents* web_contents);
|
void WebContentsCreated(content::WebContents* web_contents);
|
||||||
content::WebContents* web_contents() const { return web_contents_; }
|
content::WebContents* web_contents() const { return web_contents_; }
|
||||||
|
|
||||||
|
void RenderViewCreated();
|
||||||
|
|
||||||
// WebContentsView methods.
|
// WebContentsView methods.
|
||||||
gfx::NativeView GetNativeView() const override;
|
gfx::NativeView GetNativeView() const override;
|
||||||
gfx::NativeView GetContentNativeView() const override;
|
gfx::NativeView GetContentNativeView() const override;
|
||||||
|
Reference in New Issue
Block a user