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

Unified Diff: components/viz/common/server_gpu_memory_buffer_manager.h

Issue 2939953004: viz: Move some code into //components/viz/common. (Closed)
Patch Set: . Created 3 years, 6 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 | « components/viz/common/README.md ('k') | components/viz/common/server_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/viz/common/server_gpu_memory_buffer_manager.h
diff --git a/services/ui/common/server_gpu_memory_buffer_manager.h b/components/viz/common/server_gpu_memory_buffer_manager.h
similarity index 77%
rename from services/ui/common/server_gpu_memory_buffer_manager.h
rename to components/viz/common/server_gpu_memory_buffer_manager.h
index c86117b6c5cf0fa0db587fc383e6bc55cbf3d2f2..c34eda825d3ec8e20583999d874e6aa90c1ad15e 100644
--- a/services/ui/common/server_gpu_memory_buffer_manager.h
+++ b/components/viz/common/server_gpu_memory_buffer_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SERVICES_UI_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
-#define SERVICES_UI_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
+#ifndef COMPONENTS_VIZ_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
+#define COMPONENTS_VIZ_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
#include <memory>
@@ -12,16 +12,22 @@
#include "base/threading/thread_checker.h"
#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
#include "gpu/ipc/host/gpu_memory_buffer_support.h"
-#include "services/ui/gpu/interfaces/gpu_service.mojom.h"
namespace ui {
+namespace mojom {
+class GpuService;
+}
+}
-// This GpuMemoryBufferManager is for establishing a GpuChannelHost used by
-// mus locally.
+namespace viz {
+
+// This GpuMemoryBufferManager implementation is for [de]allocating gpu memory
+// from the gpu process over the mojom.GpuService api.
class ServerGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
public base::ThreadChecker {
public:
- ServerGpuMemoryBufferManager(mojom::GpuService* gpu_service, int client_id);
+ ServerGpuMemoryBufferManager(ui::mojom::GpuService* gpu_service,
+ int client_id);
~ServerGpuMemoryBufferManager() override;
void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
@@ -48,7 +54,7 @@ class ServerGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
const gpu::SyncToken& sync_token) override;
private:
- mojom::GpuService* gpu_service_;
+ ui::mojom::GpuService* gpu_service_;
const int client_id_;
int next_gpu_memory_id_ = 1;
@@ -63,6 +69,6 @@ class ServerGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
DISALLOW_COPY_AND_ASSIGN(ServerGpuMemoryBufferManager);
};
-} // namespace ui
+} // namespace viz
-#endif // SERVICES_UI_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
+#endif // COMPONENTS_VIZ_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
« no previous file with comments | « components/viz/common/README.md ('k') | components/viz/common/server_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698