| Index: content/common/gpu/image_transport_surface_linux.cc
|
| ===================================================================
|
| --- content/common/gpu/image_transport_surface_linux.cc (revision 106500)
|
| +++ content/common/gpu/image_transport_surface_linux.cc (working copy)
|
| @@ -76,6 +76,7 @@
|
| virtual void OnNewSurfaceACK(
|
| uint64 surface_id, TransportDIB::Handle surface_handle) OVERRIDE;
|
| virtual void OnBuffersSwappedACK() OVERRIDE;
|
| + virtual void OnResizeViewACK() OVERRIDE;
|
| virtual void OnResize(gfx::Size size) OVERRIDE;
|
|
|
| private:
|
| @@ -117,6 +118,7 @@
|
| virtual void OnNewSurfaceACK(
|
| uint64 surface_id, TransportDIB::Handle surface_handle) OVERRIDE;
|
| virtual void OnBuffersSwappedACK() OVERRIDE;
|
| + virtual void OnResizeViewACK() OVERRIDE;
|
| virtual void OnResize(gfx::Size size) OVERRIDE;
|
|
|
| private:
|
| @@ -162,6 +164,7 @@
|
| virtual void OnNewSurfaceACK(
|
| uint64 surface_id, TransportDIB::Handle surface_handle) OVERRIDE;
|
| virtual void OnBuffersSwappedACK() OVERRIDE;
|
| + virtual void OnResizeViewACK() OVERRIDE;
|
| virtual void OnResize(gfx::Size size) OVERRIDE;
|
|
|
| private:
|
| @@ -369,6 +372,10 @@
|
| helper_->SetScheduled(true);
|
| }
|
|
|
| +
|
| +void EGLImageTransportSurface::OnResizeViewACK() {
|
| +}
|
| +
|
| GLXImageTransportSurface::GLXImageTransportSurface(
|
| GpuChannelManager* manager,
|
| int32 render_view_id,
|
| @@ -393,7 +400,7 @@
|
|
|
| bool GLXImageTransportSurface::Initialize() {
|
| // Create a dummy window to host the real window.
|
| - Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
|
| + Display* dpy = static_cast<Display*>(GetDisplay());
|
| XSetWindowAttributes swa;
|
| swa.event_mask = StructureNotifyMask;
|
| swa.override_redirect = True;
|
| @@ -439,7 +446,7 @@
|
| ReleaseSurface();
|
|
|
| if (window_) {
|
| - Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
|
| + Display* dpy = static_cast<Display*>(GetDisplay());
|
| XDestroyWindow(dpy, window_);
|
| XDestroyWindow(dpy, dummy_parent_);
|
| }
|
| @@ -462,7 +469,7 @@
|
| bound_ = false;
|
| }
|
|
|
| - Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
|
| + Display* dpy = static_cast<Display*>(GetDisplay());
|
| XResizeWindow(dpy, window_, size_.width(), size_.height());
|
| XFlush(dpy);
|
|
|
| @@ -496,7 +503,7 @@
|
| return true;
|
|
|
| // Check for driver support.
|
| - Display* dpy = gfx::GLSurfaceGLX::GetDisplay();
|
| + Display* dpy = static_cast<Display*>(GetDisplay());
|
| int event_base, error_base;
|
| if (XCompositeQueryExtension(dpy, &event_base, &error_base)) {
|
| int major = 0, minor = 2;
|
| @@ -524,6 +531,9 @@
|
| helper_->SetScheduled(true);
|
| }
|
|
|
| +void GLXImageTransportSurface::OnResizeViewACK() {
|
| +}
|
| +
|
| OSMesaImageTransportSurface::OSMesaImageTransportSurface(
|
| GpuChannelManager* manager,
|
| int32 render_view_id,
|
| @@ -602,6 +612,9 @@
|
| helper_->SetScheduled(true);
|
| }
|
|
|
| +void OSMesaImageTransportSurface::OnResizeViewACK() {
|
| +}
|
| +
|
| bool OSMesaImageTransportSurface::SwapBuffers() {
|
| DCHECK_NE(shared_mem_.get(), static_cast<void*>(NULL));
|
|
|
| @@ -633,8 +646,9 @@
|
| int32 render_view_id,
|
| int32 renderer_id,
|
| int32 command_buffer_id,
|
| - gfx::PluginWindowHandle /* handle */) {
|
| + gfx::PluginWindowHandle handle) {
|
| scoped_refptr<gfx::GLSurface> surface;
|
| +#if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
|
| switch (gfx::GetGLImplementation()) {
|
| case gfx::kGLImplementationDesktopGL:
|
| surface = new GLXImageTransportSurface(manager,
|
| @@ -658,6 +672,17 @@
|
| NOTREACHED();
|
| return NULL;
|
| }
|
| +#else
|
| + surface = gfx::GLSurface::CreateViewGLSurface(false, handle);
|
| + if (!surface.get())
|
| + return NULL;
|
| +
|
| + surface = new PassThroughImageTransportSurface(manager,
|
| + render_view_id,
|
| + renderer_id,
|
| + command_buffer_id,
|
| + surface.get());
|
| +#endif
|
| if (surface->Initialize())
|
| return surface;
|
| else
|
|
|