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

Unified Diff: services/ui/ws/mus_gpu_memory_buffer_manager.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/ws/mus_gpu_memory_buffer_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/mus_gpu_memory_buffer_manager.cc
diff --git a/services/ui/ws/mus_gpu_memory_buffer_manager.cc b/services/ui/ws/mus_gpu_memory_buffer_manager.cc
index e80e48aa4fa505ae17a504c5c089315508b17fff..8d73390fc888fe9963e4f90b2c806492fda8f129 100644
--- a/services/ui/ws/mus_gpu_memory_buffer_manager.cc
+++ b/services/ui/ws/mus_gpu_memory_buffer_manager.cc
@@ -9,14 +9,14 @@
#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "services/ui/common/generic_shared_memory_id_generator.h"
-#include "services/ui/gpu/gpu_service_internal.h"
+#include "services/ui/gpu/interfaces/gpu_service_internal.mojom.h"
namespace ui {
namespace ws {
MusGpuMemoryBufferManager::MusGpuMemoryBufferManager(
- GpuServiceInternal* gpu_service,
+ mojom::GpuServiceInternal* gpu_service,
int client_id)
: gpu_service_(gpu_service), client_id_(client_id), weak_factory_(this) {}
@@ -32,8 +32,9 @@ MusGpuMemoryBufferManager::AllocateGpuMemoryBuffer(
const bool is_native =
gpu::IsNativeGpuMemoryBufferConfigurationSupported(format, usage);
if (is_native) {
- gfx::GpuMemoryBufferHandle handle = gpu_service_->CreateGpuMemoryBuffer(
- id, size, format, usage, client_id_, surface_handle);
+ gfx::GpuMemoryBufferHandle handle;
+ gpu_service_->CreateGpuMemoryBuffer(id, size, format, usage, client_id_,
+ surface_handle, &handle);
if (handle.is_null())
return nullptr;
return gpu::GpuMemoryBufferImpl::CreateFromHandle(
« no previous file with comments | « services/ui/ws/mus_gpu_memory_buffer_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698