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

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

Issue 255713008: Change glimage to accept a type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 6 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 | Annotate | Revision Log
OLDNEW
1 Name 1 Name
2 2
3 CHROMIUM_map_image 3 CHROMIUM_image
4 4
5 Name Strings 5 Name Strings
6 6
7 GL_CHROMIUM_map_image 7 GL_CHROMIUM_image
8 8
9 Version 9 Version
10 10
11 Last Modifed Date: May 9, 2013 11 Last Modifed Date: Apr 30, 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 allows for more efficient uploading of texture data through
20 Chromium's OpenGL ES 2.0 implementation. 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.
21 23
22 For security reasons Chromium accesses the GPU from a separate process. User 24 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 25 processes are not allowed to access the GPU directly. This multi-process
24 architechure has the advantage that GPU operations can be secured and 26 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 27 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. 28 passed to GPU must first be made available to the separate GPU process.
27 29
28 This extension helps the application directly allocate and access texture 30 This extension helps the application directly allocate and access texture
29 memory. 31 memory.
30 32
31 Issues 33 Issues
32 34
33 None 35 None
34 36
35 New Tokens 37 New Tokens
36 38
37 None 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
38 47
39 New Procedures and Functions 48 New Procedures and Functions
40 49
41 GLuint CreateImageCHROMIUM (GLsizei width, GLsizei height, 50 GLuint CreateImageCHROMIUM(GLsizei width, GLsizei height,
42 GLenum internalformat) 51 GLenum internalformat, GLenum usage)
43 52
44 Allocate an image with width equal to <width> and height equal 53 Allocate an image with width equal to <width> and height equal
45 to <height> stored in format <internalformat>. 54 to <height> stored in format <internalformat>.
46 55
47 Returns a unique identifier for the allocated image that could be used 56 Returns a unique identifier for the allocated image that could be used
48 in subsequent operations. 57 in subsequent operations.
49 58
50 INVALID_VALUE is generated if <width> or <height> is nonpositive. 59 INVALID_VALUE is generated if <width> or <height> is nonpositive.
51 60
52 void DestroyImageCHROMIUM (GLuint image_id) 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)
53 65
54 Frees the image previously allocated by a call to CreateImageCHROMIUM. 66 Frees the image previously allocated by a call to CreateImageCHROMIUM.
55 67
56 INVALID_OPERATION is generated if <image_id> is not a valid image id. 68 INVALID_OPERATION is generated if <image_id> is not a valid image id.
57 69
58 void* MapImageCHROMIUM (GLuint image_id, GLenum access) 70 void* MapImageCHROMIUM(GLuint image_id)
59 71
60 Returns a pointer to in the user memory for the application to modify 72 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 73 the image. It is illegal to call this function on an image not created
62 pixels. 74 with IMAGE_MAP_CHROMIUM usage.
63 75
64 INVALID_OPERATION is generated if <image_id> is not a valid image id. 76 INVALID_OPERATION is generated if <image_id> is not a valid image id.
65 77
66 INVALID_OPERATION is generated if the image was already mapped by a previous 78 INVALID_OPERATION is generated if the image was already mapped by a previous
67 call to this method. 79 call to this method.
68 80
69 INVALID_ENUM is generated if <access> is not one of WRITE_ONLY, READ_ONLY 81 void UnmapImageCHROMIUM(GLuint image_id)
70 and READ_WRITE.
71
72 void UnmapImageCHROMIUM (GLuint image_id)
73 82
74 Removes the mapping created by a call to MapImageCHROMIUM. 83 Removes the mapping created by a call to MapImageCHROMIUM.
75 84
76 Note that after calling UnmapImageCHROMIUM the application should assume 85 Note that after calling UnmapImageCHROMIUM the application should assume
77 that the memory returned by MapImageCHROMIUM is off limits and is no longer 86 that the memory returned by MapImageCHROMIUM is off limits and is no longer
78 accessible by the application. Accessing it after calling 87 accessible by the application. Accessing it after calling
79 UnmapImageCHROMIUM will produce undefined results. 88 UnmapImageCHROMIUM will produce undefined results.
80 89
81 INVALID_OPERATION is generated if <image_id> is not a valid image id. 90 INVALID_OPERATION is generated if <image_id> is not a valid image id.
82 91
(...skipping 15 matching lines...) Expand all
98 107
99 None. 108 None.
100 109
101 New State 110 New State
102 111
103 None. 112 None.
104 113
105 Revision History 114 Revision History
106 115
107 5/9/2013 Documented the extension 116 5/9/2013 Documented the extension
117 4/30/2014 Moved usage flag to creation function.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698