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

Unified Diff: services/ui/gpu/gpu_service_internal.cc

Issue 2360203003: services/ui: Add mojom API for creating/destroying gpu memory buffer. (Closed)
Patch Set: . Created 4 years, 3 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/gpu/gpu_service_internal.h ('k') | services/ui/gpu/interfaces/gpu_service_internal.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/gpu/gpu_service_internal.cc
diff --git a/services/ui/gpu/gpu_service_internal.cc b/services/ui/gpu/gpu_service_internal.cc
index 218d18424603e44dcbe72cc3e21de6cf0aa98782..95c13730919b417bc3b440830ebf7bad8bb4e231 100644
--- a/services/ui/gpu/gpu_service_internal.cc
+++ b/services/ui/gpu/gpu_service_internal.cc
@@ -61,16 +61,17 @@ void GpuServiceInternal::Add(mojom::GpuServiceInternalRequest request) {
binding_.Bind(std::move(request));
}
-gfx::GpuMemoryBufferHandle GpuServiceInternal::CreateGpuMemoryBuffer(
+void GpuServiceInternal::CreateGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
const gfx::Size& size,
gfx::BufferFormat format,
gfx::BufferUsage usage,
int client_id,
- gpu::SurfaceHandle surface_handle) {
+ gpu::SurfaceHandle surface_handle,
+ const CreateGpuMemoryBufferCallback& callback) {
DCHECK(CalledOnValidThread());
- return gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
- id, size, format, usage, client_id, surface_handle);
+ callback.Run(gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
+ id, size, format, usage, client_id, surface_handle));
}
void GpuServiceInternal::DestroyGpuMemoryBuffer(
« no previous file with comments | « services/ui/gpu/gpu_service_internal.h ('k') | services/ui/gpu/interfaces/gpu_service_internal.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698