| Index: content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
|
| diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
|
| similarity index 59%
|
| copy from content/common/gpu/gpu_memory_buffer_factory_io_surface.h
|
| copy to content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
|
| index 3ff70953daadec52e551e7bd92ef53643b18120b..d0c2b928a7a439b8796d33a3054f35687a745528 100644
|
| --- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.h
|
| +++ b/content/common/gpu/gpu_memory_buffer_factory_surface_texture.h
|
| @@ -2,29 +2,27 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
|
| -#define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
|
| -
|
| -#include <IOSurface/IOSurfaceAPI.h>
|
| +#ifndef CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
|
| +#define CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
|
|
|
| #include "base/containers/hash_tables.h"
|
| -#include "base/mac/scoped_cftyperef.h"
|
| #include "base/memory/ref_counted.h"
|
| #include "ui/gfx/geometry/size.h"
|
| #include "ui/gfx/gpu_memory_buffer.h"
|
|
|
| namespace gfx {
|
| class GLImage;
|
| +class SurfaceTexture;
|
| }
|
|
|
| namespace content {
|
|
|
| -class GpuMemoryBufferFactoryIOSurface {
|
| +class GpuMemoryBufferFactorySurfaceTexture {
|
| public:
|
| - GpuMemoryBufferFactoryIOSurface();
|
| - ~GpuMemoryBufferFactoryIOSurface();
|
| + GpuMemoryBufferFactorySurfaceTexture();
|
| + ~GpuMemoryBufferFactorySurfaceTexture();
|
|
|
| - // Creates a IOSurface backed GPU memory buffer with |size| and
|
| + // Creates a SurfaceTexture backed GPU memory buffer with |size| and
|
| // |internalformat|. A valid handle is returned on success.
|
| gfx::GpuMemoryBufferHandle CreateGpuMemoryBuffer(
|
| const gfx::GpuMemoryBufferId& id,
|
| @@ -41,12 +39,12 @@ class GpuMemoryBufferFactoryIOSurface {
|
| unsigned internalformat);
|
|
|
| private:
|
| - typedef std::pair<int, int> IOSurfaceMapKey;
|
| - typedef base::hash_map<IOSurfaceMapKey, base::ScopedCFTypeRef<IOSurfaceRef>>
|
| - IOSurfaceMap;
|
| - IOSurfaceMap io_surfaces_;
|
| + typedef std::pair<int, int> SurfaceTextureMapKey;
|
| + typedef base::hash_map<SurfaceTextureMapKey,
|
| + scoped_refptr<gfx::SurfaceTexture>> SurfaceTextureMap;
|
| + SurfaceTextureMap surface_textures_;
|
| };
|
|
|
| } // namespace content
|
|
|
| -#endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_IO_SURFACE_H_
|
| +#endif // CONTENT_COMMON_GPU_GPU_MEMORY_BUFFER_FACTORY_SURFACE_TEXTURE_H_
|
|
|