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 6995806b6f207026ccd61c8b3ca944150e68e4bb..58ac6668e2b422628c2e1660c3f081218930c144 100644 |
--- a/components/mus/surfaces/surfaces_context_provider.cc |
+++ b/components/mus/surfaces/surfaces_context_provider.cc |
@@ -28,14 +28,19 @@ const size_t kDefaultMaxTransferBufferSize = 16 * 1024 * 1024; |
} |
SurfacesContextProvider::SurfacesContextProvider( |
- SurfacesContextProviderDelegate* delegate, |
gfx::AcceleratedWidget widget, |
const scoped_refptr<GpuState>& state) |
- : delegate_(delegate), widget_(widget), command_buffer_local_(nullptr) { |
+ : delegate_(nullptr), widget_(widget), command_buffer_local_(nullptr) { |
capabilities_.gpu.image = true; |
command_buffer_local_ = new CommandBufferLocal(this, widget_, state); |
} |
+void SurfacesContextProvider::SetDelegate( |
+ SurfacesContextProviderDelegate* delegate) { |
+ DCHECK(!delegate_); |
+ delegate_ = delegate; |
+} |
+ |
// This is called when we have an accelerated widget. |
bool SurfacesContextProvider::BindToCurrentThread() { |
// SurfacesContextProvider should always live on the same thread as the |