| 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 return nullptr; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void SurfacesContextProvider::SetLostContextCallback( | 99 void SurfacesContextProvider::SetLostContextCallback( |
| 100 const LostContextCallback& lost_context_callback) { | 100 const LostContextCallback& lost_context_callback) { |
| 101 implementation_->SetLostContextCallback(lost_context_callback); | 101 implementation_->SetLostContextCallback(lost_context_callback); |
| 102 } | 102 } |
| 103 | 103 |
| 104 SurfacesContextProvider::~SurfacesContextProvider() { | 104 SurfacesContextProvider::~SurfacesContextProvider() { |
| 105 implementation_->Flush(); | 105 implementation_->Flush(); |
| 106 implementation_.reset(); | 106 implementation_.reset(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 121 swap_buffers_completion_callback_.Run(result); | 121 swap_buffers_completion_callback_.Run(result); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( | 125 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( |
| 126 gfx::GLSurface::SwapCompletionCallback callback) { | 126 gfx::GLSurface::SwapCompletionCallback callback) { |
| 127 swap_buffers_completion_callback_ = callback; | 127 swap_buffers_completion_callback_ = callback; |
| 128 } | 128 } |
| 129 | 129 |
| 130 } // namespace mus | 130 } // namespace mus |
| OLD | NEW |