diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-18 14:10:49 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-06-18 13:53:24 +0000 |
commit | 813fbf95af77a531c57a8c497345ad2c61d475b3 (patch) | |
tree | 821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc | |
parent | af6588f8d723931a298c995fa97259bb7f7deb55 (diff) | |
download | qtwebengine-chromium-813fbf95af77a531c57a8c497345ad2c61d475b3.tar.gz |
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc')
-rw-r--r-- | chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc b/chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc deleted file mode 100644 index 236d2bd5860..00000000000 --- a/chromium/content/common/gpu/client/gpu_memory_buffer_impl_ozone.cc +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/common/gpu/client/gpu_memory_buffer_impl.h" - -#include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h" -#include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h" - -namespace content { - -// static -void GpuMemoryBufferImpl::Create(gfx::GpuMemoryBufferId id, - const gfx::Size& size, - Format format, - Usage usage, - int client_id, - const CreationCallback& callback) { - if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format, - usage)) { - GpuMemoryBufferImplOzoneNativeBuffer::Create( - id, size, format, client_id, callback); - return; - } - - if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( - size, format, usage)) { - GpuMemoryBufferImplSharedMemory::Create(id, size, format, callback); - return; - } - - callback.Run(scoped_ptr<GpuMemoryBufferImpl>()); -} - -// static -void GpuMemoryBufferImpl::AllocateForChildProcess( - gfx::GpuMemoryBufferId id, - const gfx::Size& size, - Format format, - Usage usage, - base::ProcessHandle child_process, - int child_client_id, - const AllocationCallback& callback) { - if (GpuMemoryBufferImplOzoneNativeBuffer::IsConfigurationSupported(format, - usage)) { - GpuMemoryBufferImplOzoneNativeBuffer::AllocateForChildProcess( - id, size, format, child_client_id, callback); - return; - } - - if (GpuMemoryBufferImplSharedMemory::IsConfigurationSupported( - size, format, usage)) { - GpuMemoryBufferImplSharedMemory::AllocateForChildProcess( - id, size, format, child_process, callback); - return; - } - - callback.Run(gfx::GpuMemoryBufferHandle()); -} - -// static -void GpuMemoryBufferImpl::DeletedByChildProcess( - gfx::GpuMemoryBufferType type, - gfx::GpuMemoryBufferId id, - base::ProcessHandle child_process, - int child_client_id, - uint32_t sync_point) { - switch (type) { - case gfx::SHARED_MEMORY_BUFFER: - break; - case gfx::OZONE_NATIVE_BUFFER: - GpuMemoryBufferImplOzoneNativeBuffer::DeletedByChildProcess( - id, child_client_id, sync_point); - break; - default: - NOTREACHED(); - break; - } -} - -// static -scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - Format format, - const DestructionCallback& callback) { - switch (handle.type) { - case gfx::SHARED_MEMORY_BUFFER: - return GpuMemoryBufferImplSharedMemory::CreateFromHandle( - handle, size, format, callback); - case gfx::OZONE_NATIVE_BUFFER: - return GpuMemoryBufferImplOzoneNativeBuffer::CreateFromHandle( - handle, size, format, callback); - default: - return scoped_ptr<GpuMemoryBufferImpl>(); - } -} - -} // namespace content |