| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/mus/surfaces/surfaces_context_provider.h" | 5 #include "components/mus/surfaces/surfaces_context_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 void SurfacesContextProvider::InvalidateGrContext(uint32_t state) {} | 87 void SurfacesContextProvider::InvalidateGrContext(uint32_t state) {} |
| 88 | 88 |
| 89 gpu::Capabilities SurfacesContextProvider::ContextCapabilities() { | 89 gpu::Capabilities SurfacesContextProvider::ContextCapabilities() { |
| 90 return capabilities_; | 90 return capabilities_; |
| 91 } | 91 } |
| 92 | 92 |
| 93 void SurfacesContextProvider::SetupLock() {} | 93 void SurfacesContextProvider::SetupLock() {} |
| 94 | 94 |
| 95 base::Lock* SurfacesContextProvider::GetLock() { | 95 base::Lock* SurfacesContextProvider::GetLock() { |
| 96 return &context_lock_; | 96 // This context provider is not used on multiple threads. |
| 97 NOTREACHED(); |
| 98 return nullptr; |
| 97 } | 99 } |
| 98 | 100 |
| 99 void SurfacesContextProvider::SetLostContextCallback( | 101 void SurfacesContextProvider::SetLostContextCallback( |
| 100 const LostContextCallback& lost_context_callback) { | 102 const LostContextCallback& lost_context_callback) { |
| 101 implementation_->SetLostContextCallback(lost_context_callback); | 103 implementation_->SetLostContextCallback(lost_context_callback); |
| 102 } | 104 } |
| 103 | 105 |
| 104 SurfacesContextProvider::~SurfacesContextProvider() { | 106 SurfacesContextProvider::~SurfacesContextProvider() { |
| 105 implementation_->Flush(); | 107 implementation_->Flush(); |
| 106 implementation_.reset(); | 108 implementation_.reset(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 121 swap_buffers_completion_callback_.Run(result); | 123 swap_buffers_completion_callback_.Run(result); |
| 122 } | 124 } |
| 123 } | 125 } |
| 124 | 126 |
| 125 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( | 127 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( |
| 126 gfx::GLSurface::SwapCompletionCallback callback) { | 128 gfx::GLSurface::SwapCompletionCallback callback) { |
| 127 swap_buffers_completion_callback_ = callback; | 129 swap_buffers_completion_callback_ = callback; |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace mus | 132 } // namespace mus |
| OLD | NEW |