Do not remove OSR transparency when switching monitors (issue #1775)
This commit is contained in:
parent
903e296621
commit
667f0edcf4
|
@ -614,8 +614,12 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetViewBounds() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) {
|
void CefRenderWidgetHostViewOSR::SetBackgroundColor(SkColor color) {
|
||||||
|
if (transparent_)
|
||||||
|
color = SkColorSetARGB(SK_AlphaTRANSPARENT, 0, 0, 0);
|
||||||
|
|
||||||
content::RenderWidgetHostViewBase::SetBackgroundColor(color);
|
content::RenderWidgetHostViewBase::SetBackgroundColor(color);
|
||||||
bool opaque = GetBackgroundOpaque();
|
|
||||||
|
const bool opaque = !transparent_ && GetBackgroundOpaque();
|
||||||
if (render_widget_host_)
|
if (render_widget_host_)
|
||||||
render_widget_host_->SetBackgroundOpaque(opaque);
|
render_widget_host_->SetBackgroundOpaque(opaque);
|
||||||
}
|
}
|
||||||
|
@ -1070,7 +1074,7 @@ void CefRenderWidgetHostViewOSR::DelegatedFrameHostUpdateVSyncParameters(
|
||||||
|
|
||||||
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
|
||||||
if (transparent_) {
|
if (transparent_) {
|
||||||
SetBackgroundColor(SkColorSetARGB(SK_AlphaTRANSPARENT, 0, 0, 0));
|
SetBackgroundColor(SkColor());
|
||||||
compositor_->SetHostHasTransparentBackground(true);
|
compositor_->SetHostHasTransparentBackground(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue