| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 "gpu/command_buffer/service/image_factory.h" |
| 6 |
| 7 namespace gpu { |
| 8 |
| 9 // The images created by this factory have no inherent storage. When the image |
| 10 // is bound to a texture, storage is allocated for the texture via glTexImage2D. |
| 11 class TextureImageFactory : public gpu::ImageFactory { |
| 12 public: |
| 13 scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( |
| 14 const gfx::GpuMemoryBufferHandle& handle, |
| 15 const gfx::Size& size, |
| 16 gfx::BufferFormat format, |
| 17 unsigned internalformat, |
| 18 int client_id) override; |
| 19 |
| 20 // Create an anonymous GLImage backed by a GpuMemoryBuffer that doesn't have a |
| 21 // client_id. It can't be passed to other processes. |
| 22 scoped_refptr<gl::GLImage> CreateAnonymousImage( |
| 23 const gfx::Size& size, |
| 24 gfx::BufferFormat format, |
| 25 unsigned internalformat) override; |
| 26 }; |
| 27 |
| 28 } // namespace gpu |
| OLD | NEW |