Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / common / gpu / gpu_channel.h
index 760327e..3903135 100644 (file)
@@ -38,11 +38,14 @@ class ImageManager;
 }
 }
 
+namespace IPC {
+class MessageFilter;
+}
+
 namespace content {
 class DevToolsGpuAgent;
 class GpuChannelManager;
 class GpuChannelMessageFilter;
-class GpuVideoEncodeAccelerator;
 class GpuWatchdog;
 
 // Encapsulates an IPC channel between the GPU process and one renderer
@@ -76,6 +79,8 @@ class GpuChannel : public IPC::Listener,
 
   base::ProcessId renderer_pid() const { return channel_->peer_pid(); }
 
+  int client_id() const { return client_id_; }
+
   scoped_refptr<base::MessageLoopProxy> io_message_loop() const {
     return io_message_loop_;
   }
@@ -103,11 +108,11 @@ class GpuChannel : public IPC::Listener,
   // other channels.
   void StubSchedulingChanged(bool scheduled);
 
-  void CreateViewCommandBuffer(
+  bool CreateViewCommandBuffer(
       const gfx::GLSurfaceHandle& window,
       int32 surface_id,
       const GPUCreateCommandBufferConfig& init_params,
-      int32* route_id);
+      int32 route_id);
 
   void CreateImage(
       gfx::PluginWindowHandle window,
@@ -125,11 +130,11 @@ class GpuChannel : public IPC::Listener,
   // Destroy channel and all contained contexts.
   void DestroySoon();
 
-  // Generate a route ID guaranteed to be unique for this channel.
-  int32 GenerateRouteID();
+  // Called to add a listener for a particular message routing ID.
+  // Returns true if succeeded.
+  bool AddRoute(int32 route_id, IPC::Listener* listener);
 
-  // Called to add/remove a listener for a particular message routing ID.
-  void AddRoute(int32 route_id, IPC::Listener* listener);
+  // Called to remove a listener for a particular message routing ID.
   void RemoveRoute(int32 route_id);
 
   gpu::PreemptionFlag* GetPreemptionFlag();
@@ -144,8 +149,8 @@ class GpuChannel : public IPC::Listener,
 
   void CacheShader(const std::string& key, const std::string& shader);
 
-  void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
-  void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter);
+  void AddFilter(IPC::MessageFilter* filter);
+  void RemoveFilter(IPC::MessageFilter* filter);
 
   uint64 GetMemoryUsage();
 
@@ -166,11 +171,10 @@ class GpuChannel : public IPC::Listener,
   void OnCreateOffscreenCommandBuffer(
       const gfx::Size& size,
       const GPUCreateCommandBufferConfig& init_params,
-      int32* route_id);
+      int32 route_id,
+      bool* succeeded);
   void OnDestroyCommandBuffer(int32 route_id);
-  void OnCreateVideoEncoder(int32* route_id);
-  void OnDestroyVideoEncoder(int32 route_id);
-  void OnDevToolsStartEventsRecording(int32* route_id);
+  void OnDevToolsStartEventsRecording(int32 route_id, bool* succeeded);
   void OnDevToolsStopEventsRecording();
 
   // Decrement the count of unhandled IPC messages and defer preemption.
@@ -214,15 +218,11 @@ class GpuChannel : public IPC::Listener,
   typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;
   StubMap stubs_;
 
-  typedef IDMap<GpuVideoEncodeAccelerator, IDMapOwnPointer> EncoderMap;
-  EncoderMap video_encoders_;
-
   bool log_messages_;  // True if we should log sent and received messages.
   gpu::gles2::DisallowedFeatures disallowed_features_;
   GpuWatchdog* watchdog_;
   bool software_;
   bool handle_messages_scheduled_;
-  bool processed_get_state_fast_;
   IPC::Message* currently_processing_message_;
 
   base::WeakPtrFactory<GpuChannel> weak_factory_;