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

Unified Diff: content/common/gpu/image_transport_surface_mac.cc

Issue 9194005: gpu: reference target surfaces through a globally unique surface id. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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
Index: content/common/gpu/image_transport_surface_mac.cc
diff --git a/content/common/gpu/image_transport_surface_mac.cc b/content/common/gpu/image_transport_surface_mac.cc
index 47662db4839e8e7d3baff0f01d7e4099c29afb3e..eb1ca6e6353d3add5d9f5fda5f0401da0380eb2a 100644
--- a/content/common/gpu/image_transport_surface_mac.cc
+++ b/content/common/gpu/image_transport_surface_mac.cc
@@ -24,9 +24,7 @@ class IOSurfaceImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
public ImageTransportSurface {
public:
IOSurfaceImageTransportSurface(GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
// GLSurface implementation
@@ -79,9 +77,7 @@ class TransportDIBImageTransportSurface : public gfx::NoOpGLSurfaceCGL,
public ImageTransportSurface {
public:
TransportDIBImageTransportSurface(GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle);
// GLSurface implementation
@@ -143,23 +139,15 @@ void AddIntegerValue(CFMutableDictionaryRef dictionary,
IOSurfaceImageTransportSurface::IOSurfaceImageTransportSurface(
GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle)
- : gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
- fbo_id_(0),
- texture_id_(0),
- io_surface_id_(0),
- context_(NULL),
- made_current_(false) {
- helper_.reset(new ImageTransportHelper(this,
- manager,
- render_view_id,
- client_id,
- command_buffer_id,
- handle));
-
+ : gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
+ fbo_id_(0),
+ texture_id_(0),
+ io_surface_id_(0),
+ context_(NULL),
+ made_current_(false) {
+ helper_.reset(new ImageTransportHelper(this, manager, stub, handle));
}
IOSurfaceImageTransportSurface::~IOSurfaceImageTransportSurface() {
@@ -371,20 +359,13 @@ void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) {
TransportDIBImageTransportSurface::TransportDIBImageTransportSurface(
GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle)
: gfx::NoOpGLSurfaceCGL(gfx::Size(1, 1)),
fbo_id_(0),
render_buffer_id_(0),
made_current_(false) {
- helper_.reset(new ImageTransportHelper(this,
- manager,
- render_view_id,
- client_id,
- command_buffer_id,
- handle));
+ helper_.reset(new ImageTransportHelper(this, stub, handle));
}
@@ -582,9 +563,7 @@ void TransportDIBImageTransportSurface::OnResize(gfx::Size size) {
// static
scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
GpuChannelManager* manager,
- int32 render_view_id,
- int32 client_id,
- int32 command_buffer_id,
+ GpuCommandBufferStub* stub,
gfx::PluginWindowHandle handle) {
scoped_refptr<gfx::GLSurface> surface;
IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
@@ -593,17 +572,9 @@ scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateSurface(
case gfx::kGLImplementationDesktopGL:
case gfx::kGLImplementationAppleGL:
if (!io_surface_support) {
- surface = new TransportDIBImageTransportSurface(manager,
- render_view_id,
- client_id,
- command_buffer_id,
- handle);
+ surface = new TransportDIBImageTransportSurface(manager, stub, handle);
} else {
- surface = new IOSurfaceImageTransportSurface(manager,
- render_view_id,
- client_id,
- command_buffer_id,
- handle);
+ surface = new IOSurfaceImageTransportSurface(manager, stub, handle);
}
break;
default:

Powered by Google App Engine
This is Rietveld 408576698