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) |
| 796 feature_status_list->Append(NewStatusValue("webgl", |
| 797 "enabled_readback")); |
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", |
(...skipping 25 matching lines...) Expand all Loading... |
827 problem->SetString("description", | 833 problem->SetString("description", |
828 "Accelerated 2D canvas has been disabled at the command line"); | 834 "Accelerated 2D canvas has been disabled at the command line"); |
829 problem->Set("crBugs", new ListValue()); | 835 problem->Set("crBugs", new ListValue()); |
830 problem->Set("webkitBugs", new ListValue()); | 836 problem->Set("webkitBugs", new ListValue()); |
831 problem_list->Append(problem); | 837 problem_list->Append(problem); |
832 } | 838 } |
833 if (disable_accelerated_compositing) { | 839 if (disable_accelerated_compositing) { |
834 DictionaryValue* problem = new DictionaryValue(); | 840 DictionaryValue* problem = new DictionaryValue(); |
835 problem->SetString("description", | 841 problem->SetString("description", |
836 "Accelerated compositing has been disabled, either via about:flags " | 842 "Accelerated compositing has been disabled, either via about:flags " |
837 "or command line"); | 843 "or command line. This adversely affects performance of all hardware " |
| 844 " accelerated features."); |
838 problem->Set("crBugs", new ListValue()); | 845 problem->Set("crBugs", new ListValue()); |
839 problem->Set("webkitBugs", new ListValue()); | 846 problem->Set("webkitBugs", new ListValue()); |
840 problem_list->Append(problem); | 847 problem_list->Append(problem); |
841 } | 848 } |
842 if (disable_experimental_webgl) { | 849 if (disable_experimental_webgl) { |
843 DictionaryValue* problem = new DictionaryValue(); | 850 DictionaryValue* problem = new DictionaryValue(); |
844 problem->SetString("description", | 851 problem->SetString("description", |
845 "WebGL has been disabled, either via about:flags " | 852 "WebGL has been disabled, either via about:flags " |
846 "or command line"); | 853 "or command line"); |
847 problem->Set("crBugs", new ListValue()); | 854 problem->Set("crBugs", new ListValue()); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 browser_version_info.reset( | 963 browser_version_info.reset( |
957 new VersionInfo(version_op, version_string, version_string2)); | 964 new VersionInfo(version_op, version_string, version_string2)); |
958 if (!browser_version_info->IsValid()) | 965 if (!browser_version_info->IsValid()) |
959 return kMalformed; | 966 return kMalformed; |
960 if (browser_version_info->Contains(*browser_version_)) | 967 if (browser_version_info->Contains(*browser_version_)) |
961 return kSupported; | 968 return kSupported; |
962 return kUnsupported; | 969 return kUnsupported; |
963 } | 970 } |
964 return kSupported; | 971 return kSupported; |
965 } | 972 } |
OLD | NEW |