Chromium Code Reviews| Index: ui/compositor/test/in_process_context_factory.cc |
| diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc |
| index 6d842554ae4d179ad5d8567fb45c6981ffe4f1ec..af58ac5201665503954b86a9e4d362a8b1c503be 100644 |
| --- a/ui/compositor/test/in_process_context_factory.cc |
| +++ b/ui/compositor/test/in_process_context_factory.cc |
| @@ -102,23 +102,6 @@ InProcessContextFactory::~InProcessContextFactory() { |
| void InProcessContextFactory::CreateOutputSurface( |
| base::WeakPtr<Compositor> compositor) { |
| - gpu::gles2::ContextCreationAttribHelper attribs; |
| - attribs.alpha_size = 8; |
| - attribs.blue_size = 8; |
| - attribs.green_size = 8; |
| - attribs.red_size = 8; |
| - attribs.depth_size = 0; |
| - attribs.stencil_size = 0; |
| - attribs.samples = 0; |
| - attribs.sample_buffers = 0; |
| - attribs.fail_if_major_perf_caveat = false; |
| - attribs.bind_generates_resource = false; |
| - |
| - scoped_refptr<InProcessContextProvider> context_provider = |
| - InProcessContextProvider::Create(attribs, &gpu_memory_buffer_manager_, |
| - &image_factory_, |
| - compositor->widget(), "UICompositor"); |
| - |
| // Try to reuse existing shared worker context provider. |
| bool shared_worker_context_provider_lost = false; |
| if (shared_worker_context_provider_) { |
| @@ -131,7 +114,7 @@ void InProcessContextFactory::CreateOutputSurface( |
| } |
| if (!shared_worker_context_provider_ || shared_worker_context_provider_lost) { |
| shared_worker_context_provider_ = InProcessContextProvider::CreateOffscreen( |
| - &gpu_memory_buffer_manager_, &image_factory_); |
| + &gpu_memory_buffer_manager_, &image_factory_, nullptr); |
| if (shared_worker_context_provider_ && |
| !shared_worker_context_provider_->BindToCurrentThread()) |
| shared_worker_context_provider_ = nullptr; |
| @@ -139,6 +122,23 @@ void InProcessContextFactory::CreateOutputSurface( |
| shared_worker_context_provider_->SetupLock(); |
| } |
| + gpu::gles2::ContextCreationAttribHelper attribs; |
| + attribs.alpha_size = 8; |
| + attribs.blue_size = 8; |
| + attribs.green_size = 8; |
| + attribs.red_size = 8; |
| + attribs.depth_size = 0; |
| + attribs.stencil_size = 0; |
| + attribs.samples = 0; |
| + attribs.sample_buffers = 0; |
| + attribs.fail_if_major_perf_caveat = false; |
| + attribs.bind_generates_resource = false; |
| + scoped_refptr<InProcessContextProvider> context_provider = |
| + InProcessContextProvider::Create( |
| + attribs, shared_worker_context_provider_.get(), |
| + &gpu_memory_buffer_manager_, &image_factory_, compositor->widget(), |
| + "UICompositor"); |
| + |
| scoped_ptr<cc::OutputSurface> real_output_surface; |
| if (use_test_surface_) { |
| @@ -190,7 +190,7 @@ InProcessContextFactory::SharedMainThreadContextProvider() { |
| return shared_main_thread_contexts_; |
| shared_main_thread_contexts_ = InProcessContextProvider::CreateOffscreen( |
| - &gpu_memory_buffer_manager_, &image_factory_); |
| + &gpu_memory_buffer_manager_, &image_factory_, nullptr); |
|
piman
2016/04/07 00:26:06
Do we not need this to share with the other contex
danakj
2016/04/07 18:58:59
Everything is mailboxed (in our tests?) I don't th
|
| if (shared_main_thread_contexts_.get() && |
| !shared_main_thread_contexts_->BindToCurrentThread()) |
| shared_main_thread_contexts_ = NULL; |