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

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

Issue 1881793002: SurfacelessSurfaces for Mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build 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 434ad60d3a3c1a754c7e6cc5a65fa3358ae71a9b..5074bb11777edd90eb25e7eaf19bb6f763946568 100644
--- a/components/mus/surfaces/surfaces_context_provider.cc
+++ b/components/mus/surfaces/surfaces_context_provider.cc
@@ -36,8 +36,12 @@ SurfacesContextProvider::SurfacesContextProvider(
command_buffer_local_ = new CommandBufferLocal(this, widget_, state);
}
+// This routine needs to be safe to call more than once.
// This is called when we have an accelerated widget.
bool SurfacesContextProvider::BindToCurrentThread() {
+ if (implementation_)
+ return true;
+
// SurfacesContextProvider should always live on the same thread as the
// Window Manager.
DCHECK(CalledOnValidThread());
@@ -66,6 +70,7 @@ bool SurfacesContextProvider::BindToCurrentThread() {
}
gpu::gles2::GLES2Interface* SurfacesContextProvider::ContextGL() {
+ DCHECK(implementation_);
return implementation_.get();
}
« no previous file with comments | « components/mus/surfaces/direct_output_surface_ozone.cc ('k') | components/mus/surfaces/top_level_display_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698