Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: ui/base/x/x11_util.cc

Issue 2386313002: X11: Fix broken DCHECK when no transparent visual is available (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_util.cc
diff --git a/ui/base/x/x11_util.cc b/ui/base/x/x11_util.cc
index 29ef2d73c6e83e9ac19c19e0492375ba6e3dd4bf..ec6b5363d72403d266c487e9e625a49ff7751e1d 100644
--- a/ui/base/x/x11_util.cc
+++ b/ui/base/x/x11_util.cc
@@ -1457,8 +1457,8 @@ XVisualManager::XVisualManager()
break;
}
}
- DCHECK(transparent_visual_id_);
- DCHECK(visuals_.find(transparent_visual_id_) != visuals_.end());
+ if (transparent_visual_id_)
+ DCHECK(visuals_.find(transparent_visual_id_) != visuals_.end());
}
XVisualManager::~XVisualManager() {}
@@ -1471,7 +1471,8 @@ void XVisualManager::ChooseVisualForWindow(bool want_argb_visual,
bool use_argb = want_argb_visual && using_compositing_wm_ &&
(using_software_rendering_ || have_gpu_argb_visual_);
XVisualData& visual_data =
- *visuals_[use_argb ? transparent_visual_id_ : system_visual_id_];
+ *visuals_[use_argb && transparent_visual_id_ ? transparent_visual_id_
+ : system_visual_id_];
if (visual)
*visual = visual_data.visual_info.visual;
if (depth)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698