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

Side by Side Diff: content/browser/gpu/gpu_util.h

Issue 10908110: Move gpu blacklist to content side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 #ifndef CHROME_BROWSER_GPU_UTIL_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_UTIL_H_
6 #define CHROME_BROWSER_GPU_UTIL_H_ 6 #define CONTENT_BROWSER_GPU_GPU_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h"
10 #include "content/public/common/gpu_feature_type.h" 11 #include "content/public/common/gpu_feature_type.h"
11 12
12 namespace base { 13 class GpuBlacklist;
13 class DictionaryValue;
14 class Value;
15 }
16 14
17 namespace gpu_util { 15 namespace gpu_util {
18 16
19 // Maps string to GpuFeatureType; returns GPU_FEATURE_TYPE_UNKNOWN if none of 17 // Maps string to GpuFeatureType; returns GPU_FEATURE_TYPE_UNKNOWN if none of
20 // the following is input (case-sensitive): 18 // the following is input (case-sensitive):
21 // "accelerated_2d_canvas" 19 // "accelerated_2d_canvas"
22 // "accelerated_compositing" 20 // "accelerated_compositing"
23 // "webgl" 21 // "webgl"
24 // "multisampling" 22 // "multisampling"
25 content::GpuFeatureType StringToGpuFeatureType( 23 content::GpuFeatureType StringToGpuFeatureType(
26 const std::string& feature_string); 24 const std::string& feature_string);
27 25
28 // Gets a string version of a feature type for use in about:gpu. Will yield 26 // Gets a string version of a feature type for use in about:gpu. Will yield
29 // strings from StringToGpuFeatureType, e.g. 27 // strings from StringToGpuFeatureType, e.g.
30 // GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS becomes "accelerated_2d_canvas" 28 // GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS becomes "accelerated_2d_canvas"
31 std::string GpuFeatureTypeToString(content::GpuFeatureType feature); 29 std::string GpuFeatureTypeToString(content::GpuFeatureType feature);
32 30
33 // Returns status of various GPU features. This is two parted:
34 // {
35 // featureStatus: []
36 // problems: []
37 // }
38 //
39 // Each entry in feature_status has:
40 // {
41 // name: "name of feature"
42 // status: "enabled" | "unavailable_software" | "unavailable_off" |
43 // "software" | "disabled_off" | "disabled_softare";
44 // }
45 //
46 // The features reported are not 1:1 with GpuFeatureType. Rather, they are:
47 // '2d_canvas'
48 // '3d_css'
49 // 'composting',
50 // 'webgl',
51 // 'multisampling',
52 // 'flash_3d',
53 // 'flash_stage3d',
54 // 'texture_sharing'
55 // 'video_decode'
56 //
57 // Each problems has:
58 // {
59 // "description": "Your GPU is too old",
60 // "crBugs": [1234],
61 // "webkitBugs": []
62 // }
63 //
64 // Caller is responsible for deleting the returned value.
65 base::Value* GetFeatureStatus();
66
67 // Returns the GpuInfo as a DictionaryValue.
68 base::DictionaryValue* GpuInfoAsDictionaryValue();
69
70 // Send UMA histograms about the enabled features. 31 // Send UMA histograms about the enabled features.
71 void UpdateStats(); 32 void UpdateStats(const GpuBlacklist* blacklist,
72 33 uint32 blacklisted_features);
jbates 2012/09/06 00:50:41 nit: need some comments about these params
73 // Sets up force-compositing-mode and threaded compositing field trials.
74 void InitializeCompositingFieldTrial();
75 34
76 } // namespace gpu_util 35 } // namespace gpu_util
77 36
78 #endif // CHROME_BROWSER_GPU_UTIL_H_ 37 #endif // CONTENT_BROWSER_GPU_GPU_UTIL_H_
38
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698