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

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: 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 566
571 base::DictionaryValue* dict = new base::DictionaryValue(); 567 base::DictionaryValue* dict = new base::DictionaryValue();
572 568
573 dict->SetString("version", GetContentClient()->GetProduct()); 569 dict->SetString("version", GetContentClient()->GetProduct());
574 dict->SetString("command_line", 570 dict->SetString("command_line",
575 CommandLine::ForCurrentProcess()->GetCommandLineString()); 571 CommandLine::ForCurrentProcess()->GetCommandLineString());
576 dict->SetString("operating_system", 572 dict->SetString("operating_system",
577 base::SysInfo::OperatingSystemName() + " " + 573 base::SysInfo::OperatingSystemName() + " " +
578 base::SysInfo::OperatingSystemVersion()); 574 base::SysInfo::OperatingSystemVersion());
579 dict->SetString("angle_revision", base::UintToString(BUILD_REVISION)); 575 dict->SetString("angle_revision", base::UintToString(BUILD_REVISION));
580 #if defined(USE_SKIA)
581 dict->SetString("graphics_backend", "Skia"); 576 dict->SetString("graphics_backend", "Skia");
582 #else
583 dict->SetString("graphics_backend", "Core Graphics");
584 #endif
585 dict->SetString("blacklist_version", 577 dict->SetString("blacklist_version",
586 GpuDataManagerImpl::GetInstance()->GetBlacklistVersion()); 578 GpuDataManagerImpl::GetInstance()->GetBlacklistVersion());
587 579
588 return dict; 580 return dict;
589 } 581 }
590 582
591 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) { 583 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) {
592 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 584 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
593 585
594 return GpuDataManagerImpl::GetInstance()->GetLogMessages(); 586 return GpuDataManagerImpl::GetInstance()->GetLogMessages();
(...skipping 26 matching lines...) Expand all
621 : WebUIController(web_ui) { 613 : WebUIController(web_ui) {
622 web_ui->AddMessageHandler(new GpuMessageHandler()); 614 web_ui->AddMessageHandler(new GpuMessageHandler());
623 615
624 // Set up the chrome://gpu/ source. 616 // Set up the chrome://gpu/ source.
625 BrowserContext* browser_context = 617 BrowserContext* browser_context =
626 web_ui->GetWebContents()->GetBrowserContext(); 618 web_ui->GetWebContents()->GetBrowserContext();
627 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 619 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
628 } 620 }
629 621
630 } // namespace content 622 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698