Chromium Code Reviews| Index: content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
| diff --git a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
| index 3f0e41fd4bc85aef40a0ea3acbc9a5157b9c6254..84d0022b43fb77689e022a8e99a6be6590b20704 100644 |
| --- a/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
| +++ b/content/browser/android/in_process/synchronous_compositor_factory_impl.cc |
| @@ -67,17 +67,6 @@ scoped_ptr<gpu::GLInProcessContext> CreateContextHolder( |
| } |
| scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> WrapContext( |
| - scoped_ptr<gpu::GLInProcessContext> context) { |
| - if (!context.get()) |
| - return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>(); |
| - |
| - return scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl>( |
| - WebGraphicsContext3DInProcessCommandBufferImpl::WrapContext( |
| - context.Pass(), GetDefaultAttribs())); |
| -} |
| - |
| -scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> |
| -WrapContextWithAttributes( |
| scoped_ptr<gpu::GLInProcessContext> context, |
| const blink::WebGraphicsContext3D::Attributes& attributes) { |
| if (!context.get()) |
| @@ -96,9 +85,8 @@ class SynchronousCompositorFactoryImpl::VideoContextProvider |
| VideoContextProvider( |
| scoped_ptr<gpu::GLInProcessContext> gl_in_process_context) |
| : gl_in_process_context_(gl_in_process_context.get()) { |
| - |
| context_provider_ = webkit::gpu::ContextProviderInProcess::Create( |
| - WrapContext(gl_in_process_context.Pass()), |
| + WrapContext(gl_in_process_context.Pass(), GetDefaultAttribs()), |
| "Video-Offscreen-main-thread"); |
| context_provider_->BindToCurrentThread(); |
| } |
| @@ -185,7 +173,7 @@ SynchronousCompositorFactoryImpl::CreateOffscreenContextProvider( |
| scoped_ptr<gpu::GLInProcessContext> context = CreateContextHolder( |
| attributes, nullptr, gpu::GLInProcessContextSharedMemoryLimits(), true); |
| return webkit::gpu::ContextProviderInProcess::Create( |
| - WrapContext(context.Pass()), debug_name); |
| + WrapContext(context.Pass(), GetDefaultAttribs()), debug_name); |
|
boliu
2015/04/07 19:18:39
use |attributes|
tfarina
2015/04/07 20:04:04
Done. But note that before it was using GetDefault
boliu
2015/04/07 20:05:58
Yeah shouldn't hurt. Probably would have been a bu
|
| } |
| scoped_refptr<cc::ContextProvider> |
| @@ -198,7 +186,8 @@ SynchronousCompositorFactoryImpl::CreateContextProviderForCompositor() { |
| mem_limits.mapped_memory_reclaim_limit = 6 * 1024 * 1024; |
| return webkit::gpu::ContextProviderInProcess::Create( |
| WrapContext( |
| - CreateContextHolder(GetDefaultAttribs(), nullptr, mem_limits, true)), |
| + CreateContextHolder(GetDefaultAttribs(), nullptr, mem_limits, true), |
| + GetDefaultAttribs()), |
|
boliu
2015/04/07 19:18:39
Only call GetDefaultAttribs() once, save it in a l
tfarina
2015/04/07 20:04:04
Done.
|
| "Child-Compositor"); |
| } |
| @@ -216,11 +205,10 @@ SynchronousCompositorFactoryImpl::CreateStreamTextureFactory(int frame_id) { |
| WebGraphicsContext3DInProcessCommandBufferImpl* |
| SynchronousCompositorFactoryImpl::CreateOffscreenGraphicsContext3D( |
| const blink::WebGraphicsContext3D::Attributes& attributes) { |
| - return WrapContextWithAttributes( |
| - CreateContextHolder(attributes, nullptr, |
| - gpu::GLInProcessContextSharedMemoryLimits(), |
| - true), |
| - attributes).release(); |
| + return WrapContext(CreateContextHolder( |
| + attributes, nullptr, |
| + gpu::GLInProcessContextSharedMemoryLimits(), true), |
| + attributes).release(); |
| } |
| void SynchronousCompositorFactoryImpl::CompositorInitializedHardwareDraw() { |