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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 years, 2 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
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Name 1 Name
2 2
3 CHROMIUM_image 3 CHROMIUM_image
4 4
5 Name Strings 5 Name Strings
6 6
7 GL_CHROMIUM_image 7 GL_CHROMIUM_image
8 8
9 Version 9 Version
10 10
11 Last Modifed Date: Apr 30, 2014 11 Last Modifed Date: Oct 7, 2014
12 12
13 Dependencies 13 Dependencies
14 14
15 OpenGL ES 2.0 is required. 15 OpenGL ES 2.0 is required.
16 16
17 Overview 17 Overview
18 18
19 This extension allows for more efficient uploading of texture data through 19 This extension defines a new resource type that is suitable for
20 Chromium's OpenGL ES 2.0 implementation as well as enable hardware overlay 20 sharing 2D arrays of image data between client APIs.
21 support by providing ability to create buffers capable of being scanned out
22 directly by the display controller.
23
24 For security reasons Chromium accesses the GPU from a separate process. User
25 processes are not allowed to access the GPU directly. This multi-process
26 architechure has the advantage that GPU operations can be secured and
27 pipelined but it has the disadvantage that all data that is going to be
28 passed to GPU must first be made available to the separate GPU process.
29
30 This extension helps the application directly allocate and access texture
31 memory.
32 21
33 Issues 22 Issues
34 23
35 None 24 None
36 25
37 New Tokens 26 New Tokens
38 27
39 Accepted by the <pname> parameter of GetImageParameterivCHROMIUM: 28 None
40
41 IMAGE_ROWBYTES_CHROMIUM 0x78F0
42
43 Accepted by the <usage> parameter of CreateImageCHROMIUM:
44
45 IMAGE_MAP_CHROMIUM 0x78F1
46 IMAGE_SCANOUT_CHROMIUM 0x78F2
47 29
48 New Procedures and Functions 30 New Procedures and Functions
49 31
50 GLuint CreateImageCHROMIUM(GLsizei width, GLsizei height, 32 GLuint CreateImageCHROMIUM(ClientBuffer buffer,
51 GLenum internalformat, GLenum usage) 33 GLsizei width,
34 GLsizei height,
35 GLenum internalformat)
52 36
53 Allocate an image with width equal to <width> and height equal 37 Create an image from <buffer> with width equal to <width> and
54 to <height> stored in format <internalformat>. 38 height equal to <height> and format equal to <internalformat>.
55 39
56 Returns a unique identifier for the allocated image that could be used 40 Returns a unique identifier for the image that could be used in
57 in subsequent operations. 41 subsequent operations.
58 42
59 INVALID_VALUE is generated if <width> or <height> is nonpositive. 43 INVALID_VALUE is generated if <width> or <height> is nonpositive.
60 44
61 INVALID_ENUM is generated if <usage> is not one of 45 INVALID_ENUM is generated if <internalformat> is not one of
62 IMAGE_MAP_CHROMIUM and IMAGE_SCANOUT_CHROMIUM. 46 RGB or RGBA.
63 47
64 void DestroyImageCHROMIUM(GLuint image_id) 48 void DestroyImageCHROMIUM(GLuint image_id)
65 49
66 Frees the image previously allocated by a call to CreateImageCHROMIUM. 50 Frees the image previously created by a call to CreateImageCHROMIUM.
67 51
68 INVALID_OPERATION is generated if <image_id> is not a valid image id. 52 INVALID_OPERATION is generated if <image_id> is not a valid image id.
69 53
70 void* MapImageCHROMIUM(GLuint image_id)
71
72 Returns a pointer to in the user memory for the application to modify
73 the image. It is illegal to call this function on an image not created
74 with IMAGE_MAP_CHROMIUM usage.
75
76 INVALID_OPERATION is generated if <image_id> is not a valid image id.
77
78 INVALID_OPERATION is generated if the image was already mapped by a previous
79 call to this method.
80
81 void UnmapImageCHROMIUM(GLuint image_id)
82
83 Removes the mapping created by a call to MapImageCHROMIUM.
84
85 Note that after calling UnmapImageCHROMIUM the application should assume
86 that the memory returned by MapImageCHROMIUM is off limits and is no longer
87 accessible by the application. Accessing it after calling
88 UnmapImageCHROMIUM will produce undefined results.
89
90 INVALID_OPERATION is generated if <image_id> is not a valid image id.
91
92 INVALID_OPERATION is generated if the image was not already mapped by a
93 previous call to MapImageCHROMIUM.
94
95 void GetImageParameterivCHROMIUM(GLuint image_id, GLenum pname,
96 GLint* params)
97
98 Sets <params> to the integer value of the parameter specified by <pname>
99 for the image specified by <image_id>. <params> is expected to be
100 properly allocated before calling this method.
101
102 INVALID_OPERATION is generated if <image_id> is not a valid image id.
103
104 INVALID_ENUM is generated if <pname> is not IMAGE_ROWBYTES_CHROMIUM.
105
106 Errors 54 Errors
107 55
108 None. 56 None.
109 57
110 New State 58 New State
111 59
112 None. 60 None.
113 61
114 Revision History 62 Revision History
115 63
116 5/9/2013 Documented the extension 64 5/9/2013 Documented the extension
117 4/30/2014 Moved usage flag to creation function. 65 4/30/2014 Moved usage flag to creation function.
66 10/7/2014 Remove map/unmap API.
OLDNEW
« no previous file with comments | « content/test/web_layer_tree_view_impl_for_testing.cc ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698