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

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: Fix Display member destruction order 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 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 3079a838a028fa3b421b855756879f790ac3ea3f..44e45798cb64afb69c1db10d62213a9ea701ef9c 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 routine needs to be safe to call more than once.
// This is called when we have an accelerated widget.
bool SurfacesContextProvider::BindToCurrentThread() {
« no previous file with comments | « components/mus/surfaces/surfaces_context_provider.h ('k') | components/mus/surfaces/top_level_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698