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

Side by Side Diff: chrome/browser/gpu_blacklist.h

Issue 10832044: Enhance GPU blacklist so we can also blacklist GPUs other than the primary one. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/gpu_blacklist.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BLACKLIST_H_ 5 #ifndef CHROME_BROWSER_GPU_BLACKLIST_H_
6 #define CHROME_BROWSER_GPU_BLACKLIST_H_ 6 #define CHROME_BROWSER_GPU_BLACKLIST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 private: 266 private:
267 friend class base::RefCounted<GpuBlacklistEntry>; 267 friend class base::RefCounted<GpuBlacklistEntry>;
268 268
269 enum MultiGpuStyle { 269 enum MultiGpuStyle {
270 kMultiGpuStyleOptimus, 270 kMultiGpuStyleOptimus,
271 kMultiGpuStyleAMDSwitchable, 271 kMultiGpuStyleAMDSwitchable,
272 kMultiGpuStyleNone 272 kMultiGpuStyleNone
273 }; 273 };
274 274
275 enum MultiGpuCategory {
276 kMultiGpuCategoryPrimary,
277 kMultiGpuCategorySecondary,
278 kMultiGpuCategoryAny,
279 kMultiGpuCategoryNone
280 };
281
275 GpuBlacklistEntry(); 282 GpuBlacklistEntry();
276 ~GpuBlacklistEntry() { } 283 ~GpuBlacklistEntry() { }
277 284
278 bool SetId(uint32 id); 285 bool SetId(uint32 id);
279 286
280 void SetDisabled(bool disabled); 287 void SetDisabled(bool disabled);
281 288
282 bool SetOsInfo(const std::string& os, 289 bool SetOsInfo(const std::string& os,
283 const std::string& version_op, 290 const std::string& version_op,
284 const std::string& version_string, 291 const std::string& version_string,
285 const std::string& version_string2); 292 const std::string& version_string2);
286 293
287 bool SetVendorId(const std::string& vendor_id_string); 294 bool SetVendorId(const std::string& vendor_id_string);
288 295
289 bool AddDeviceId(const std::string& device_id_string); 296 bool AddDeviceId(const std::string& device_id_string);
290 297
291 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string); 298 bool SetMultiGpuStyle(const std::string& multi_gpu_style_string);
292 299
300 bool SetMultiGpuCategory(const std::string& multi_gpu_category_string);
301
293 bool SetDriverVendorInfo(const std::string& vendor_op, 302 bool SetDriverVendorInfo(const std::string& vendor_op,
294 const std::string& vendor_value); 303 const std::string& vendor_value);
295 304
296 bool SetDriverVersionInfo(const std::string& version_op, 305 bool SetDriverVersionInfo(const std::string& version_op,
297 const std::string& version_style, 306 const std::string& version_style,
298 const std::string& version_string, 307 const std::string& version_string,
299 const std::string& version_string2); 308 const std::string& version_string2);
300 309
301 bool SetDriverDateInfo(const std::string& date_op, 310 bool SetDriverDateInfo(const std::string& date_op,
302 const std::string& date_string, 311 const std::string& date_string,
(...skipping 17 matching lines...) Expand all
320 const std::string& float_string, 329 const std::string& float_string,
321 const std::string& float_string2); 330 const std::string& float_string2);
322 331
323 bool SetBlacklistedFeatures( 332 bool SetBlacklistedFeatures(
324 const std::vector<std::string>& blacklisted_features); 333 const std::vector<std::string>& blacklisted_features);
325 334
326 void AddException(ScopedGpuBlacklistEntry exception); 335 void AddException(ScopedGpuBlacklistEntry exception);
327 336
328 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style); 337 static MultiGpuStyle StringToMultiGpuStyle(const std::string& style);
329 338
339 static MultiGpuCategory StringToMultiGpuCategory(
340 const std::string& category);
341
330 uint32 id_; 342 uint32 id_;
331 bool disabled_; 343 bool disabled_;
332 std::string description_; 344 std::string description_;
333 std::vector<int> cr_bugs_; 345 std::vector<int> cr_bugs_;
334 std::vector<int> webkit_bugs_; 346 std::vector<int> webkit_bugs_;
335 scoped_ptr<OsInfo> os_info_; 347 scoped_ptr<OsInfo> os_info_;
336 uint32 vendor_id_; 348 uint32 vendor_id_;
337 std::vector<uint32> device_id_list_; 349 std::vector<uint32> device_id_list_;
338 MultiGpuStyle multi_gpu_style_; 350 MultiGpuStyle multi_gpu_style_;
351 MultiGpuCategory multi_gpu_category_;
339 scoped_ptr<StringInfo> driver_vendor_info_; 352 scoped_ptr<StringInfo> driver_vendor_info_;
340 scoped_ptr<VersionInfo> driver_version_info_; 353 scoped_ptr<VersionInfo> driver_version_info_;
341 scoped_ptr<VersionInfo> driver_date_info_; 354 scoped_ptr<VersionInfo> driver_date_info_;
342 scoped_ptr<StringInfo> gl_vendor_info_; 355 scoped_ptr<StringInfo> gl_vendor_info_;
343 scoped_ptr<StringInfo> gl_renderer_info_; 356 scoped_ptr<StringInfo> gl_renderer_info_;
344 scoped_ptr<FloatInfo> perf_graphics_info_; 357 scoped_ptr<FloatInfo> perf_graphics_info_;
345 scoped_ptr<FloatInfo> perf_gaming_info_; 358 scoped_ptr<FloatInfo> perf_gaming_info_;
346 scoped_ptr<FloatInfo> perf_overall_info_; 359 scoped_ptr<FloatInfo> perf_overall_info_;
347 content::GpuFeatureType feature_type_; 360 content::GpuFeatureType feature_type_;
348 std::vector<ScopedGpuBlacklistEntry> exceptions_; 361 std::vector<ScopedGpuBlacklistEntry> exceptions_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 std::vector<ScopedGpuBlacklistEntry> active_entries_; 405 std::vector<ScopedGpuBlacklistEntry> active_entries_;
393 406
394 uint32 max_entry_id_; 407 uint32 max_entry_id_;
395 408
396 bool contains_unknown_fields_; 409 bool contains_unknown_fields_;
397 410
398 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); 411 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist);
399 }; 412 };
400 413
401 #endif // CHROME_BROWSER_GPU_BLACKLIST_H_ 414 #endif // CHROME_BROWSER_GPU_BLACKLIST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gpu_blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698