• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    CHROMIUM_map_image
4
5Name Strings
6
7    GL_CHROMIUM_map_image
8
9Version
10
11    Last Modifed Date: May 9, 2013
12
13Dependencies
14
15    OpenGL ES 2.0 is required.
16
17Overview
18
19    This extension allows for more efficient uploading of texture data through
20    Chromium's OpenGL ES 2.0 implementation.
21
22    For security reasons Chromium accesses the GPU from a separate process. User
23    processes are not allowed to access the GPU directly. This multi-process
24    architechure has the advantage that GPU operations can be secured and
25    pipelined but it has the disadvantage that all data that is going to be
26    passed to GPU must first be made available to the separate GPU process.
27
28    This extension helps the application directly allocate and access texture
29    memory.
30
31Issues
32
33    None
34
35New Tokens
36
37    None
38
39New Procedures and Functions
40
41    GLuint CreateImageCHROMIUM (GLsizei width, GLsizei height,
42                                GLenum internalformat)
43
44    Allocate an image with width equal to <width> and height equal
45    to <height> stored in format <internalformat>.
46
47    Returns a unique identifier for the allocated image that could be used
48    in subsequent operations.
49
50    INVALID_VALUE is generated if <width> or <height> is nonpositive.
51
52    void DestroyImageCHROMIUM (GLuint image_id)
53
54    Frees the image previously allocated by a call to CreateImageCHROMIUM.
55
56    INVALID_OPERATION is generated if <image_id> is not a valid image id.
57
58    void* MapImageCHROMIUM (GLuint image_id, GLenum access)
59
60    Returns a pointer to in the user memory for the application to modify
61    the image. <access> parameter defines if the user will read or write the
62    pixels.
63
64    INVALID_OPERATION is generated if <image_id> is not a valid image id.
65
66    INVALID_OPERATION is generated if the image was already mapped by a previous
67    call to this method.
68
69    INVALID_ENUM is generated if <access> is not one of WRITE_ONLY, READ_ONLY
70    and READ_WRITE.
71
72    void UnmapImageCHROMIUM (GLuint image_id)
73
74    Removes the mapping created by a call to MapImageCHROMIUM.
75
76    Note that after calling UnmapImageCHROMIUM the application should assume
77    that the memory returned by MapImageCHROMIUM is off limits and is no longer
78    accessible by the application. Accessing it after calling
79    UnmapImageCHROMIUM will produce undefined results.
80
81    INVALID_OPERATION is generated if <image_id> is not a valid image id.
82
83    INVALID_OPERATION is generated if the image was not already mapped by a
84    previous call to MapImageCHROMIUM.
85
86    void GetImageParameterivCHROMIUM(GLuint image_id, GLenum pname,
87                                     GLint* params)
88
89    Sets <params> to the integer value of the parameter specified by <pname>
90    for the image specified by <image_id>. <params> is expected to be
91    properly allocated before calling this method.
92
93    INVALID_OPERATION is generated if <image_id> is not a valid image id.
94
95    INVALID_ENUM is generated if <pname> is not IMAGE_ROWBYTES_CHROMIUM.
96
97Errors
98
99    None.
100
101New State
102
103    None.
104
105Revision History
106
107    5/9/2013    Documented the extension
108