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

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

Issue 12896006: mac: Clean up a few more uses of USE_SKIA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac Created 7 years, 9 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 | Annotate | Revision Log
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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::Value* dx_info = gpu_info.dx_diagnostics.children.size() ? 175 base::Value* dx_info = gpu_info.dx_diagnostics.children.size() ?
176 DxDiagNodeToList(gpu_info.dx_diagnostics) : 176 DxDiagNodeToList(gpu_info.dx_diagnostics) :
177 base::Value::CreateNullValue(); 177 base::Value::CreateNullValue();
178 info->Set("diagnostics", dx_info); 178 info->Set("diagnostics", dx_info);
179 #endif 179 #endif
180 180
181 return info; 181 return info;
182 } 182 }
183 183
184 // Determine if accelerated-2d-canvas is supported, which depends on whether 184 // Determine if accelerated-2d-canvas is supported, which depends on whether
185 // lose_context could happen and whether skia is the backend. 185 // lose_context could happen.
186 bool SupportsAccelerated2dCanvas() { 186 bool SupportsAccelerated2dCanvas() {
187 if (GpuDataManagerImpl::GetInstance()->GetGPUInfo().can_lose_context) 187 if (GpuDataManagerImpl::GetInstance()->GetGPUInfo().can_lose_context)
188 return false; 188 return false;
189 #if defined(USE_SKIA)
190 return true; 189 return true;
191 #else
192 return false;
193 #endif
194 } 190 }
195 191
196 base::Value* GetFeatureStatus() { 192 base::Value* GetFeatureStatus() {
197 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 193 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
198 bool gpu_access_blocked = 194 bool gpu_access_blocked =
199 !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(); 195 !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed();
200 196
201 uint32 flags = GpuDataManagerImpl::GetInstance()->GetBlacklistedFeatures(); 197 uint32 flags = GpuDataManagerImpl::GetInstance()->GetBlacklistedFeatures();
202 base::DictionaryValue* status = new base::DictionaryValue(); 198 base::DictionaryValue* status = new base::DictionaryValue();
203 199
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 584
589 base::DictionaryValue* dict = new base::DictionaryValue(); 585 base::DictionaryValue* dict = new base::DictionaryValue();
590 586
591 dict->SetString("version", GetContentClient()->GetProduct()); 587 dict->SetString("version", GetContentClient()->GetProduct());
592 dict->SetString("command_line", 588 dict->SetString("command_line",
593 CommandLine::ForCurrentProcess()->GetCommandLineString()); 589 CommandLine::ForCurrentProcess()->GetCommandLineString());
594 dict->SetString("operating_system", 590 dict->SetString("operating_system",
595 base::SysInfo::OperatingSystemName() + " " + 591 base::SysInfo::OperatingSystemName() + " " +
596 base::SysInfo::OperatingSystemVersion()); 592 base::SysInfo::OperatingSystemVersion());
597 dict->SetString("angle_revision", base::UintToString(BUILD_REVISION)); 593 dict->SetString("angle_revision", base::UintToString(BUILD_REVISION));
598 #if defined(USE_SKIA)
599 dict->SetString("graphics_backend", "Skia"); 594 dict->SetString("graphics_backend", "Skia");
600 #else
601 dict->SetString("graphics_backend", "Core Graphics");
602 #endif
603 dict->SetString("blacklist_version", 595 dict->SetString("blacklist_version",
604 GpuDataManagerImpl::GetInstance()->GetBlacklistVersion()); 596 GpuDataManagerImpl::GetInstance()->GetBlacklistVersion());
605 597
606 return dict; 598 return dict;
607 } 599 }
608 600
609 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) { 601 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) {
610 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 602 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
611 603
612 return GpuDataManagerImpl::GetInstance()->GetLogMessages(); 604 return GpuDataManagerImpl::GetInstance()->GetLogMessages();
(...skipping 26 matching lines...) Expand all
639 : WebUIController(web_ui) { 631 : WebUIController(web_ui) {
640 web_ui->AddMessageHandler(new GpuMessageHandler()); 632 web_ui->AddMessageHandler(new GpuMessageHandler());
641 633
642 // Set up the chrome://gpu/ source. 634 // Set up the chrome://gpu/ source.
643 BrowserContext* browser_context = 635 BrowserContext* browser_context =
644 web_ui->GetWebContents()->GetBrowserContext(); 636 web_ui->GetWebContents()->GetBrowserContext();
645 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 637 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
646 } 638 }
647 639
648 } // namespace content 640 } // namespace content
OLDNEW
« no previous file with comments | « chrome/renderer/mock_printer.cc ('k') | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698