| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 void SurfacesContextProvider::UpdateVSyncParameters(int64_t timebase, | 107 void SurfacesContextProvider::UpdateVSyncParameters(int64_t timebase, |
| 108 int64_t interval) { | 108 int64_t interval) { |
| 109 if (delegate_) | 109 if (delegate_) |
| 110 delegate_->OnVSyncParametersUpdated(timebase, interval); | 110 delegate_->OnVSyncParametersUpdated(timebase, interval); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void SurfacesContextProvider::DidLoseContext() { | 113 void SurfacesContextProvider::DidLoseContext() { |
| 114 lost_context_callback_.Run(); | 114 lost_context_callback_.Run(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void SurfacesContextProvider::GpuCompletedSwapBuffers(gfx::SwapResult result) { |
| 118 if (!swap_buffers_completion_callback_.is_null()) { |
| 119 swap_buffers_completion_callback_.Run(result); |
| 120 } |
| 121 } |
| 122 |
| 123 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( |
| 124 gfx::GLSurface::SwapCompletionCallback callback) { |
| 125 swap_buffers_completion_callback_ = callback; |
| 126 } |
| 127 |
| 117 } // namespace mus | 128 } // namespace mus |
| OLD | NEW |