diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index ecc98c6cf8a..1ba30913b6a 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -74,10 +74,6 @@ BrowserWindow::BrowserWindow(v8::Isolate* isolate, mate::Dictionary(isolate, web_contents->GetWrapper()) .Set("browserWindowOptions", options); - // Tell the content module to initialize renderer widget with transparent - // mode. - ui::GpuSwitchingManager::SetTransparent(window()->transparent()); - // Associate with BrowserWindow. web_contents->SetOwnerWindow(window()); diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index a8c124fbd52..8214c19b910 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -1229,14 +1229,12 @@ void NativeWindowMac::SetVibrancy(const std::string& type) { [vibrant_view removeFromSuperview]; [window_ setVibrantView:nil]; - ui::GpuSwitchingManager::SetTransparent(transparent()); return; } background_color_before_vibrancy_.reset([[window_ backgroundColor] retain]); transparency_before_vibrancy_ = [window_ titlebarAppearsTransparent]; - ui::GpuSwitchingManager::SetTransparent(true); if (title_bar_style_ != NORMAL) { [window_ setTitlebarAppearsTransparent:YES]; diff --git a/patches/common/chromium/.patches b/patches/common/chromium/.patches index eda8bd9aef0..e7723f82f1b 100644 --- a/patches/common/chromium/.patches +++ b/patches/common/chromium/.patches @@ -21,7 +21,6 @@ render_widget_host_view_mac.patch scoped_clipboard_writer.patch stream_resource_handler.patch thread_capabilities.patch -use_transparent_window.patch web_contents.patch webgl_context_attributes.patch webview_cross_drag.patch diff --git a/patches/common/chromium/use_transparent_window.patch b/patches/common/chromium/use_transparent_window.patch deleted file mode 100644 index 0c21e659430..00000000000 --- a/patches/common/chromium/use_transparent_window.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Cheng Zhao -Date: Thu, 20 Sep 2018 17:46:50 -0700 -Subject: use_transparent_window.patch - - -diff --git a/ui/gl/gpu_switching_manager.cc b/ui/gl/gpu_switching_manager.cc -index be715646580966ddadb762940efd8c627e7a1e65..4529866b08645691e3aa901c57890b11ce2bd829 100644 ---- a/ui/gl/gpu_switching_manager.cc -+++ b/ui/gl/gpu_switching_manager.cc -@@ -4,6 +4,12 @@ - - #include "ui/gl/gpu_switching_manager.h" - -+namespace { -+ -+bool g_use_transparent = false; -+ -+} // namespace -+ - namespace ui { - - // static -@@ -11,6 +17,16 @@ GpuSwitchingManager* GpuSwitchingManager::GetInstance() { - return base::Singleton::get(); - } - -+// static -+void GpuSwitchingManager::SetTransparent(bool transparent) { -+ g_use_transparent = transparent; -+} -+ -+// static -+bool GpuSwitchingManager::UseTransparent() { -+ return g_use_transparent; -+} -+ - GpuSwitchingManager::GpuSwitchingManager() {} - - GpuSwitchingManager::~GpuSwitchingManager() {} -diff --git a/ui/gl/gpu_switching_manager.h b/ui/gl/gpu_switching_manager.h -index 4308bbed939898323f26a747330937b7009f11b4..a7cafcfccdffd1b63858d2fc7650eba7d6ec418e 100644 ---- a/ui/gl/gpu_switching_manager.h -+++ b/ui/gl/gpu_switching_manager.h -@@ -18,6 +18,9 @@ class GL_EXPORT GpuSwitchingManager { - // Getter for the singleton. This will return NULL on failure. - static GpuSwitchingManager* GetInstance(); - -+ static void SetTransparent(bool transparent); -+ static bool UseTransparent(); -+ - void AddObserver(GpuSwitchingObserver* observer); - void RemoveObserver(GpuSwitchingObserver* observer); -