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

Unified Diff: content/common/gpu/client/gpu_memory_buffer_impl_mac.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_mac.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
index 489ddd9015e2a255048297f5594d789c7181a1af..e0fe58da0e9ff250f638ef491408b9da9b1598df 100644
--- a/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
+++ b/content/common/gpu/client/gpu_memory_buffer_impl_mac.cc
@@ -11,21 +11,18 @@ 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 (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(internalformat,
- usage)) {
- GpuMemoryBufferImplIOSurface::Create(
- size, internalformat, usage, client_id, callback);
+ if (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(format, usage)) {
+ GpuMemoryBufferImplIOSurface::Create(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 +32,21 @@ 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 (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(internalformat,
- usage)) {
+ if (GpuMemoryBufferImplIOSurface::IsConfigurationSupported(format, usage)) {
GpuMemoryBufferImplIOSurface::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 +64,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::IO_SURFACE_BUFFER:
return GpuMemoryBufferImplIOSurface::CreateFromHandle(
- handle, size, internalformat, callback);
+ handle, size, format, callback);
default:
return scoped_ptr<GpuMemoryBufferImpl>();
}
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_linux.cc ('k') | content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698