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

Unified Diff: ash/mus/stub_context_factory.cc

Issue 1808313002: Register surface namespace in BlimpUiContextFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move SurfaceManager to ContextFactory 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: ash/mus/stub_context_factory.cc
diff --git a/ash/mus/stub_context_factory.cc b/ash/mus/stub_context_factory.cc
index 199842206b7eff1528a802aed1cfc05319c18265..f8b8a4af8ba17c26bedec9997c283411c4dcbf0c 100644
--- a/ash/mus/stub_context_factory.cc
+++ b/ash/mus/stub_context_factory.cc
@@ -27,7 +27,8 @@ class StubTaskGraphRunner : public cc::SingleThreadTaskGraphRunner {
StubContextFactory::StubContextFactory()
: next_surface_id_namespace_(1u),
- task_graph_runner_(new StubTaskGraphRunner) {}
+ task_graph_runner_(new StubTaskGraphRunner),
+ surface_manager_(new cc::SurfaceManager) {}
StubContextFactory::~StubContextFactory() {}
@@ -70,10 +71,16 @@ cc::TaskGraphRunner* StubContextFactory::GetTaskGraphRunner() {
return task_graph_runner_.get();
}
+cc::SurfaceManager* StubContextFactory::GetSurfaceManager() {
+ return surface_manager_.get();
+}
+
scoped_ptr<cc::SurfaceIdAllocator>
StubContextFactory::CreateSurfaceIdAllocator() {
- return make_scoped_ptr(
- new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
+ scoped_ptr<cc::SurfaceIdAllocator> allocator =
+ make_scoped_ptr(new cc::SurfaceIdAllocator(next_surface_id_namespace_++));
+ allocator->RegisterSurfaceIdNamespace(surface_manager_.get());
+ return allocator;
}
void StubContextFactory::ResizeDisplay(ui::Compositor* compositor,

Powered by Google App Engine
This is Rietveld 408576698