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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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
Index: content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
index e1a1b1891239e19ad242bb441bc833d1c45fba56..7420444ac402fb68755b9931482bb9ca424b953c 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc
@@ -11,21 +11,20 @@ namespace content {
// static
void GpuMemoryBufferImpl::Create(const gfx::Size& size,
- unsigned internalformat,
- unsigned usage,
+ Format format,
+ Usage usage,
int client_id,
const CreationCallback& callback) {
- if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(
- internalformat, usage)) {
+ if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format,
+ usage)) {
GpuMemoryBufferImplOzoneNativeBuffer::Create(
- size, internalformat, usage, client_id, callback);
+ size, format, client_id, callback);
return;
}
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
- size, internalformat, usage)) {
- GpuMemoryBufferImplSharedMemory::Create(
- size, internalformat, usage, callback);
+ size, format, usage)) {
+ GpuMemoryBufferImplSharedMemory::Create(size, format, callback);
return;
}
@@ -35,22 +34,22 @@ void GpuMemoryBufferImpl::Create(const gfx::Size& size,
// static
void GpuMemoryBufferImpl::AllocateForChildProcess(
const gfx::Size& size,
- unsigned internalformat,
- unsigned usage,
+ Format format,
+ Usage usage,
base::ProcessHandle child_process,
int child_client_id,
const AllocationCallback& callback) {
- if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(
- internalformat, usage)) {
+ if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format,
+ usage)) {
GpuMemoryBufferImplOzoneNativeBuffer::AllocateForChildProcess(
- size, internalformat, usage, child_client_id, callback);
+ size, format, child_client_id, callback);
return;
}
if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported(
- size, internalformat, usage)) {
+ size, format, usage)) {
GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
- size, internalformat, child_process, callback);
+ size, format, child_process, callback);
return;
}
@@ -68,15 +67,15 @@ void GpuMemoryBufferImpl::DeletedByChildProcess(
scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
- unsigned internalformat,
+ Format format,
const DestructionCallback& callback) {
switch (handle.type) {
case gfx::SHARED_MEMORY_BUFFER:
return GpuMemoryBufferImplSharedMemory::CreateFromHandle(
- handle, size, internalformat, callback);
+ handle, size, format, callback);
case gfx::OZONE_NATIVE_BUFFER:
return GpuMemoryBufferImplOzoneNativeBuffer::CreateFromHandle(
- handle, size, internalformat, callback);
+ handle, size, format, callback);
default:
return scoped_ptr<GpuMemoryBufferImpl>();
}

Powered by Google App Engine
This is Rietveld 408576698