| Index: cc/test/test_context_provider.cc
|
| diff --git a/cc/test/test_context_provider.cc b/cc/test/test_context_provider.cc
|
| index ca7714d30cf9f4ca1b0eaaaeb7c117f7ddd180de..5e43ee3fcc5892c73b5afa24124d42c2479a57b5 100644
|
| --- a/cc/test/test_context_provider.cc
|
| +++ b/cc/test/test_context_provider.cc
|
| @@ -19,7 +19,20 @@ namespace cc {
|
|
|
| // static
|
| scoped_refptr<TestContextProvider> TestContextProvider::Create() {
|
| - return Create(TestWebGraphicsContext3D::Create().Pass());
|
| + return Create(TestWebGraphicsContext3D::Create());
|
| +}
|
| +
|
| +// static
|
| +scoped_refptr<TestContextProvider> TestContextProvider::CreateWorker() {
|
| + scoped_refptr<TestContextProvider> worker_context_provider =
|
| + Create(TestWebGraphicsContext3D::Create());
|
| + if (!worker_context_provider)
|
| + return nullptr;
|
| + // Worker contexts are bound to the thread they are created on.
|
| + if (!worker_context_provider->BindToCurrentThread())
|
| + return nullptr;
|
| + worker_context_provider->SetupLock();
|
| + return worker_context_provider;
|
| }
|
|
|
| // static
|
|
|