Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / browser / gpu / browser_gpu_channel_host_factory.h
index 89ff9ec..e94db42 100644 (file)
@@ -13,6 +13,7 @@
 #include "base/synchronization/waitable_event.h"
 #include "content/common/gpu/client/gpu_channel_host.h"
 #include "ipc/ipc_channel_handle.h"
+#include "ipc/message_filter.h"
 
 namespace content {
 
@@ -29,9 +30,10 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
   virtual scoped_refptr<base::MessageLoopProxy> GetIOLoopProxy() OVERRIDE;
   virtual scoped_ptr<base::SharedMemory> AllocateSharedMemory(
       size_t size) OVERRIDE;
-  virtual int32 CreateViewCommandBuffer(
+  virtual bool CreateViewCommandBuffer(
       int32 surface_id,
-      const GPUCreateCommandBufferConfig& init_params) OVERRIDE;
+      const GPUCreateCommandBufferConfig& init_params,
+      int32 route_id) OVERRIDE;
   virtual void CreateImage(
       gfx::PluginWindowHandle window,
       int32 image_id,
@@ -40,7 +42,8 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
   virtual scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer(
       size_t width,
       size_t height,
-      unsigned internalformat) OVERRIDE;
+      unsigned internalformat,
+      unsigned usage) OVERRIDE;
 
   // Specify a task runner and callback to be used for a set of messages. The
   // callback will be set up on the current GpuProcessHost, identified by
@@ -68,6 +71,7 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
     base::WaitableEvent event;
     int gpu_host_id;
     int32 route_id;
+    bool succeeded;
   };
 
   class EstablishRequest : public base::RefCountedThreadSafe<EstablishRequest> {
@@ -110,7 +114,7 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
       CreateRequest* request,
       int32 surface_id,
       const GPUCreateCommandBufferConfig& init_params);
-  static void CommandBufferCreatedOnIO(CreateRequest* request, int32 route_id);
+  static void CommandBufferCreatedOnIO(CreateRequest* request, bool succeeded);
   void CreateImageOnIO(
       gfx::PluginWindowHandle window,
       int32 image_id,
@@ -120,9 +124,8 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
   static void OnImageCreated(
       const CreateImageCallback& callback, const gfx::Size size);
   void DeleteImageOnIO(int32 image_id, int32 sync_point);
-  static void AddFilterOnIO(
-      int gpu_host_id,
-      scoped_refptr<IPC::ChannelProxy::MessageFilter> filter);
+  static void AddFilterOnIO(int gpu_host_id,
+                            scoped_refptr<IPC::MessageFilter> filter);
 
   const int gpu_client_id_;
   scoped_ptr<base::WaitableEvent> shutdown_event_;