| Index: content/browser/aura/gpu_process_transport_factory.cc
|
| diff --git a/content/browser/aura/gpu_process_transport_factory.cc b/content/browser/aura/gpu_process_transport_factory.cc
|
| index 6ac45f7665d22277ed3448c62c0fc14a1b32f9dc..23834855c799e23d9a76494a9faad35efd1fd6d2 100644
|
| --- a/content/browser/aura/gpu_process_transport_factory.cc
|
| +++ b/content/browser/aura/gpu_process_transport_factory.cc
|
| @@ -319,6 +319,8 @@ void GpuProcessTransportFactory::RemoveCompositor(ui::Compositor* compositor) {
|
| gl_helper_.reset();
|
| }
|
|
|
| +bool GpuProcessTransportFactory::UsesTestContexts() { return false; }
|
| +
|
| ui::ContextFactory* GpuProcessTransportFactory::AsContextFactory() {
|
| return this;
|
| }
|
| @@ -405,14 +407,15 @@ GpuProcessTransportFactory::OffscreenContextProviderForMainThread() {
|
| base::Bind(&GpuProcessTransportFactory::
|
| CreateOffscreenCommandBufferContext,
|
| base::Unretained(this)));
|
| - shared_contexts_main_thread_->SetLostContextCallback(base::Bind(
|
| - &GpuProcessTransportFactory::
|
| - OnLostMainThreadSharedContextInsideCallback,
|
| - callback_factory_.GetWeakPtr()));
|
| -
|
| - if (shared_contexts_main_thread_.get() &&
|
| - !shared_contexts_main_thread_->BindToCurrentThread())
|
| - shared_contexts_main_thread_ = NULL;
|
| + if (shared_contexts_main_thread_) {
|
| + shared_contexts_main_thread_->SetLostContextCallback(base::Bind(
|
| + &GpuProcessTransportFactory::
|
| + OnLostMainThreadSharedContextInsideCallback,
|
| + callback_factory_.GetWeakPtr()));
|
| +
|
| + if (!shared_contexts_main_thread_->BindToCurrentThread())
|
| + shared_contexts_main_thread_ = NULL;
|
| + }
|
| }
|
| return shared_contexts_main_thread_;
|
| }
|
|
|