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 #include "content/browser/gpu/gpu_blacklist.h" | 5 #include "content/browser/gpu/gpu_blacklist.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
739 feature_status_list->Append(NewStatusValue("2d_canvas", | 739 feature_status_list->Append(NewStatusValue("2d_canvas", |
740 "software")); | 740 "software")); |
741 else | 741 else |
742 feature_status_list->Append(NewStatusValue("2d_canvas", | 742 feature_status_list->Append(NewStatusValue("2d_canvas", |
743 "unavailable_software")); | 743 "unavailable_software")); |
744 } else if (!disable_accelerated_2D_canvas) { | 744 } else if (!disable_accelerated_2D_canvas) { |
745 if (IsFeatureBlacklisted( | 745 if (IsFeatureBlacklisted( |
746 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)) | 746 GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)) |
747 feature_status_list->Append(NewStatusValue("2d_canvas", | 747 feature_status_list->Append(NewStatusValue("2d_canvas", |
748 "unavailable_software")); | 748 "unavailable_software")); |
749 else if (disable_accelerated_compositing) | |
750 feature_status_list->Append(NewStatusValue("2d_canvas", | |
751 "disabled_software")); | |
749 else | 752 else |
750 feature_status_list->Append(NewStatusValue("2d_canvas", | 753 feature_status_list->Append(NewStatusValue("2d_canvas", |
751 "enabled")); | 754 "enabled")); |
752 } else { | 755 } else { |
753 feature_status_list->Append(NewStatusValue("2d_canvas", | 756 feature_status_list->Append(NewStatusValue("2d_canvas", |
754 "software")); | 757 "software")); |
755 } | 758 } |
756 | 759 |
757 // 3d css and compositing. | 760 // 3d css and compositing. |
758 if (!gpu_access_allowed) { | 761 if (!gpu_access_allowed) { |
(...skipping 23 matching lines...) Expand all Loading... | |
782 if (!gpu_access_allowed) | 785 if (!gpu_access_allowed) |
783 feature_status_list->Append(NewStatusValue("webgl", | 786 feature_status_list->Append(NewStatusValue("webgl", |
784 "unavailable_off")); | 787 "unavailable_off")); |
785 else if (disable_experimental_webgl) | 788 else if (disable_experimental_webgl) |
786 feature_status_list->Append(NewStatusValue("webgl", | 789 feature_status_list->Append(NewStatusValue("webgl", |
787 "disabled_off")); | 790 "disabled_off")); |
788 else if (IsFeatureBlacklisted( | 791 else if (IsFeatureBlacklisted( |
789 GpuFeatureFlags::kGpuFeatureWebgl)) | 792 GpuFeatureFlags::kGpuFeatureWebgl)) |
790 feature_status_list->Append(NewStatusValue("webgl", | 793 feature_status_list->Append(NewStatusValue("webgl", |
791 "unavailable_off")); | 794 "unavailable_off")); |
795 else if (disable_accelerated_compositing) | |
Ken Russell (switch to Gerrit)
2011/07/30 01:06:51
I'm not sure this is correct. Currently if --disab
| |
796 feature_status_list->Append(NewStatusValue("webgl", | |
797 "unavailable_off")); | |
792 else | 798 else |
793 feature_status_list->Append(NewStatusValue("webgl", | 799 feature_status_list->Append(NewStatusValue("webgl", |
794 "enabled")); | 800 "enabled")); |
795 | 801 |
796 // multisampling | 802 // multisampling |
797 if (!gpu_access_allowed) | 803 if (!gpu_access_allowed) |
798 feature_status_list->Append(NewStatusValue("multisampling", | 804 feature_status_list->Append(NewStatusValue("multisampling", |
799 "unavailable_off")); | 805 "unavailable_off")); |
800 else if (disable_multisampling) | 806 else if (disable_multisampling) |
801 feature_status_list->Append(NewStatusValue("multisampling", | 807 feature_status_list->Append(NewStatusValue("multisampling", |
802 "disabled_off")); | 808 "disabled_off")); |
803 else if (IsFeatureBlacklisted( | 809 else if (IsFeatureBlacklisted( |
804 GpuFeatureFlags::kGpuFeatureMultisampling)) | 810 GpuFeatureFlags::kGpuFeatureMultisampling)) |
805 feature_status_list->Append(NewStatusValue("multisampling", | 811 feature_status_list->Append(NewStatusValue("multisampling", |
806 "disabled_off")); | 812 "disabled_off")); |
813 else if (disable_accelerated_compositing) | |
814 feature_status_list->Append(NewStatusValue("multisampling", | |
815 "unavailable_off")); | |
Ken Russell (switch to Gerrit)
2011/07/30 01:06:51
I'm also not sure this one is correct. I'm pretty
| |
807 else | 816 else |
808 feature_status_list->Append(NewStatusValue("multisampling", | 817 feature_status_list->Append(NewStatusValue("multisampling", |
809 "enabled")); | 818 "enabled")); |
810 | 819 |
811 status->Set("featureStatus", feature_status_list); | 820 status->Set("featureStatus", feature_status_list); |
812 } | 821 } |
813 | 822 |
814 // Build the problems list. | 823 // Build the problems list. |
815 { | 824 { |
816 ListValue* problem_list = new ListValue(); | 825 ListValue* problem_list = new ListValue(); |
(...skipping 10 matching lines...) Expand all Loading... | |
827 problem->SetString("description", | 836 problem->SetString("description", |
828 "Accelerated 2D canvas has been disabled at the command line"); | 837 "Accelerated 2D canvas has been disabled at the command line"); |
829 problem->Set("crBugs", new ListValue()); | 838 problem->Set("crBugs", new ListValue()); |
830 problem->Set("webkitBugs", new ListValue()); | 839 problem->Set("webkitBugs", new ListValue()); |
831 problem_list->Append(problem); | 840 problem_list->Append(problem); |
832 } | 841 } |
833 if (disable_accelerated_compositing) { | 842 if (disable_accelerated_compositing) { |
834 DictionaryValue* problem = new DictionaryValue(); | 843 DictionaryValue* problem = new DictionaryValue(); |
835 problem->SetString("description", | 844 problem->SetString("description", |
836 "Accelerated compositing has been disabled, either via about:flags " | 845 "Accelerated compositing has been disabled, either via about:flags " |
837 "or command line"); | 846 "or command line. This disables all hardware acceleration."); |
Ken Russell (switch to Gerrit)
2011/07/30 01:06:51
Not sure this comment is correct either. It really
| |
838 problem->Set("crBugs", new ListValue()); | 847 problem->Set("crBugs", new ListValue()); |
839 problem->Set("webkitBugs", new ListValue()); | 848 problem->Set("webkitBugs", new ListValue()); |
840 problem_list->Append(problem); | 849 problem_list->Append(problem); |
841 } | 850 } |
842 if (disable_experimental_webgl) { | 851 if (disable_experimental_webgl) { |
843 DictionaryValue* problem = new DictionaryValue(); | 852 DictionaryValue* problem = new DictionaryValue(); |
844 problem->SetString("description", | 853 problem->SetString("description", |
845 "WebGL has been disabled, either via about:flags " | 854 "WebGL has been disabled, either via about:flags " |
846 "or command line"); | 855 "or command line"); |
847 problem->Set("crBugs", new ListValue()); | 856 problem->Set("crBugs", new ListValue()); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
956 browser_version_info.reset( | 965 browser_version_info.reset( |
957 new VersionInfo(version_op, version_string, version_string2)); | 966 new VersionInfo(version_op, version_string, version_string2)); |
958 if (!browser_version_info->IsValid()) | 967 if (!browser_version_info->IsValid()) |
959 return kMalformed; | 968 return kMalformed; |
960 if (browser_version_info->Contains(*browser_version_)) | 969 if (browser_version_info->Contains(*browser_version_)) |
961 return kSupported; | 970 return kSupported; |
962 return kUnsupported; | 971 return kUnsupported; |
963 } | 972 } |
964 return kSupported; | 973 return kSupported; |
965 } | 974 } |
OLD | NEW |