| 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 // enabled: boolean; |
| 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 // "affectedFeatures": "string" |
| 72 Value* GetBlacklistingReasons() const; | 82 // } |
| 83 Value* GetStatus() const; |
| 73 | 84 |
| 74 // Return the largest entry id. This is used for histogramming. | 85 // Return the largest entry id. This is used for histogramming. |
| 75 uint32 max_entry_id() const; | 86 uint32 max_entry_id() const; |
| 76 | 87 |
| 77 // Collects the version of the current blacklist. Returns false and sets | 88 // Collects the version of the current blacklist. Returns false and sets |
| 78 // major and minor to 0 on failure. | 89 // major and minor to 0 on failure. |
| 79 bool GetVersion(uint16* major, uint16* monir) const; | 90 bool GetVersion(uint16* major, uint16* monir) const; |
| 80 | 91 |
| 81 // Collects the version of the current blacklist from a parsed json file. | 92 // Collects the version of the current blacklist from a parsed json file. |
| 82 // Returns false and sets major and minor to 0 on failure. | 93 // Returns false and sets major and minor to 0 on failure. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // user machine. It is updated everytime DetermineGpuFeatureFlags() is | 268 // user machine. It is updated everytime DetermineGpuFeatureFlags() is |
| 258 // called and is used later by GetGpuFeatureFlagEntries(). | 269 // called and is used later by GetGpuFeatureFlagEntries(). |
| 259 std::vector<GpuBlacklistEntry*> active_entries_; | 270 std::vector<GpuBlacklistEntry*> active_entries_; |
| 260 | 271 |
| 261 uint32 max_entry_id_; | 272 uint32 max_entry_id_; |
| 262 | 273 |
| 263 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); | 274 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); |
| 264 }; | 275 }; |
| 265 | 276 |
| 266 #endif // CONTENT_BROWSER_GPU_BLACKLIST_H_ | 277 #endif // CONTENT_BROWSER_GPU_BLACKLIST_H_ |
| OLD | NEW |