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

Unified Diff: content/common/gpu/gpu_channel.h

Issue 10695181: [Android] Upstream all the IPC communications/handlings for stream texture (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove #pragma once Created 8 years, 5 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
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel.h
diff --git a/content/common/gpu/gpu_channel.h b/content/common/gpu/gpu_channel.h
index 0605cc0cb5110713e489ad6b038785cb57b7b7fd..e28ea4ebb781c19343127cd24aa3bc4d8ceb556f 100644
--- a/content/common/gpu/gpu_channel.h
+++ b/content/common/gpu/gpu_channel.h
@@ -23,6 +23,10 @@
#include "ui/gl/gl_share_group.h"
#include "ui/gl/gpu_preference.h"
+#if defined(OS_ANDROID)
+#include "content/common/android/surface_texture_peer.h"
+#endif
+
class GpuChannelManager;
struct GPUCreateCommandBufferConfig;
class GpuWatchdog;
@@ -36,6 +40,12 @@ namespace gpu {
struct RefCountedCounter;
}
+#if defined(OS_ANDROID)
+namespace content {
+class StreamTextureManagerAndroid;
+}
+#endif
+
// Encapsulates an IPC channel between the GPU process and one renderer
// process. On the renderer side there's a corresponding GpuChannelHost.
class GpuChannel : public IPC::Listener,
@@ -133,6 +143,19 @@ class GpuChannel : public IPC::Listener,
IPC::Message* reply_message);
void OnDestroyCommandBuffer(int32 route_id, IPC::Message* reply_message);
+#if defined(OS_ANDROID)
+ // Register the StreamTextureProxy class with the gpu process so that all
+ // the callbacks will be correctly forwarded to the renderer.
+ void OnRegisterStreamTextureProxy(
+ int32 stream_id, const gfx::Size& initial_size, int32* route_id);
+
+ // Create a java surface texture object and send it to the renderer process
+ // through binder thread.
+ void OnEstablishStreamTexture(
+ int32 stream_id, content::SurfaceTexturePeer::SurfaceTextureTarget type,
+ int32 primary_id, int32 secondary_id);
+#endif
+
// The lifetime of objects of this class is managed by a GpuChannelManager.
// The GpuChannelManager destroy all the GpuChannels that they own when they
// are destroyed. So a raw pointer is safe.
@@ -177,6 +200,10 @@ class GpuChannel : public IPC::Listener,
bool handle_messages_scheduled_;
bool processed_get_state_fast_;
+#if defined(OS_ANDROID)
+ scoped_ptr<content::StreamTextureManagerAndroid> stream_texture_manager_;
+#endif
+
base::WeakPtrFactory<GpuChannel> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(GpuChannel);
« no previous file with comments | « no previous file | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698