| Index: cc/test/test_in_process_context_provider.cc
|
| diff --git a/cc/test/test_in_process_context_provider.cc b/cc/test/test_in_process_context_provider.cc
|
| index 9c024db4edf710450802ac7279417648ee2a6410..b0a6b50614e041769f1e29fbafc78fd7a3ca3cf9 100644
|
| --- a/cc/test/test_in_process_context_provider.cc
|
| +++ b/cc/test/test_in_process_context_provider.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "base/macros.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/threading/thread_task_runner_handle.h"
|
| #include "cc/output/context_cache_controller.h"
|
| #include "cc/resources/platform_color.h"
|
| #include "gpu/GLES2/gl2extchromium.h"
|
| @@ -30,7 +31,8 @@ namespace cc {
|
| std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
|
| TestGpuMemoryBufferManager* gpu_memory_buffer_manager,
|
| TestImageFactory* image_factory,
|
| - gpu::GLInProcessContext* shared_context) {
|
| + gpu::GLInProcessContext* shared_context,
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
|
| const bool is_offscreen = true;
|
| gpu::gles2::ContextCreationAttribHelper attribs;
|
| attribs.alpha_size = -1;
|
| @@ -45,24 +47,26 @@ std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext(
|
| base::WrapUnique(gpu::GLInProcessContext::Create(
|
| nullptr, nullptr, is_offscreen, gfx::kNullAcceleratedWidget,
|
| shared_context, attribs, gpu::SharedMemoryLimits(),
|
| - gpu_memory_buffer_manager, image_factory));
|
| + gpu_memory_buffer_manager, image_factory, std::move(task_runner)));
|
|
|
| DCHECK(context);
|
| return context;
|
| }
|
|
|
| std::unique_ptr<gpu::GLInProcessContext> CreateTestInProcessContext() {
|
| - return CreateTestInProcessContext(nullptr, nullptr, nullptr);
|
| + return CreateTestInProcessContext(nullptr, nullptr, nullptr,
|
| + base::ThreadTaskRunnerHandle::Get());
|
| }
|
|
|
| TestInProcessContextProvider::TestInProcessContextProvider(
|
| - TestInProcessContextProvider* shared_context)
|
| - : context_(CreateTestInProcessContext(
|
| - &gpu_memory_buffer_manager_,
|
| - &image_factory_,
|
| - (shared_context ? shared_context->context_.get() : nullptr))),
|
| - cache_controller_(
|
| - new ContextCacheController(context_->GetImplementation())) {}
|
| + TestInProcessContextProvider* shared_context) {
|
| + context_ = CreateTestInProcessContext(
|
| + &gpu_memory_buffer_manager_, &image_factory_,
|
| + (shared_context ? shared_context->context_.get() : nullptr),
|
| + base::ThreadTaskRunnerHandle::Get());
|
| + cache_controller_.reset(new ContextCacheController(
|
| + context_->GetImplementation(), base::ThreadTaskRunnerHandle::Get()));
|
| +}
|
|
|
| TestInProcessContextProvider::~TestInProcessContextProvider() {
|
| }
|
|
|