| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/gpu/image_transport_surface.h" | 5 #include "content/common/gpu/image_transport_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_EXTENSIONS); | 263 eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_EXTENSIONS); |
| 264 if (strstr(extensions, "EGL_ANGLE_query_surface_pointer") && | 264 if (strstr(extensions, "EGL_ANGLE_query_surface_pointer") && |
| 265 strstr(extensions, "EGL_ANGLE_surface_d3d_texture_2d_share_handle")) { | 265 strstr(extensions, "EGL_ANGLE_surface_d3d_texture_2d_share_handle")) { |
| 266 return scoped_refptr<gfx::GLSurface>( | 266 return scoped_refptr<gfx::GLSurface>( |
| 267 new PbufferImageTransportSurface(manager, stub)); | 267 new PbufferImageTransportSurface(manager, stub)); |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 scoped_refptr<gfx::GLSurface> surface = | 271 scoped_refptr<gfx::GLSurface> surface = |
| 272 gfx::GLSurface::CreateViewGLSurface(false, handle.handle); | 272 gfx::GLSurface::CreateViewGLSurface(false, handle.handle); |
| 273 if (!surface.get()) | 273 if (!surface) |
| 274 return surface; | 274 return surface; |
| 275 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( | 275 return scoped_refptr<gfx::GLSurface>(new PassThroughImageTransportSurface( |
| 276 manager, stub, surface.get(), handle.is_transport())); | 276 manager, stub, surface.get(), handle.is_transport())); |
| 277 } | 277 } |
| 278 | 278 |
| 279 } // namespace content | 279 } // namespace content |
| OLD | NEW |