From 6cc8ece6614023a11359a3504bcf76104ba6ba61 Mon Sep 17 00:00:00 2001 From: "zmo@google.com" Date: Mon, 14 Mar 2011 20:05:47 +0000 Subject: Refactoring GPUInfo: 1) remove the level field; instead, having a finalized field indicating if more info might be collected. 2) change version data from uint32 to string. Refactoring GpuDataManager: 1) remove GpuFeatureAllowed() because we expose un-filtered flags through GpuFeatureFlags(). 2) disallow launch GPU process to collect gpu info if accelerated_compositing is not allowed. BUG=none TEST=unittest Review URL: http://codereview.chromium.org/6672004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78080 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/gpu_data_manager.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'chrome/browser/gpu_data_manager.h') diff --git a/chrome/browser/gpu_data_manager.h b/chrome/browser/gpu_data_manager.h index 112405e..c2566fe 100644 --- a/chrome/browser/gpu_data_manager.h +++ b/chrome/browser/gpu_data_manager.h @@ -28,7 +28,7 @@ class GpuDataManager { // Requests complete GPUinfo if it has not already been requested void RequestCompleteGpuInfoIfNeeded(); - // Only update if the level is higher than the cached GPUInfo level. + // Only update if the current GPUInfo is not finalized. void UpdateGpuInfo(const GPUInfo& gpu_info); const GPUInfo& gpu_info() const; @@ -44,6 +44,13 @@ class GpuDataManager { // If necessary, compute the flags before returning them. GpuFeatureFlags GetGpuFeatureFlags(); + // This indicator might change because we could collect more GPU info or + // because the GPU blacklist could be updated. + // If this returns false, any further GPU access, including launching GPU + // process, establish GPU channel, and GPU info collection, should be + // blocked. + bool GpuAccessAllowed(); + // Add a callback. void AddGpuInfoUpdateCallback(Callback0::Type* callback); @@ -55,9 +62,6 @@ class GpuDataManager { // in correspondance to preliminary gpu feature flags. void AppendRendererCommandLine(CommandLine* command_line); - // If necessary, compute the flags before checking if a feature is allowed - bool GpuFeatureAllowed(uint32 feature); - private: friend struct DefaultSingletonTraits; -- cgit v1.1