| 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/command_line.h" |
| 7 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/common/gpu/gpu_channel.h" |
| 10 #include "content/common/gpu/gpu_channel_manager.h" |
| 11 #include "content/common/gpu/gpu_command_buffer_stub.h" |
| 8 #include "content/common/gpu/gpu_surface_lookup.h" | 12 #include "content/common/gpu/gpu_surface_lookup.h" |
| 9 #include "content/common/gpu/pass_through_image_transport_surface.h" | 13 #include "content/common/gpu/pass_through_image_transport_surface.h" |
| 14 #include "content/public/common/content_switches.h" |
| 10 #include "ui/gl/gl_surface_egl.h" | 15 #include "ui/gl/gl_surface_egl.h" |
| 11 | 16 |
| 12 namespace content { | 17 namespace content { |
| 13 | 18 |
| 14 // static | 19 // static |
| 15 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( | 20 scoped_refptr<gfx::GLSurface> ImageTransportSurface::CreateNativeSurface( |
| 16 GpuChannelManager* manager, | 21 GpuChannelManager* manager, |
| 17 GpuCommandBufferStub* stub, | 22 GpuCommandBufferStub* stub, |
| 18 const gfx::GLSurfaceHandle& handle, | 23 const gfx::GLSurfaceHandle& handle, |
| 19 gfx::GLSurface::Format format) { | 24 gfx::GLSurface::Format format) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 30 bool initialize_success = surface->Initialize(format); | 35 bool initialize_success = surface->Initialize(format); |
| 31 ANativeWindow_release(window); | 36 ANativeWindow_release(window); |
| 32 if (!initialize_success) | 37 if (!initialize_success) |
| 33 return scoped_refptr<gfx::GLSurface>(); | 38 return scoped_refptr<gfx::GLSurface>(); |
| 34 | 39 |
| 35 return scoped_refptr<gfx::GLSurface>( | 40 return scoped_refptr<gfx::GLSurface>( |
| 36 new PassThroughImageTransportSurface(manager, stub, surface.get())); | 41 new PassThroughImageTransportSurface(manager, stub, surface.get())); |
| 37 } | 42 } |
| 38 | 43 |
| 39 } // namespace content | 44 } // namespace content |
| OLD | NEW |