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

Side by Side Diff: gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt

Issue 1974163003: Expose GpuMemoryBufferId through glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 7 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 Name 1 Name
2 2
3 CHROMIUM_gpu_memory_buffer_image 3 CHROMIUM_gpu_memory_buffer_image
4 4
5 Name Strings 5 Name Strings
6 6
7 GL_CHROMIUM_gpu_memory_buffer_image 7 GL_CHROMIUM_gpu_memory_buffer_image
8 8
9 Version 9 Version
10 10
(...skipping 13 matching lines...) Expand all
24 Issues 24 Issues
25 25
26 None 26 None
27 27
28 New Tokens 28 New Tokens
29 29
30 Accepted by the <usage> parameter of CreateGpuMemoryBufferImageCHROMIUM: 30 Accepted by the <usage> parameter of CreateGpuMemoryBufferImageCHROMIUM:
31 31
32 READ_WRITE_CHROMIUM 0x78F2 32 READ_WRITE_CHROMIUM 0x78F2
33 33
34 Accepted by the <param> parameter of GetImageivCHROMIUM:
35
36 GL_GPU_MEMORY_BUFFER_ID 0x78FD
37
34 New Procedures and Functions 38 New Procedures and Functions
35 39
36 GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width, 40 GLuint CreateGpuMemoryBufferImageCHROMIUM(GLsizei width,
37 GLsizei height, 41 GLsizei height,
38 GLenum internalformat, 42 GLenum internalformat,
39 GLenum usage) 43 GLenum usage)
40 44
41 Create a GpuMemoryBuffer backed image with width equal to <width> 45 Create a GpuMemoryBuffer backed image with width equal to <width>
42 and height equal to <height> and format equal to <internalformat>. 46 and height equal to <height> and format equal to <internalformat>.
43 47
44 Returns a unique identifier for the image that could be used in 48 Returns a unique identifier for the image that could be used in
45 subsequent operations. 49 subsequent operations.
46 50
47 INVALID_VALUE is generated if <width> or <height> is nonpositive. 51 INVALID_VALUE is generated if <width> or <height> is nonpositive.
48 52
49 INVALID_ENUM is generated if <internalformat> is not one of 53 INVALID_ENUM is generated if <internalformat> is not one of
50 RGB or RGBA. 54 RGB or RGBA.
51 55
52 INVALID_ENUM is generated if <usage> is not READ_WRTIE_CHROMIUM. 56 INVALID_ENUM is generated if <usage> is not READ_WRTIE_CHROMIUM.
53 57
54 On OS X, driver bugs prevent the usage of memory buffers with RGB internal 58 On OS X, driver bugs prevent the usage of memory buffers with RGB internal
55 format. As a workaround, the created GpuMemoryBuffer will always have 59 format. As a workaround, the created GpuMemoryBuffer will always have
56 internal format RGBA. The caller is responsible for handling this 60 internal format RGBA. The caller is responsible for handling this
57 appropriately. The only support provided by this extension is that calls 61 appropriately. The only support provided by this extension is that calls
58 that require parameter validation (such as copyTexImage2D and 62 that require parameter validation (such as copyTexImage2D and
59 copyTexSubImage2D) will perform paramter validation as if the internal 63 copyTexSubImage2D) will perform paramter validation as if the internal
60 format were RGB. 64 format were RGB.
61 65
66 void GetImageivCHROMIUM(GLuint image_id, GLenum param, GLint* data)
67
68 When the parameter GL_GPU_MEMORY_BUFFER_ID is passed as <param>, returns the
69 id of the GpuMemoryBuffer associated with <image_id>. If the image does not
70 exist, or is not associated with a GpuMemoryBuffer, returns -1.
71
62 Errors 72 Errors
63 73
64 None. 74 None.
65 75
66 New State 76 New State
67 77
68 None. 78 None.
69 79
70 Revision History 80 Revision History
71 81
72 9/29/2014 Documented the extension. 82 9/29/2014 Documented the extension.
73 4/12/2016 Added details of OS X RGB workaround. 83 4/12/2016 Added details of OS X RGB workaround.
84 5/25/2016 Added the GetImageivCHROMIUM function.
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/command_buffer_client_impl.cc ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698