1// Copyright 2013 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#ifndef GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_
6#define GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_
7
8#include <GLES2/gl2.h>
9
10#include "base/memory/scoped_ptr.h"
11#include "gles2_impl_export.h"
12
13namespace gfx {
14class GpuMemoryBuffer;
15}
16
17namespace gpu {
18namespace gles2 {
19
20class GLES2_IMPL_EXPORT ImageFactory {
21
22 public:
23  virtual ~ImageFactory() {}
24
25  // Create a GpuMemoryBuffer and makes it available to the
26  // service side by inserting it to the ImageManager.
27  virtual scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
28      int width, int height, GLenum internalformat, unsigned* image_id) = 0;
29  virtual void DeleteGpuMemoryBuffer(unsigned image_id) = 0;
30};
31
32}  // namespace gles2
33}  // namespace gpu
34
35#endif  // GPU_COMMAND_BUFFER_CLIENT_IMAGE_FACTORY_H_
36