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

Unified Diff: services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc

Issue 2559343003: mus: Rename GpuService to Gpu. (Closed)
Patch Set: . Created 4 years 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/public/cpp/gpu/client_gpu_memory_buffer_manager.h ('k') | services/ui/public/cpp/gpu/gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
diff --git a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
index c1402c174e475cdca0190e220397ee0fb5488eae..ab51a931313a0f48ceca3fdcd58ee6b12414392b 100644
--- a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
+++ b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
@@ -38,16 +38,15 @@ void NotifyDestructionOnCorrectThread(
} // namespace
-ClientGpuMemoryBufferManager::ClientGpuMemoryBufferManager(
- mojom::GpuServicePtr gpu_service)
+ClientGpuMemoryBufferManager::ClientGpuMemoryBufferManager(mojom::GpuPtr gpu)
: thread_("GpuMemoryThread"), weak_ptr_factory_(this) {
CHECK(thread_.Start());
// The thread is owned by this object. Which means the task will not run if
// the object has been destroyed. So Unretained() is safe.
thread_.task_runner()->PostTask(
- FROM_HERE, base::Bind(&ClientGpuMemoryBufferManager::InitThread,
- base::Unretained(this),
- base::Passed(gpu_service.PassInterface())));
+ FROM_HERE,
+ base::Bind(&ClientGpuMemoryBufferManager::InitThread,
+ base::Unretained(this), base::Passed(gpu.PassInterface())));
}
ClientGpuMemoryBufferManager::~ClientGpuMemoryBufferManager() {
@@ -57,15 +56,14 @@ ClientGpuMemoryBufferManager::~ClientGpuMemoryBufferManager() {
thread_.Stop();
}
-void ClientGpuMemoryBufferManager::InitThread(
- mojo::InterfacePtrInfo<mojom::GpuService> gpu_service_info) {
- gpu_service_.Bind(std::move(gpu_service_info));
+void ClientGpuMemoryBufferManager::InitThread(mojom::GpuPtrInfo gpu_info) {
+ gpu_.Bind(std::move(gpu_info));
weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
}
void ClientGpuMemoryBufferManager::TearDownThread() {
weak_ptr_factory_.InvalidateWeakPtrs();
- gpu_service_.reset();
+ gpu_.reset();
}
void ClientGpuMemoryBufferManager::AllocateGpuMemoryBufferOnThread(
@@ -78,7 +76,7 @@ void ClientGpuMemoryBufferManager::AllocateGpuMemoryBufferOnThread(
// |handle| and |wait| are both on the stack, and will be alive until |wait|
// is signaled. So it is safe for OnGpuMemoryBufferAllocated() to operate on
// these.
- gpu_service_->CreateGpuMemoryBuffer(
+ gpu_->CreateGpuMemoryBuffer(
gfx::GpuMemoryBufferId(++counter_), size, format, usage,
base::Bind(&OnGpuMemoryBufferAllocated, handle, wait));
}
@@ -93,7 +91,7 @@ void ClientGpuMemoryBufferManager::DeletedGpuMemoryBuffer(
base::Unretained(this), id, sync_token));
return;
}
- gpu_service_->DestroyGpuMemoryBuffer(id, sync_token);
+ gpu_->DestroyGpuMemoryBuffer(id, sync_token);
}
std::unique_ptr<gfx::GpuMemoryBuffer>
« no previous file with comments | « services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h ('k') | services/ui/public/cpp/gpu/gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698