| Index: content/common/gpu/gpu_memory_buffer_factory.cc
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory.cc b/content/common/gpu/gpu_memory_buffer_factory.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3468d5a6f189bc566f141a6eadedb992c2f8c20a
|
| --- /dev/null
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory.cc
|
| @@ -0,0 +1,39 @@
|
| +// 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/gpu_memory_buffer_factory.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "build/build_config.h"
|
| +
|
| +#if defined(OS_MACOSX)
|
| +#include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h"
|
| +#endif
|
| +
|
| +#if defined(OS_ANDROID)
|
| +#include "content/common/gpu/gpu_memory_buffer_factory_surface_texture.h"
|
| +#endif
|
| +
|
| +#if defined(USE_OZONE)
|
| +#include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h"
|
| +#endif
|
| +
|
| +namespace content {
|
| +
|
| +// static
|
| +scoped_ptr<GpuMemoryBufferFactory> GpuMemoryBufferFactory::CreateNativeType() {
|
| +#if defined(OS_MACOSX)
|
| + return make_scoped_ptr(new GpuMemoryBufferFactoryIOSurface);
|
| +#endif
|
| +#if defined(OS_ANDROID)
|
| + return make_scoped_ptr(new GpuMemoryBufferFactorySurfaceTexture);
|
| +#endif
|
| +#if defined(USE_OZONE)
|
| + return make_scoped_ptr(new GpuMemoryBufferFactoryOzoneNativePixmap);
|
| +#endif
|
| + NOTREACHED();
|
| + return nullptr;
|
| +}
|
| +
|
| +} // namespace content
|
|
|