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

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

Issue 2818993002: GL Implementation for GPU Discardable
Patch Set: rebase Created 3 years, 8 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 | « no previous file | 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
(Empty)
1 Name
2
3 CHROMIUM_discardable_texture
4
5 Name Strings
6
7 GL_CHROMIUM_discardable_texture
8
9 Version
10
11 Last Modified Date: April 11, 2017
12
13 Dependencies
14
15 OpenGL ES 2.0 is required.
16
17 Overview
18
19 This extension defines a way to mark textures as "unlocked" or "not
20 currently in use", giving GL the opportunity to delete these textures as
21 needed (potentially in cases of memory pressure). Clients may try to
22 re-lock such a texture, and if successful may continue to use the texture
23 as normal.
24
25 This allows a client to opportunistically cache data for future use,
26 without worrying about exact memory limits.
27
28 New Procedures and Functions
29
30 void glInitializeDiscardableTextureCHROMIUM (GLuint texture_id);
31
32 Notifies GL that a texture may be unlocked in the future. Must be called
33 once on a texture, before any uses of glUnlockTextureCHROMIUM. Will set
34 GL_INVALID_VALUE if called with a texture ID that does not exist, or if
35 called with a texture ID that has already been initialized.
36
37 void glUnlockTextureCHROMIUM (GLuint texture_id);
38
39 Notifies GL that a texture is no longer in use. Once a client calls
40 glUnlockTextureCHROMIUM, they may not use the indicated texture in any
41 future GL calls. This includes using the texture indirectly, via objects
42 (FBOs, etc...) that refer to the texture. Using a texture once it has
43 been unlocked is undefined, and may behave as though the texture has been
44 deleted. Will set GL_INVALID_VALUE if called with a texture ID that has
45 not beein initialized via glInitializeDiscardableTextureCHROMIUM.
46
47 bool glLockTextureCHROMIUM (GLuint texture_id);
48
49 Requests that GL re-lock the indicated texture, allowing it to be used in
50 future operations. If this function returns true, the client may continue
51 to use the indicated texture as though it was never unlocked. If this
52 function returns false, the client may not use the texture again, and
53 should behave as if the texture was deleted via glDeleteTextures. Will
54 set GL_INVALID_VALUE if called with a texture ID that has not beein
55 initialized via glInitializeDiscardableTextureCHROMIUM.
56
57 New Tokens
58
59 None.
60
61 Errors
62
63 None.
64
65 New State
66
67 None.
68
69 Revision History
70
71 3/11/2017 Documented the extension
OLDNEW
« no previous file with comments | « no previous file | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698