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

Unified Diff: services/ui/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 | « services/ui/common/BUILD.gn ('k') | services/ui/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: services/ui/common/server_gpu_memory_buffer_manager.h
diff --git a/services/ui/common/server_gpu_memory_buffer_manager.h b/services/ui/common/server_gpu_memory_buffer_manager.h
deleted file mode 100644
index c86117b6c5cf0fa0db587fc383e6bc55cbf3d2f2..0000000000000000000000000000000000000000
--- a/services/ui/common/server_gpu_memory_buffer_manager.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// 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_
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#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 {
-
-// This GpuMemoryBufferManager is for establishing a GpuChannelHost used by
-// mus locally.
-class ServerGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager,
- public base::ThreadChecker {
- public:
- ServerGpuMemoryBufferManager(mojom::GpuService* gpu_service, int client_id);
- ~ServerGpuMemoryBufferManager() override;
-
- void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
- int client_id,
- const gpu::SyncToken& sync_token);
-
- void DestroyAllGpuMemoryBufferForClient(int client_id);
-
- gfx::GpuMemoryBufferHandle CreateGpuMemoryBufferHandle(
- gfx::GpuMemoryBufferId id,
- int client_id,
- const gfx::Size& size,
- gfx::BufferFormat format,
- gfx::BufferUsage usage,
- gpu::SurfaceHandle surface_handle);
-
- // Overridden from gpu::GpuMemoryBufferManager:
- std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
- const gfx::Size& size,
- gfx::BufferFormat format,
- gfx::BufferUsage usage,
- gpu::SurfaceHandle surface_handle) override;
- void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer,
- const gpu::SyncToken& sync_token) override;
-
- private:
- mojom::GpuService* gpu_service_;
- const int client_id_;
- int next_gpu_memory_id_ = 1;
-
- using NativeBuffers =
- std::unordered_set<gfx::GpuMemoryBufferId,
- BASE_HASH_NAMESPACE::hash<gfx::GpuMemoryBufferId>>;
- std::unordered_map<int, NativeBuffers> native_buffers_;
-
- const gpu::GpuMemoryBufferConfigurationSet native_configurations_;
- base::WeakPtrFactory<ServerGpuMemoryBufferManager> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ServerGpuMemoryBufferManager);
-};
-
-} // namespace ui
-
-#endif // SERVICES_UI_COMMON_SERVER_GPU_MEMORY_BUFFER_MANAGER_H_
« no previous file with comments | « services/ui/common/BUILD.gn ('k') | services/ui/common/server_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698