Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Side by Side Diff: gpu/command_buffer/service/image_factory.h

Issue 2061743004: Implement native GMB backbuffers in the GLES2 Command Decoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from piman. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "gpu/gpu_export.h" 9 #include "gpu/gpu_export.h"
10 #include "ui/gfx/geometry/size.h" 10 #include "ui/gfx/geometry/size.h"
(...skipping 12 matching lines...) Expand all
23 // Creates a GLImage instance for GPU memory buffer identified by |handle|. 23 // Creates a GLImage instance for GPU memory buffer identified by |handle|.
24 // |client_id| should be set to the client requesting the creation of instance 24 // |client_id| should be set to the client requesting the creation of instance
25 // and can be used by factory implementation to verify access rights. 25 // and can be used by factory implementation to verify access rights.
26 virtual scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer( 26 virtual scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
27 const gfx::GpuMemoryBufferHandle& handle, 27 const gfx::GpuMemoryBufferHandle& handle,
28 const gfx::Size& size, 28 const gfx::Size& size,
29 gfx::BufferFormat format, 29 gfx::BufferFormat format,
30 unsigned internalformat, 30 unsigned internalformat,
31 int client_id) = 0; 31 int client_id) = 0;
32 32
33 // Create an anonymous GLImage backed by a GpuMemoryBuffer that doesn't have a
34 // client_id. It can't be passed to other processes.
35 virtual scoped_refptr<gl::GLImage> CreateAnonymousImage(
36 const gfx::Size& size,
37 gfx::BufferFormat format,
38 unsigned internalformat);
39
40 // An image can only be bound to a texture with the appropriate type.
41 virtual unsigned RequiredTextureType();
42
43 // Whether a created image can have format GL_RGB.
44 virtual bool SupportsFormatRGB();
45
33 protected: 46 protected:
34 virtual ~ImageFactory(); 47 virtual ~ImageFactory();
35 }; 48 };
36 49
37 } // namespace gpu 50 } // namespace gpu
38 51
39 #endif // GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_ 52 #endif // GPU_COMMAND_BUFFER_SERVICE_IMAGE_FACTORY_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc ('k') | gpu/command_buffer/service/image_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698