Chromium Code Reviews| Index: content/browser/gpu/gpu_data_manager_impl_private.cc |
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| index 2ebba27be59ac3d858b9549732c2f164a78c254e..bc782ce476bb30f6cf7ee7f1513da527fb1350f4 100644 |
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc |
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc |
| @@ -4,6 +4,8 @@ |
| #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| +#include <algorithm> |
| +#include <iterator> |
| #include <memory> |
| #include <utility> |
| @@ -347,12 +349,22 @@ bool GpuDataManagerImplPrivate::GpuAccessAllowed( |
| // We only need to block GPU process if more features are disallowed other |
| // than those in the preliminary gpu feature flags because the latter work |
| - // through renderer commandline switches. |
| - std::set<int> features = preliminary_blacklisted_features_; |
| - gpu::MergeFeatureSets(&features, blacklisted_features_); |
| - if (features.size() > preliminary_blacklisted_features_.size()) { |
| + // through renderer commandline switches. WebGL and WebGL2 should not matter |
| + // because their context creation can always be rejected on the GPU process |
| + // side. |
|
Ken Russell (switch to Gerrit)
2016/11/15 01:25:14
Would other GPU acceleration features also be good
Zhenyao Mo
2016/11/15 01:38:21
Might be. Good point. Added.
|
| + std::set<int> feature_diffs; |
| + std::set_difference(blacklisted_features_.begin(), |
| + blacklisted_features_.end(), |
| + preliminary_blacklisted_features_.begin(), |
| + preliminary_blacklisted_features_.end(), |
| + std::inserter(feature_diffs, feature_diffs.begin())); |
| + if (feature_diffs.size()) { |
| + feature_diffs.erase(gpu::GPU_FEATURE_TYPE_WEBGL); |
| + feature_diffs.erase(gpu::GPU_FEATURE_TYPE_WEBGL2); |
| + } |
| + if (feature_diffs.size()) { |
| if (reason) { |
| - *reason = "Features are disabled upon full but not preliminary GPU info."; |
| + *reason = "Features are disabled on full but not preliminary GPU info."; |
| } |
| return false; |
| } |