OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "build/build_config.h" |
| 9 |
| 10 #if defined(OS_MACOSX) |
| 11 #include "content/common/gpu/gpu_memory_buffer_factory_io_surface.h" |
| 12 #endif |
| 13 |
| 14 #if defined(OS_ANDROID) |
| 15 #include "content/common/gpu/gpu_memory_buffer_factory_surface_texture.h" |
| 16 #endif |
| 17 |
| 18 #if defined(USE_OZONE) |
| 19 #include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h" |
| 20 #endif |
| 21 |
| 22 namespace content { |
| 23 |
| 24 // static |
| 25 scoped_ptr<GpuMemoryBufferFactory> GpuMemoryBufferFactory::CreateNativeType() { |
| 26 #if defined(OS_MACOSX) |
| 27 return make_scoped_ptr(new GpuMemoryBufferFactoryIOSurface); |
| 28 #endif |
| 29 #if defined(OS_ANDROID) |
| 30 return make_scoped_ptr(new GpuMemoryBufferFactorySurfaceTexture); |
| 31 #endif |
| 32 #if defined(USE_OZONE) |
| 33 return make_scoped_ptr(new GpuMemoryBufferFactoryOzoneNativePixmap); |
| 34 #endif |
| 35 NOTREACHED(); |
| 36 return nullptr; |
| 37 } |
| 38 |
| 39 } // namespace content |
OLD | NEW |