Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: components/mus/surfaces/surfaces_context_provider.cc

Issue 1854953002: Plumb GpuSwapBuffers completion from Mus GPU thread to WS thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review nits Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698