| Index: gpu/command_buffer/tests/texture_image_factory.h
|
| diff --git a/gpu/command_buffer/tests/texture_image_factory.h b/gpu/command_buffer/tests/texture_image_factory.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..848aa0f973f72441a6a362c503993593190b4e3d
|
| --- /dev/null
|
| +++ b/gpu/command_buffer/tests/texture_image_factory.h
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2016 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 "gpu/command_buffer/service/image_factory.h"
|
| +
|
| +namespace gpu {
|
| +
|
| +// The images created by this factory have no inherent storage. When the image
|
| +// is bound to a texture, storage is allocated for the texture via glTexImage2D.
|
| +class TextureImageFactory : public gpu::ImageFactory {
|
| + public:
|
| + scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
|
| + const gfx::GpuMemoryBufferHandle& handle,
|
| + const gfx::Size& size,
|
| + gfx::BufferFormat format,
|
| + unsigned internalformat,
|
| + int client_id) override;
|
| +
|
| + // Create an anonymous GLImage backed by a GpuMemoryBuffer that doesn't have a
|
| + // client_id. It can't be passed to other processes.
|
| + scoped_refptr<gl::GLImage> CreateAnonymousImage(
|
| + const gfx::Size& size,
|
| + gfx::BufferFormat format,
|
| + unsigned internalformat) override;
|
| +};
|
| +
|
| +} // namespace gpu
|
|
|