Chromium Code Reviews| 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..4fc65c6c557d3e3998fe96e42f1c6073b159a339 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_) { |
|
Fady Samuel
2016/04/12 02:54:41
nit: no need for {
rjkroege
2016/04/12 19:27:54
Given that's Chrome style, why doesn't pre-sub tel
|
| + 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(); |
| } |