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

Side by Side Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 2838753002: x11: Use opaque window for dnd without composite. (Closed)
Patch Set: Created 3 years, 8 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 | ui/base/x/x11_util.h » ('j') | 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 #include "content/browser/gpu/gpu_internals_ui.h" 5 #include "content/browser/gpu/gpu_internals_ui.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 ui::GuessWindowManagerName())); 211 ui::GuessWindowManagerName()));
212 { 212 {
213 std::unique_ptr<base::Environment> env(base::Environment::Create()); 213 std::unique_ptr<base::Environment> env(base::Environment::Create());
214 std::string value; 214 std::string value;
215 const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP"; 215 const char kXDGCurrentDesktop[] = "XDG_CURRENT_DESKTOP";
216 if (env->GetVar(kXDGCurrentDesktop, &value)) 216 if (env->GetVar(kXDGCurrentDesktop, &value))
217 basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value)); 217 basic_info->Append(NewDescriptionValuePair(kXDGCurrentDesktop, value));
218 const char kGDMSession[] = "GDMSESSION"; 218 const char kGDMSession[] = "GDMSESSION";
219 if (env->GetVar(kGDMSession, &value)) 219 if (env->GetVar(kGDMSession, &value))
220 basic_info->Append(NewDescriptionValuePair(kGDMSession, value)); 220 basic_info->Append(NewDescriptionValuePair(kGDMSession, value));
221 const char* const kAtomsToCache[] = { 221 basic_info->Append(NewDescriptionValuePair(
222 "_NET_WM_CM_S0", 222 "Compositing manager",
223 NULL 223 ui::IsCompositingManagerPresent() ? "Yes" : "No"));
224 };
225 ui::X11AtomCache atom_cache(gfx::GetXDisplay(), kAtomsToCache);
226 std::string compositing_manager = XGetSelectionOwner(
227 gfx::GetXDisplay(),
228 atom_cache.GetAtom("_NET_WM_CM_S0")) != None ? "Yes" : "No";
229 basic_info->Append(
230 NewDescriptionValuePair("Compositing manager", compositing_manager));
231 } 224 }
232 #endif 225 #endif
233 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; 226 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No";
234 basic_info->Append( 227 basic_info->Append(
235 NewDescriptionValuePair("Direct rendering", direct_rendering)); 228 NewDescriptionValuePair("Direct rendering", direct_rendering));
236 229
237 std::string reset_strategy = 230 std::string reset_strategy =
238 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy); 231 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy);
239 basic_info->Append(NewDescriptionValuePair( 232 basic_info->Append(NewDescriptionValuePair(
240 "Reset notification strategy", reset_strategy)); 233 "Reset notification strategy", reset_strategy));
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 : WebUIController(web_ui) { 553 : WebUIController(web_ui) {
561 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); 554 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>());
562 555
563 // Set up the chrome://gpu/ source. 556 // Set up the chrome://gpu/ source.
564 BrowserContext* browser_context = 557 BrowserContext* browser_context =
565 web_ui->GetWebContents()->GetBrowserContext(); 558 web_ui->GetWebContents()->GetBrowserContext();
566 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 559 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
567 } 560 }
568 561
569 } // namespace content 562 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698