OLD | NEW |
| (Empty) |
1 // Determines whether a certain gpu is prefered in a dual-gpu situation. | |
2 // A valid gpu_switching_list.json file are in the format of | |
3 // { | |
4 // "version": "x.y", | |
5 // "entries": [ | |
6 // { // entry 1 | |
7 // }, | |
8 // ... | |
9 // { // entry n | |
10 // } | |
11 // ] | |
12 // } | |
13 // | |
14 // Each entry contains the following fields (fields are optional unless | |
15 // specifically described as mandatory below): | |
16 // 1. "id" is an integer. 0 is reserved. This field is mandatory. | |
17 // 2. "os" contains "type" and an optional "version". "type" could be "macosx", | |
18 // "linux", "win", "chromeos", or "any". "any" is the same as not specifying | |
19 // "os". | |
20 // "version" is a VERSION structure (defined below). | |
21 // 3. "vendor_id" is a string. 0 is reserved. | |
22 // 4. "device_id" is an array of strings. 0 is reserved. | |
23 // 5. "multi_gpu_style" is a string, valid values include "optimus", and | |
24 // "amd_switchable". | |
25 // 6. "multi_gpu_category" is a string, valid values include "any", "primary", | |
26 // and "secondary". If unspecified, the default value is "primary". | |
27 // 7. "driver_vendor" is a STRING structure (defined below). | |
28 // 8. "driver_version" is a VERSION structure (defined below). | |
29 // 9. "driver_date" is a VERSION structure (defined below). | |
30 // The version is interpreted as "year.month.day". | |
31 // 10. "gl_vendor" is a STRING structure (defined below). | |
32 // 11. "gl_renderer" is a STRING structure (defined below). | |
33 // 12. "perf_graphics" is a FLOAT structure (defined below). | |
34 // 13. "perf_gaming" is a FLOAT structure (defined below). | |
35 // 14. "perf_overall" is a FLOAT structure (defined below). | |
36 // 15. "machine_model" contais "name" and an optional "version". "name" is a | |
37 // STRING structure and "version" is a VERSION structure (defined below). | |
38 // 16. "gpu_count" is a INT structure (defined below). | |
39 // 17 "cpu_info" is a STRING structure (defined below). | |
40 // 18. "exceptions" is a list of entries. | |
41 // 19. "features" is a list of gpu switching options, including | |
42 // "force_discrete" and "force_integrated". | |
43 // This field is mandatory. | |
44 // 20. "description" has the description of the entry. | |
45 // 21. "webkit_bugs" is an array of associated webkit bug numbers. | |
46 // 22. "cr_bugs" is an array of associated webkit bug numbers. | |
47 // 23. "browser_version" is a VERSION structure (defined below). If this | |
48 // condition is not satisfied, the entry will be ignored. If it is not | |
49 // present, then the entry applies to all versions of the browser. | |
50 // 24. "disabled" is a boolean. If it is present, the entry will be skipped. | |
51 // This can not be used in exceptions. | |
52 // | |
53 // VERSION includes "op", "style", "number", and "number2". "op" can be any of | |
54 // the following values: "=", "<", "<=", ">", ">=", "any", "between". "style" | |
55 // is optional and can be "lexical" or "numerical"; if it's not specified, it | |
56 // defaults to "numerical". "number2" is only used if "op" is "between". | |
57 // "between" is "number <= * <= number2". | |
58 // "number" is used for all "op" values except "any". "number" and "number2" | |
59 // are in the format of x, x.x, x.x.x, etc. | |
60 // Only "driver_version" supports lexical style if the format is major.minor; | |
61 // in that case, major is still numerical, but minor is lexical. | |
62 // | |
63 // STRING includes "op" and "value". "op" can be any of the following values: | |
64 // "contains", "beginwith", "endwith", "=". "value" is a string. | |
65 // | |
66 // FLOAT includes "op" "value", and "value2". "op" can be any of the | |
67 // following values: "=", "<", "<=", ">", ">=", "any", "between". "value2" is | |
68 // only used if "op" is "between". "value" is used for all "op" values except | |
69 // "any". "value" and "value2" are valid float numbers. | |
70 // INT is very much like FLOAT, except that the values need to be integers. | |
71 | |
72 { | |
73 "name": "gpu switching list", | |
74 // Please update the version number whenever you change this file. | |
75 "version": "1.0", | |
76 "entries": [ | |
77 { | |
78 "id": 1, | |
79 "description": "Force to use discrete GPU on older MacBookPro models.", | |
80 "cr_bugs": [113703], | |
81 "os": { | |
82 "type": "macosx", | |
83 "version": { | |
84 "op": ">=", | |
85 "number": "10.7" | |
86 } | |
87 }, | |
88 "machine_model": { | |
89 "name": { | |
90 "op": "=", | |
91 "value": "MacBookPro" | |
92 }, | |
93 "version": { | |
94 "op": "<", | |
95 "number": "8" | |
96 } | |
97 }, | |
98 "gpu_count": { | |
99 "op": "=", | |
100 "value": "2" | |
101 }, | |
102 "features": [ | |
103 "force_discrete" | |
104 ] | |
105 } | |
106 ] | |
107 } | |
OLD | NEW |