Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2654993004: Move GPU blacklist calculation to GPU proc (Closed)
Patch Set: cleanup Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_);

Powered by Google App Engine
This is Rietveld 408576698