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

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

Issue 9194005: gpu: reference target surfaces through a globally unique surface id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix more tests Created 8 years, 11 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 | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface.h
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index 8801ba2cba5a1e334ef7abf7a738d38f70347aed..107a5309e3980d6c4db27f9c818221100abd6e8e 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
#include "ui/gfx/gl/gl_surface.h"
@@ -20,6 +21,7 @@
#include "ui/gfx/surface/transport_dib.h"
class GpuChannelManager;
+class GpuCommandBufferStub;
struct GpuHostMsg_AcceleratedSurfaceNew_Params;
struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
@@ -66,9 +68,7 @@ class ImageTransportSurface {
// Creates the appropriate surface depending on the GL implementation.
static scoped_refptr<gfx::GLSurface>
CreateSurface(GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
private:
DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface);
@@ -79,9 +79,7 @@ class ImageTransportHelper : public IPC::Channel::Listener {
// Takes weak pointers to objects that outlive the helper.
ImageTransportHelper(ImageTransportSurface* surface,
GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
virtual ~ImageTransportHelper();
@@ -116,7 +114,7 @@ class ImageTransportHelper : public IPC::Channel::Listener {
gpu::gles2::GLES2Decoder* Decoder();
// IPC::Message handlers.
- void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle);
+ void OnNewSurfaceACK(uint64 surface_handle, TransportDIB::Handle shm_handle);
void OnBuffersSwappedACK();
void OnPostSubBufferACK();
void OnResizeViewACK();
@@ -131,9 +129,7 @@ class ImageTransportHelper : public IPC::Channel::Listener {
ImageTransportSurface* surface_;
GpuChannelManager* manager_;
- int32 render_view_id_;
- int32 client_id_;
- int32 command_buffer_id_;
+ base::WeakPtr<GpuCommandBufferStub> stub_;
int32 route_id_;
gfx::PluginWindowHandle handle_;
@@ -147,9 +143,7 @@ class PassThroughImageTransportSurface
public ImageTransportSurface {
public:
PassThroughImageTransportSurface(GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::GLSurface* surface);
virtual ~PassThroughImageTransportSurface();
@@ -161,7 +155,7 @@ class PassThroughImageTransportSurface
// ImageTransportSurface implementation.
virtual void OnNewSurfaceACK(
- uint64 surface_id, TransportDIB::Handle surface_handle) OVERRIDE;
+ uint64 surface_handle, TransportDIB::Handle shm_handle) OVERRIDE;
virtual void OnBuffersSwappedACK() OVERRIDE;
virtual void OnPostSubBufferACK() OVERRIDE;
virtual void OnResizeViewACK() OVERRIDE;
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698