OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_GPU_BLACKLIST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BLACKLIST_H_ |
6 #define CONTENT_BROWSER_GPU_BLACKLIST_H_ | 6 #define CONTENT_BROWSER_GPU_BLACKLIST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 // DetermineGpuFeatureFlags() call. This tells which entries are responsible | 54 // DetermineGpuFeatureFlags() call. This tells which entries are responsible |
55 // for raising a certain flag, i.e, for blacklisting a certain feature. | 55 // for raising a certain flag, i.e, for blacklisting a certain feature. |
56 // Examples of "feature": | 56 // Examples of "feature": |
57 // kGpuFeatureAll - any of the supported features; | 57 // kGpuFeatureAll - any of the supported features; |
58 // kGpuFeatureWebgl - a single feature; | 58 // kGpuFeatureWebgl - a single feature; |
59 // kGpuFeatureWebgl | kGpuFeatureAcceleratedCompositing - two features. | 59 // kGpuFeatureWebgl | kGpuFeatureAcceleratedCompositing - two features. |
60 void GetGpuFeatureFlagEntries(GpuFeatureFlags::GpuFeatureType feature, | 60 void GetGpuFeatureFlagEntries(GpuFeatureFlags::GpuFeatureType feature, |
61 std::vector<uint32>& entry_ids) const; | 61 std::vector<uint32>& entry_ids) const; |
62 | 62 |
63 | 63 |
64 // Returns an array of entries, each entry of which has | 64 // Returns status information on the blacklist. This is two parted: |
65 // description, cr_bugs, and webkit_bugs explaining reason for | 65 // { |
66 // blacklisting, e.g.: | 66 // featureStatus: [] |
67 // [{ | 67 // problems: [] |
68 // } | |
69 // | |
70 // Each entry in feature_status has: | |
71 // { | |
72 // name: "name of feature" | |
73 // status: "enabled" | "unavailable" | "software"; | |
74 // } | |
75 // | |
76 // Each problems has: | |
77 // { | |
68 // "description": "Your GPU is too old", | 78 // "description": "Your GPU is too old", |
69 // "cr_bugs": [1234], | 79 // "crBugs": [1234], |
70 // "webkit_bugs": [] | 80 // "webkitBugs": [] |
71 // }] | 81 // } |
72 Value* GetBlacklistingReasons() const; | 82 Value* GetFeatureStatus(bool gpuAccessAllowed) const; |
zmo
2011/04/11 23:10:25
gpu_access_allowed
| |
73 | 83 |
74 // Return the largest entry id. This is used for histogramming. | 84 // Return the largest entry id. This is used for histogramming. |
75 uint32 max_entry_id() const; | 85 uint32 max_entry_id() const; |
76 | 86 |
77 // Collects the version of the current blacklist. Returns false and sets | 87 // Collects the version of the current blacklist. Returns false and sets |
78 // major and minor to 0 on failure. | 88 // major and minor to 0 on failure. |
79 bool GetVersion(uint16* major, uint16* monir) const; | 89 bool GetVersion(uint16* major, uint16* monir) const; |
80 | 90 |
81 // Collects the version of the current blacklist from a parsed json file. | 91 // Collects the version of the current blacklist from a parsed json file. |
82 // Returns false and sets major and minor to 0 on failure. | 92 // Returns false and sets major and minor to 0 on failure. |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
271 // user machine. It is updated everytime DetermineGpuFeatureFlags() is | 281 // user machine. It is updated everytime DetermineGpuFeatureFlags() is |
272 // called and is used later by GetGpuFeatureFlagEntries(). | 282 // called and is used later by GetGpuFeatureFlagEntries(). |
273 std::vector<GpuBlacklistEntry*> active_entries_; | 283 std::vector<GpuBlacklistEntry*> active_entries_; |
274 | 284 |
275 uint32 max_entry_id_; | 285 uint32 max_entry_id_; |
276 | 286 |
277 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); | 287 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); |
278 }; | 288 }; |
279 | 289 |
280 #endif // CONTENT_BROWSER_GPU_BLACKLIST_H_ | 290 #endif // CONTENT_BROWSER_GPU_BLACKLIST_H_ |
OLD | NEW |