| 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/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" |
| 11 | 13 |
| 12 using content::BrowserGpuChannelHostFactory; | 14 using content::BrowserGpuChannelHostFactory; |
| 13 | 15 |
| 14 namespace content { | 16 namespace content { |
| 15 | 17 |
| 16 // static | 18 // static |
| 17 ImageTransportFactoryAndroid* ImageTransportFactoryAndroid::GetInstance() { | 19 ImageTransportFactoryAndroid* ImageTransportFactoryAndroid::GetInstance() { |
| 18 return Singleton<ImageTransportFactoryAndroid>::get(); | 20 return Singleton<ImageTransportFactoryAndroid>::get(); |
| 19 } | 21 } |
| 20 | 22 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 68 |
| 67 context_->deleteTexture(handle.parent_texture_id[0]); | 69 context_->deleteTexture(handle.parent_texture_id[0]); |
| 68 context_->deleteTexture(handle.parent_texture_id[1]); | 70 context_->deleteTexture(handle.parent_texture_id[1]); |
| 69 context_->finish(); | 71 context_->finish(); |
| 70 } | 72 } |
| 71 | 73 |
| 72 uint32_t ImageTransportFactoryAndroid::InsertSyncPoint() { | 74 uint32_t ImageTransportFactoryAndroid::InsertSyncPoint() { |
| 73 return context_->insertSyncPoint(); | 75 return context_->insertSyncPoint(); |
| 74 } | 76 } |
| 75 | 77 |
| 76 WebGraphicsContext3DCommandBufferImpl* | 78 WebKit::WebGraphicsContext3D* ImageTransportFactoryAndroid::GetContext3D() { |
| 77 ImageTransportFactoryAndroid::GetContext3D() { | |
| 78 return context_.get(); | 79 return context_.get(); |
| 79 } | 80 } |
| 80 | 81 |
| 82 GLHelper* ImageTransportFactoryAndroid::GetGLHelper() { |
| 83 if (!gl_helper_.get()) |
| 84 gl_helper_.reset(new GLHelper(GetContext3D(), NULL)); |
| 85 |
| 86 return gl_helper_.get(); |
| 87 } |
| 88 |
| 81 } // namespace content | 89 } // namespace content |
| OLD | NEW |