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

Unified Diff: blimp/client/support/compositor/compositor_dependencies_impl.cc

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: Created 4 years, 4 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: blimp/client/support/compositor/compositor_dependencies_impl.cc
diff --git a/blimp/client/support/compositor/compositor_dependencies_impl.cc b/blimp/client/support/compositor/compositor_dependencies_impl.cc
index 56ebf21a719a0a50be423d0fe3a3b8655f7744ee..a62b9c39a937219675281f34bbae0d06c0c2c9b0 100644
--- a/blimp/client/support/compositor/compositor_dependencies_impl.cc
+++ b/blimp/client/support/compositor/compositor_dependencies_impl.cc
@@ -91,15 +91,20 @@ cc::SurfaceManager* CompositorDependenciesImpl::GetSurfaceManager() {
return surface_manager_.get();
}
-uint32_t CompositorDependenciesImpl::AllocateSurfaceId() {
+uint32_t CompositorDependenciesImpl::AllocateSurfaceClientId() {
return ++next_surface_id_;
}
-void CompositorDependenciesImpl::GetContextProvider(
+void CompositorDependenciesImpl::GetContextProviders(
const CompositorDependencies::ContextProviderCallback& callback) {
- scoped_refptr<cc::ContextProvider> provider = BlimpContextProvider::Create(
- gfx::kNullAcceleratedWidget, gpu_memory_buffer_manager_.get());
- callback.Run(provider);
+ scoped_refptr<cc::ContextProvider> compositor_context =
+ BlimpContextProvider::Create(gfx::kNullAcceleratedWidget,
+ gpu_memory_buffer_manager_.get());
+
+ // TODO(khushalsagar): Make a worker context and bind to the current thread.
+ ContextProviders context_providers;
+ context_providers.compositor_context_provider = std::move(compositor_context);
+ callback.Run(context_providers);
}
} // namespace client

Powered by Google App Engine
This is Rietveld 408576698