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

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

Issue 9965096: Revert 130298 - Revert 130258 - Make it possible to blacklist gpu's based on the Windows experience… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/browser/gpu/gpu_performance_stats.h"
6
7 #include "base/stringprintf.h"
8
9 namespace {
10 DictionaryValue* NewDescriptionValuePairFromFloat(const std::string& desc,
11 float value) {
12 DictionaryValue* dict = new DictionaryValue();
13 dict->SetString("description", desc);
14 dict->SetString("value", base::StringPrintf("%.1f", value));
15 return dict;
16 }
17 } // namespace
18
19 #if !defined(OS_WIN)
20 // No data for other operating systems yet, just return 0.0s.
21 GpuPerformanceStats GpuPerformanceStats::RetrieveGpuPerformanceStats() {
22 return GpuPerformanceStats();
23 }
24 #endif
25
26 base::Value* GpuPerformanceStats::ToValue() const {
27 ListValue* result = new ListValue();
28 result->Append(NewDescriptionValuePairFromFloat("Graphics", graphics));
29 result->Append(NewDescriptionValuePairFromFloat("Gaming", gaming));
30 result->Append(NewDescriptionValuePairFromFloat("Overall", overall));
31 return result;
32 }
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_performance_stats.h ('k') | content/browser/gpu/gpu_performance_stats_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698