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

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

Issue 1827123002: Move content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 9 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.cc
diff --git a/content/common/gpu/client/gpu_memory_buffer_impl.cc b/content/common/gpu/client/gpu_memory_buffer_impl.cc
deleted file mode 100644
index 5c6571aaf66d1a92fed8dbe9e6dcd2a22ab304ca..0000000000000000000000000000000000000000
--- a/content/common/gpu/client/gpu_memory_buffer_impl.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright 2013 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 "base/logging.h"
-#include "build/build_config.h"
-#include "content/common/gpu/client/gpu_memory_buffer_impl_shared_memory.h"
-
-#if defined(OS_MACOSX)
-#include "content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h"
-#endif
-
-#if defined(OS_ANDROID)
-#include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h"
-#endif
-
-#if defined(USE_OZONE)
-#include "content/common/gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h"
-#endif
-
-namespace content {
-
-GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
- const gfx::Size& size,
- gfx::BufferFormat format,
- const DestructionCallback& callback)
- : id_(id),
- size_(size),
- format_(format),
- callback_(callback),
- mapped_(false) {}
-
-GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
- DCHECK(!mapped_);
- callback_.Run(destruction_sync_token_);
-}
-
-// static
-scoped_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle(
- const gfx::GpuMemoryBufferHandle& handle,
- const gfx::Size& size,
- gfx::BufferFormat format,
- gfx::BufferUsage usage,
- const DestructionCallback& callback) {
- switch (handle.type) {
- case gfx::SHARED_MEMORY_BUFFER:
- return GpuMemoryBufferImplSharedMemory::CreateFromHandle(
- handle, size, format, usage, callback);
-#if defined(OS_MACOSX)
- case gfx::IO_SURFACE_BUFFER:
- return GpuMemoryBufferImplIOSurface::CreateFromHandle(
- handle, size, format, usage, callback);
-#endif
-#if defined(OS_ANDROID)
- case gfx::SURFACE_TEXTURE_BUFFER:
- return GpuMemoryBufferImplSurfaceTexture::CreateFromHandle(
- handle, size, format, usage, callback);
-#endif
-#if defined(USE_OZONE)
- case gfx::OZONE_NATIVE_PIXMAP:
- return GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle(
- handle, size, format, usage, callback);
-#endif
- default:
- NOTREACHED();
- return nullptr;
- }
-}
-
-// static
-GpuMemoryBufferImpl* GpuMemoryBufferImpl::FromClientBuffer(
- ClientBuffer buffer) {
- return reinterpret_cast<GpuMemoryBufferImpl*>(buffer);
-}
-
-gfx::Size GpuMemoryBufferImpl::GetSize() const {
- return size_;
-}
-
-gfx::BufferFormat GpuMemoryBufferImpl::GetFormat() const {
- return format_;
-}
-
-gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const {
- return id_;
-}
-
-ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
- return reinterpret_cast<ClientBuffer>(this);
-}
-
-} // namespace content
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698