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

Side by Side Diff: ui/base/x/x11_util.cc

Issue 2910753002: X11: Fix use-of-uninitialized-variable (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines utility functions for X11 (Linux only). This code has been 5 // This file defines utility functions for X11 (Linux only). This code has been
6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support 6 // ported from XCB since we can't use XCB on Ubuntu while its 32-bit support
7 // remains woefully incomplete. 7 // remains woefully incomplete.
8 8
9 #include "ui/base/x/x11_util.h" 9 #include "ui/base/x/x11_util.h"
10 10
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 return base::Singleton<XVisualManager>::get(); 1376 return base::Singleton<XVisualManager>::get();
1377 } 1377 }
1378 1378
1379 XVisualManager::XVisualManager() 1379 XVisualManager::XVisualManager()
1380 : display_(gfx::GetXDisplay()), 1380 : display_(gfx::GetXDisplay()),
1381 default_visual_id_(0), 1381 default_visual_id_(0),
1382 system_visual_id_(0), 1382 system_visual_id_(0),
1383 transparent_visual_id_(0), 1383 transparent_visual_id_(0),
1384 using_software_rendering_(false), 1384 using_software_rendering_(false),
1385 have_gpu_argb_visual_(false) { 1385 have_gpu_argb_visual_(false) {
1386 int visuals_len; 1386 int visuals_len = 0;
1387 XVisualInfo visual_template; 1387 XVisualInfo visual_template;
1388 visual_template.screen = DefaultScreen(display_); 1388 visual_template.screen = DefaultScreen(display_);
1389 gfx::XScopedPtr<XVisualInfo[]> visual_list(XGetVisualInfo( 1389 gfx::XScopedPtr<XVisualInfo[]> visual_list(XGetVisualInfo(
1390 display_, VisualScreenMask, &visual_template, &visuals_len)); 1390 display_, VisualScreenMask, &visual_template, &visuals_len));
1391 for (int i = 0; i < visuals_len; ++i) 1391 for (int i = 0; i < visuals_len; ++i)
1392 visuals_[visual_list[i].visualid].reset(new XVisualData(visual_list[i])); 1392 visuals_[visual_list[i].visualid].reset(new XVisualData(visual_list[i]));
1393 1393
1394 XAtom NET_WM_CM_S0 = XInternAtom(display_, "_NET_WM_CM_S0", False); 1394 XAtom NET_WM_CM_S0 = XInternAtom(display_, "_NET_WM_CM_S0", False);
1395 using_compositing_wm_ = XGetSelectionOwner(display_, NET_WM_CM_S0) != None; 1395 using_compositing_wm_ = XGetSelectionOwner(display_, NET_WM_CM_S0) != None;
1396 1396
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 visual_info.visual, AllocNone); 1481 visual_info.visual, AllocNone);
1482 } 1482 }
1483 return colormap_; 1483 return colormap_;
1484 } 1484 }
1485 1485
1486 // ---------------------------------------------------------------------------- 1486 // ----------------------------------------------------------------------------
1487 // End of x11_util_internal.h 1487 // End of x11_util_internal.h
1488 1488
1489 1489
1490 } // namespace ui 1490 } // namespace ui
OLDNEW
« 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