| Index: components/mus/surfaces/surfaces_context_provider.cc
|
| diff --git a/components/mus/surfaces/surfaces_context_provider.cc b/components/mus/surfaces/surfaces_context_provider.cc
|
| index 434ad60d3a3c1a754c7e6cc5a65fa3358ae71a9b..5074bb11777edd90eb25e7eaf19bb6f763946568 100644
|
| --- a/components/mus/surfaces/surfaces_context_provider.cc
|
| +++ b/components/mus/surfaces/surfaces_context_provider.cc
|
| @@ -36,8 +36,12 @@ SurfacesContextProvider::SurfacesContextProvider(
|
| command_buffer_local_ = new CommandBufferLocal(this, widget_, state);
|
| }
|
|
|
| +// This routine needs to be safe to call more than once.
|
| // This is called when we have an accelerated widget.
|
| bool SurfacesContextProvider::BindToCurrentThread() {
|
| + if (implementation_)
|
| + return true;
|
| +
|
| // SurfacesContextProvider should always live on the same thread as the
|
| // Window Manager.
|
| DCHECK(CalledOnValidThread());
|
| @@ -66,6 +70,7 @@ bool SurfacesContextProvider::BindToCurrentThread() {
|
| }
|
|
|
| gpu::gles2::GLES2Interface* SurfacesContextProvider::ContextGL() {
|
| + DCHECK(implementation_);
|
| return implementation_.get();
|
| }
|
|
|
|
|