| 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/browser/renderer_host/image_transport_factory_android.h" | 5 #include "content/browser/renderer_host/image_transport_factory_android.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" | 8 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| 9 #include "content/common/gpu/gpu_process_launch_causes.h" | 9 #include "content/common/gpu/gpu_process_launch_causes.h" |
| 10 #include "content/common/gpu/client/gl_helper.h" | 10 #include "content/common/gpu/client/gl_helper.h" |
| 11 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 11 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 13 | 13 |
| 14 using content::BrowserGpuChannelHostFactory; | |
| 15 | |
| 16 namespace content { | 14 namespace content { |
| 17 | 15 |
| 18 // static | 16 // static |
| 19 ImageTransportFactoryAndroid* ImageTransportFactoryAndroid::GetInstance() { | 17 ImageTransportFactoryAndroid* ImageTransportFactoryAndroid::GetInstance() { |
| 20 return Singleton<ImageTransportFactoryAndroid>::get(); | 18 return Singleton<ImageTransportFactoryAndroid>::get(); |
| 21 } | 19 } |
| 22 | 20 |
| 23 ImageTransportFactoryAndroid::ImageTransportFactoryAndroid() { | 21 ImageTransportFactoryAndroid::ImageTransportFactoryAndroid() { |
| 24 WebKit::WebGraphicsContext3D::Attributes attrs; | 22 WebKit::WebGraphicsContext3D::Attributes attrs; |
| 25 attrs.shareResources = true; | 23 attrs.shareResources = true; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 } | 78 } |
| 81 | 79 |
| 82 GLHelper* ImageTransportFactoryAndroid::GetGLHelper() { | 80 GLHelper* ImageTransportFactoryAndroid::GetGLHelper() { |
| 83 if (!gl_helper_.get()) | 81 if (!gl_helper_.get()) |
| 84 gl_helper_.reset(new GLHelper(GetContext3D(), NULL)); | 82 gl_helper_.reset(new GLHelper(GetContext3D(), NULL)); |
| 85 | 83 |
| 86 return gl_helper_.get(); | 84 return gl_helper_.get(); |
| 87 } | 85 } |
| 88 | 86 |
| 89 } // namespace content | 87 } // namespace content |
| OLD | NEW |