Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / browser / gpu / gpu_data_manager_impl.h
index e1ed2f8..fd02372 100644 (file)
 #include "content/public/common/three_d_api_types.h"
 #include "gpu/config/gpu_info.h"
 
-class CommandLine;
 class GURL;
-struct WebPreferences;
+
+namespace base {
+class CommandLine;
+}
 
 namespace content {
 
 class GpuDataManagerImplPrivate;
+struct WebPreferences;
 
 class CONTENT_EXPORT GpuDataManagerImpl
     : public NON_EXPORTED_BASE(GpuDataManager) {
@@ -64,10 +67,12 @@ class CONTENT_EXPORT GpuDataManagerImpl
       const GetGpuProcessHandlesCallback& callback) const OVERRIDE;
   virtual bool GpuAccessAllowed(std::string* reason) const OVERRIDE;
   virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE;
+  virtual bool IsEssentialGpuInfoAvailable() const OVERRIDE;
   virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE;
   virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE;
   virtual bool ShouldUseSwiftShader() const OVERRIDE;
   virtual void RegisterSwiftShaderPath(const base::FilePath& path) OVERRIDE;
+  virtual bool ShouldUseWarp() const OVERRIDE;
   virtual void AddObserver(GpuDataManagerObserver* observer) OVERRIDE;
   virtual void RemoveObserver(GpuDataManagerObserver* observer) OVERRIDE;
   virtual void UnblockDomainFrom3DAPIs(const GURL& url) OVERRIDE;
@@ -95,14 +100,14 @@ class CONTENT_EXPORT GpuDataManagerImpl
 
   // Insert disable-feature switches corresponding to preliminary gpu feature
   // flags into the renderer process command line.
-  void AppendRendererCommandLine(CommandLine* command_line) const;
+  void AppendRendererCommandLine(base::CommandLine* command_line) const;
 
   // Insert switches into gpu process command line: kUseGL, etc.
-  void AppendGpuCommandLine(CommandLine* command_line) const;
+  void AppendGpuCommandLine(base::CommandLine* command_line) const;
 
   // Insert switches into plugin process command line:
   // kDisableCoreAnimationPlugins.
-  void AppendPluginCommandLine(CommandLine* command_line) const;
+  void AppendPluginCommandLine(base::CommandLine* command_line) const;
 
   // Update WebPreferences for renderer based on blacklisting decisions.
   void UpdateRendererWebPrefs(WebPreferences* prefs) const;
@@ -163,6 +168,10 @@ class CONTENT_EXPORT GpuDataManagerImpl
   void SetDisplayCount(unsigned int display_count);
   unsigned int GetDisplayCount() const;
 
+  // Set the active gpu.
+  // Return true if it's a different GPU from the previous active one.
+  bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id);
+
   // Called when GPU process initialization failed.
   void OnGpuProcessInitFailure();