Index: blimp/client/support/compositor/blimp_context_provider.cc |
diff --git a/blimp/client/support/compositor/blimp_context_provider.cc b/blimp/client/support/compositor/blimp_context_provider.cc |
index 83874cbc18c56255429ecfc2a072bfc2dc5ebfff..e1cc1cf36df860583e0433014a24117207263b18 100644 |
--- a/blimp/client/support/compositor/blimp_context_provider.cc |
+++ b/blimp/client/support/compositor/blimp_context_provider.cc |
@@ -7,6 +7,7 @@ |
#include "base/bind.h" |
#include "base/callback_helpers.h" |
#include "base/lazy_instance.h" |
+#include "base/threading/thread_task_runner_handle.h" |
#include "cc/output/context_cache_controller.h" |
#include "gpu/command_buffer/client/gl_in_process_context.h" |
#include "gpu/command_buffer/client/gles2_implementation.h" |
@@ -42,16 +43,16 @@ BlimpContextProvider::BlimpContextProvider( |
attribs_for_gles2.context_type = gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
attribs_for_gles2.lose_context_when_out_of_memory = true; |
+ auto task_runner = base::ThreadTaskRunnerHandle::Get(); |
Wez
2016/09/06 23:29:02
It's non-obvious what the type of |task_runner| wi
ericrk
2016/09/13 17:04:26
I guess factoring this out wasn't getting us a hug
|
context_.reset(gpu::GLInProcessContext::Create( |
nullptr /* service */, nullptr /* surface */, |
widget == gfx::kNullAcceleratedWidget /* is_offscreen */, widget, |
nullptr /* share_context */, attribs_for_gles2, gpu::SharedMemoryLimits(), |
- gpu_memory_buffer_manager, nullptr /* memory_limits */)); |
+ gpu_memory_buffer_manager, nullptr /* memory_limits */, task_runner)); |
context_->GetImplementation()->SetLostContextCallback( |
base::Bind(&BlimpContextProvider::OnLostContext, base::Unretained(this))); |
- |
- cache_controller_.reset( |
- new cc::ContextCacheController(context_->GetImplementation())); |
+ cache_controller_.reset(new cc::ContextCacheController( |
+ context_->GetImplementation(), std::move(task_runner))); |
Wez
2016/09/06 23:29:02
It looks strange to have one object passed |task_r
danakj
2016/09/06 23:42:38
I have to disagree here, that's entirely the point
ericrk
2016/09/13 17:04:26
I tend to agree w/ Dana, although I do see that th
|
} |
BlimpContextProvider::~BlimpContextProvider() { |