| 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 e9d5277fa2e2550547ebdc9ab6d6518c9fcb83b1..aeb7e3b26bf1fdcedef3331d8cc7b1f4af395dae 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -309,6 +309,11 @@ bool GpuDataManagerImplPrivate::IsFeatureBlacklisted(int feature) const {
|
| return (blacklisted_features_.count(feature) == 1);
|
| }
|
|
|
| +bool GpuDataManagerImplPrivate::IsFeatureEnabled(int feature) const {
|
| + DCHECK_EQ(feature, gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION);
|
| + return (enabled_features_.count(feature) == 1);
|
| +}
|
| +
|
| bool GpuDataManagerImplPrivate::IsDriverBugWorkaroundActive(int feature) const {
|
| return (gpu_driver_bugs_.count(feature) == 1);
|
| }
|
| @@ -682,6 +687,26 @@ void GpuDataManagerImplPrivate::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) {
|
| UpdateGpuInfoHelper();
|
| }
|
|
|
| +void GpuDataManagerImplPrivate::UpdateGpuFeatureStatus(
|
| + const gpu::GPUFeatureStatus& gpu_feature_status) {
|
| + if (gpu_blacklist_) {
|
| + // Currently this duplicates the blacklist re-computation in
|
| + // UpdateGpuInfoHelper. Ensure we get the expected value for the
|
| + // GPU_RASTERIZATION feature, which is the only one in use here.
|
| + DCHECK_EQ(
|
| + gpu_feature_status.blacklisted_features.count(
|
| + gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION),
|
| + blacklisted_features_.count(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION));
|
| + }
|
| +
|
| + // Copy the |enabled_features| member.
|
| + enabled_features_ = gpu_feature_status.enabled_features;
|
| + // This is currently only used for GPU rasterization. Ensure that this is the
|
| + // only flag set (if set at all).
|
| + DCHECK(enabled_features_.size() ==
|
| + enabled_features_.count(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION));
|
| +}
|
| +
|
| void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats(
|
| const gpu::VideoMemoryUsageStats& video_memory_usage_stats) {
|
| GpuDataManagerImpl::UnlockedSession session(owner_);
|
|
|