1 Name 2 3 CHROMIUM_image 4 5 Name Strings 6 7 GL_CHROMIUM_image 8 9 Version 10 11 Last Modifed Date: Apr 30, 2014 12 13 Dependencies 14 15 OpenGL ES 2.0 is required. 16 17 Overview 18 19 This extension allows for more efficient uploading of texture data through 20 Chromium's OpenGL ES 2.0 implementation as well as enable hardware overlay 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 33 Issues 34 35 None 36 37 New Tokens 38 39 Accepted by the <pname> parameter of GetImageParameterivCHROMIUM: 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 48 New Procedures and Functions 49 50 GLuint CreateImageCHROMIUM(GLsizei width, GLsizei height, 51 GLenum internalformat, GLenum usage) 52 53 Allocate an image with width equal to <width> and height equal 54 to <height> stored in format <internalformat>. 55 56 Returns a unique identifier for the allocated image that could be used 57 in subsequent operations. 58 59 INVALID_VALUE is generated if <width> or <height> is nonpositive. 60 61 INVALID_ENUM is generated if <usage> is not one of 62 IMAGE_MAP_CHROMIUM and IMAGE_SCANOUT_CHROMIUM. 63 64 void DestroyImageCHROMIUM(GLuint image_id) 65 66 Frees the image previously allocated by a call to CreateImageCHROMIUM. 67 68 INVALID_OPERATION is generated if <image_id> is not a valid image id. 69 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 107 108 None. 109 110 New State 111 112 None. 113 114 Revision History 115 116 5/9/2013 Documented the extension 117 4/30/2014 Moved usage flag to creation function. 118