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

Side by Side Diff: components/viz/common/server_gpu_memory_buffer_manager.cc

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 unified diff | Download patch
« no previous file with comments | « components/viz/common/server_gpu_memory_buffer_manager.h ('k') | content/gpu/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/ui/common/server_gpu_memory_buffer_manager.h" 5 #include "components/viz/common/server_gpu_memory_buffer_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/ipc/client/gpu_memory_buffer_impl.h" 8 #include "gpu/ipc/client/gpu_memory_buffer_impl.h"
9 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h" 9 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
10 #include "gpu/ipc/common/gpu_memory_buffer_support.h" 10 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
11 #include "services/ui/gpu/interfaces/gpu_service.mojom.h" 11 #include "services/ui/gpu/interfaces/gpu_service.mojom.h"
12 12
13 namespace ui { 13 namespace viz {
14 14
15 ServerGpuMemoryBufferManager::ServerGpuMemoryBufferManager( 15 ServerGpuMemoryBufferManager::ServerGpuMemoryBufferManager(
16 mojom::GpuService* gpu_service, 16 ui::mojom::GpuService* gpu_service,
17 int client_id) 17 int client_id)
18 : gpu_service_(gpu_service), 18 : gpu_service_(gpu_service),
19 client_id_(client_id), 19 client_id_(client_id),
20 native_configurations_(gpu::GetNativeGpuMemoryBufferConfigurations()), 20 native_configurations_(gpu::GetNativeGpuMemoryBufferConfigurations()),
21 weak_factory_(this) {} 21 weak_factory_(this) {}
22 22
23 ServerGpuMemoryBufferManager::~ServerGpuMemoryBufferManager() {} 23 ServerGpuMemoryBufferManager::~ServerGpuMemoryBufferManager() {}
24 24
25 gfx::GpuMemoryBufferHandle 25 gfx::GpuMemoryBufferHandle
26 ServerGpuMemoryBufferManager::CreateGpuMemoryBufferHandle( 26 ServerGpuMemoryBufferManager::CreateGpuMemoryBufferHandle(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 void ServerGpuMemoryBufferManager::DestroyAllGpuMemoryBufferForClient( 87 void ServerGpuMemoryBufferManager::DestroyAllGpuMemoryBufferForClient(
88 int client_id) { 88 int client_id) {
89 DCHECK(CalledOnValidThread()); 89 DCHECK(CalledOnValidThread());
90 for (gfx::GpuMemoryBufferId id : native_buffers_[client_id]) 90 for (gfx::GpuMemoryBufferId id : native_buffers_[client_id])
91 gpu_service_->DestroyGpuMemoryBuffer(id, client_id, gpu::SyncToken()); 91 gpu_service_->DestroyGpuMemoryBuffer(id, client_id, gpu::SyncToken());
92 native_buffers_.erase(client_id); 92 native_buffers_.erase(client_id);
93 } 93 }
94 94
95 } // namespace ui 95 } // namespace viz
OLDNEW
« no previous file with comments | « components/viz/common/server_gpu_memory_buffer_manager.h ('k') | content/gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698