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

Unified Diff: ui/aura/mus/window_tree_client.h

Issue 2741063002: Setup DiscardableMemory in the ash process (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « ui/aura/mus/DEPS ('k') | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.h
diff --git a/ui/aura/mus/window_tree_client.h b/ui/aura/mus/window_tree_client.h
index 63073714c818f062032f27e0558111c8cbff5323..fa338c8e0bc05915dd7288951555287972abc7d0 100644
--- a/ui/aura/mus/window_tree_client.h
+++ b/ui/aura/mus/window_tree_client.h
@@ -30,6 +30,14 @@
#include "ui/aura/mus/window_manager_delegate.h"
#include "ui/aura/mus/window_tree_host_mus_delegate.h"
+namespace base {
+class Thread;
+}
+
+namespace discardable_memory {
+class ClientDiscardableSharedMemoryManager;
+}
+
namespace display {
class Display;
}
@@ -86,12 +94,17 @@ class AURA_EXPORT WindowTreeClient
public WindowTreeHostMusDelegate,
public client::TransientWindowClientObserver {
public:
- explicit WindowTreeClient(
+ // |create_discardable_memory| If it is true, WindowTreeClient will setup the
+ // dicardable shared memory manager for this process. In some test, more than
+ // one WindowTreeClient will be created, so we need pass false to avoid
+ // setup the discardable shared memory manager more than once.
+ WindowTreeClient(
service_manager::Connector* connector,
WindowTreeClientDelegate* delegate,
WindowManagerDelegate* window_manager_delegate = nullptr,
ui::mojom::WindowTreeClientRequest request = nullptr,
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr);
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
+ bool create_discardable_memory = true);
~WindowTreeClient() override;
// Establishes the connection by way of the WindowTreeFactory.
@@ -543,9 +556,15 @@ class AURA_EXPORT WindowTreeClient
base::ObserverList<WindowTreeClientTestObserver> test_observers_;
+ // IO thread for GPU and discardable shared memory IPC.
+ std::unique_ptr<base::Thread> io_thread_;
+
std::unique_ptr<ui::Gpu> gpu_;
std::unique_ptr<MusContextFactory> compositor_context_factory_;
+ std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager>
+ discardable_shared_memory_manager_;
+
// If |compositor_context_factory_| is installed on Env, then this is the
// ContextFactory that was set on Env originally.
ui::ContextFactory* initial_context_factory_ = nullptr;
« no previous file with comments | « ui/aura/mus/DEPS ('k') | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698