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

Unified Diff: ui/views/test/views_test_base.cc

Issue 2347383002: X11: Use better visuals for OpenGL (Closed)
Patch Set: auto* Created 4 years, 3 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 | « ui/gl/gl_visual_picker_glx.cc ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/views_test_base.cc
diff --git a/ui/views/test/views_test_base.cc b/ui/views/test/views_test_base.cc
index d3dbd71dbcaa2e47e6c4579b74da0be2069fcb7e..ca691771cdbdaa4e47a073c96396fca05f2f9835 100644
--- a/ui/views/test/views_test_base.cc
+++ b/ui/views/test/views_test_base.cc
@@ -23,8 +23,9 @@ namespace {
bool InitializeVisuals() {
#if defined(USE_X11) && !defined(OS_CHROMEOS)
- static int depth = 0;
- static bool has_compositing_manager = false;
+ bool has_compositing_manager = false;
+ int depth = 0;
+ bool using_argb_visual;
if (depth > 0)
return has_compositing_manager;
@@ -32,12 +33,13 @@ bool InitializeVisuals() {
// testing/xvfb.py runs xvfb and xcompmgr.
std::unique_ptr<base::Environment> env(base::Environment::Create());
has_compositing_manager = env->HasVar("_CHROMIUM_INSIDE_XVFB");
- ui::ChooseVisualForWindow(has_compositing_manager, NULL, &depth);
+ ui::XVisualManager::GetInstance()->ChooseVisualForWindow(
+ has_compositing_manager, nullptr, &depth, nullptr, &using_argb_visual);
- if (has_compositing_manager)
+ if (using_argb_visual)
EXPECT_EQ(32, depth);
- return has_compositing_manager;
+ return using_argb_visual;
#else
return false;
#endif
« no previous file with comments | « ui/gl/gl_visual_picker_glx.cc ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698