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

Unified Diff: components/mus/surfaces/surfaces_context_provider.cc

Issue 1821863002: Hook up ui::Compositor to Display's BeginFrameSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; refactor mus output surface Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698